From: Klaus Jensen
Prepare nvme_dif_pract_generate_dif() and nvme_dif_check() to be
callable in smaller increments by making the reftag a pointer parameter
updated by the function.
Signed-off-by: Klaus Jensen
---
hw/nvme/nvme.h | 4 ++--
hw/nvme/ctrl.c | 10 +-
hw/nvme/dif.c | 22 +++
From: Klaus Jensen
This series reimplements flush, dsm, copy, zone reset and format nvm to
allow cancellation. I posted an RFC back in March ("hw/block/nvme:
convert ad-hoc aio tracking to aiocb") and I've applied some feedback
from Stefan and reimplemented the remaining commands.
The basic idea
From: Klaus Jensen
Pull the gist of nvme_check_dulbe() into a helper function. This is in
preparation for dsm refactoring.
Signed-off-by: Klaus Jensen
---
hw/nvme/ctrl.c | 41 -
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/hw/nvme/ctrl
04.06.2021 00:27, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:11AM +0300, Vladimir Sementsov-Ogievskiy wrote:
OK, that's a big rewrite of the logic.
Pre-patch we have an always running coroutine - connection_co. It does
reply receiving and reconnecting. And it leads to a lot of difficult
an
04.06.2021 00:11, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:10AM +0300, Vladimir Sementsov-Ogievskiy wrote:
req->receiving is a flag of request being in one concrete yield point
in nbd_co_do_receive_one_chunk().
Such kind of boolean flag is always better to unset before scheduling
the cor
03.06.2021 23:48, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:06AM +0300, Vladimir Sementsov-Ogievskiy wrote:
nbd_open() does it (through nbd_establish_connection()).
Actually we lost that call on reconnect path in 1dc4718d849e1a1fe
"block/nbd: use non-blocking connect: fix vm hang on connec
03.06.2021 23:04, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:05AM +0300, Vladimir Sementsov-Ogievskiy wrote:
Split out part, that we want to reuse for nbd_open().
Split out the part that we want to reuse for nbd_open().
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/nbd.c | 7
03.06.2021 23:53, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:04AM +0300, Vladimir Sementsov-Ogievskiy wrote:
We are going to reuse the script to generate a qcow2_ function in
Is qcow2_ right here? Looking ahead to patch 30/33, it looks like you
meant nbd_, at least in the context of this
On Fri, Apr 16, 2021 at 11:09:11AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> OK, that's a big rewrite of the logic.
>
> Pre-patch we have an always running coroutine - connection_co. It does
> reply receiving and reconnecting. And it leads to a lot of difficult
> and unobvious code around drain
On Fri, Apr 16, 2021 at 11:09:10AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> req->receiving is a flag of request being in one concrete yield point
> in nbd_co_do_receive_one_chunk().
>
> Such kind of boolean flag is always better to unset before scheduling
> the coroutine, to avoid double sched
On Fri, Apr 16, 2021 at 11:09:09AM +0300, Vladimir Sementsov-Ogievskiy wrote:
In the subject: s/clinent/client/
> We already have two similar helpers for other state. Let's add another
> one for convenience.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/nbd.c | 25 +
On Fri, Apr 16, 2021 at 11:09:08AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> The only last step we need to reuse the function is coroutine-wrapper.
> nbd_open() may be called from non-coroutine context. So, generate the
> wrapper and use it.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> --
On Fri, Apr 16, 2021 at 11:09:04AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We are going to reuse the script to generate a qcow2_ function in
Is qcow2_ right here? Looking ahead to patch 30/33, it looks like you
meant nbd_, at least in the context of this series.
--
Eric Blake, Principal So
On Fri, Apr 16, 2021 at 11:09:07AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We'll need a possibility of non-blocking nbd_co_establish_connection(),
> so that it returns immediately, and it returns success only if
> connections was previously established in background.
only if a connection was
On Fri, Apr 16, 2021 at 11:09:06AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> nbd_open() does it (through nbd_establish_connection()).
> Actually we lost that call on reconnect path in 1dc4718d849e1a1fe
> "block/nbd: use non-blocking connect: fix vm hang on connect()"
> when we have introduced re
On Fri, Apr 16, 2021 at 11:09:05AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Split out part, that we want to reuse for nbd_open().
Split out the part that we want to reuse for nbd_open().
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/nbd.c | 79 +++---
On Fri, Apr 16, 2021 at 11:09:04AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We are going to reuse the script to generate a qcow2_ function in
> further commit. Prepare the script now.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> scripts/block-coroutine-wrapper.py | 7 ---
> 1
On Fri, Apr 16, 2021 at 11:09:03AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> block/nbd doesn't need underlying sioc channel anymore. So, we can
> update nbd/client-connection interface to return only one top-most io
> channel, which is more straight forward.
>
> Signed-off-by: Vladimir Sementso
On Fri, Apr 16, 2021 at 11:09:02AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Currently sioc pointer is used just to pass from socket-connection to
> nbd negotiation. Drop the field, and use local variables instead. With
> next commit we'll update nbd/client-connection.c to behave
> appropriately
On Fri, Apr 16, 2021 at 11:09:01AM +0300, Vladimir Sementsov-Ogievskiy wrote:
For the subject line, might read better as:
block/nbd: don't touch s->sioc in nbd_teardown_connection()
> Negotiation during reconnect is now done in thread, and s->sioc is not
in a thread
> available during negotiat
On 6/3/21 4:06 AM, Emanuele Giuseppe Esposito wrote:
On 03/06/2021 01:23, John Snow wrote:
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote:
Alsp add a new _qmp_timer field to the QEMUMachine class.
Let's change the default socket timeout to None, so that if
a subclass needs to add a tim
03.06.2021 21:16, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:09:00AM +0300, Vladimir Sementsov-Ogievskiy wrote:
monitor_cur() is used by socket_get_fd, but it doesn't work in
connection thread. Let's monitor directly to cover this thing. We are
going to unify connection establishing path in nb
On Fri, Apr 16, 2021 at 11:09:00AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> monitor_cur() is used by socket_get_fd, but it doesn't work in
> connection thread. Let's monitor directly to cover this thing. We are
> going to unify connection establishing path in nbd_open and reconnect,
> so we sho
On Fri, Apr 16, 2021 at 11:08:58AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Use a new possibility of negotiation in connect thread. Now we are on
> the way of simplifying connection_co. We want to move the whole
> reconnect code to NBDClientConnection. NBDClientConnection already
> updated to s
03.06.2021 19:17, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:08:55AM +0300, Vladimir Sementsov-Ogievskiy wrote:
Add an option for thread to retry connection until success. We'll use
for a thread to retry connection until it succeeds.
nbd/client-connection both for reconnect and for initial
On Thu, Jun 03, 2021 at 03:37:18PM +0200, Paolo Bonzini wrote:
> For block host devices, I/O can happen through either the kernel file
> descriptor I/O system calls (preadv/pwritev, io_submit, io_uring)
> or the SCSI passthrough ioctl SG_IO.
>
> In the latter case, the size of each transfer can be
On Mon, 3 May 2021 at 10:55, Max Reitz wrote:
>
> In the bdrv_snapshot_goto() fallback code, we work with a pointer to
> either bs->file or bs->backing. We close that child, close the node
> (with .bdrv_close()), apply the snapshot on the child node, and then
> re-open the node (with .bdrv_open()
On Fri, Apr 16, 2021 at 11:08:57AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> To be reused in the following patch.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/nbd.c | 99 ++---
> 1 file changed, 57 insertions(+), 42 deletions(-)
On Fri, Apr 16, 2021 at 11:08:56AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Now, when thread can do negotiation and retry, it may run relatively
when a thread
> long. We need a mechanism to stop it, when user is not interested in
when the user
> result anymore. So, on nbd_client_connection_
On Fri, Apr 16, 2021 at 11:08:55AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Add an option for thread to retry connection until success. We'll use
for a thread to retry connection until it succeeds.
> nbd/client-connection both for reconnect and for initial connection in
> nbd_open(), so we ne
On Fri, Apr 16, 2021 at 11:08:52AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> We now have bs-independent connection API, which consists of four
> functions:
>
> nbd_client_connection_new()
> nbd_client_connection_unref()
> nbd_co_establish_connection()
> nbd_co_establish_connection_cance
On Thu, Jun 03, 2021 at 04:37:49PM +0200, Peter Krempa wrote:
> Hi,
>
> recently I've got a report that an upgrade of libvirt (and qemu) caused
> a guest-visible change in the SCSI disk identification when a very long
> serial number is used.
>
> I've traced it back to the point where libvirt sta
Hi,
recently I've got a report that an upgrade of libvirt (and qemu) caused
a guest-visible change in the SCSI disk identification when a very long
serial number is used.
I've traced it back to the point where libvirt started to use the
'device_id=' property of the SCSI disk to pass in the alias
From: Joelle van Dyne
On Darwin (iOS), there are no system level APIs for directly accessing
host block devices. We detect this at configure time.
Signed-off-by: Joelle van Dyne
Message-Id: <20210315180341.31638-...@getutm.app>
Signed-off-by: Paolo Bonzini
---
block/file-posix.c | 33 ++
bs->sg is only true for character devices, but block devices can also
be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET
returns bytes in an int for /dev/sgN devices, and sectors in a short
for block devices, so account for that in the code.
The maximum transfer also need not be a
From: Joelle van Dyne
Some BSD platforms do not have this header.
Reviewed-by: Peter Maydell
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Joelle van Dyne
Message-Id: <20210315180341.31638-...@getutm.app>
Signed-off-by: Paolo Bonzini
---
block.c | 2 +-
meson.build | 1 +
2 files c
For block host devices, I/O can happen through either the kernel file
descriptor I/O system calls (preadv/pwritev, io_submit, io_uring)
or the SCSI passthrough ioctl SG_IO.
In the latter case, the size of each transfer can be limited by the
HBA, while for file descriptor I/O the kernel is able to
I/O to a disk via read/write is not limited by the number of segments allowed
by the host adapter; the kernel can split requests if needed, and the limit
imposed by the host adapter can be very low (256k or so) to avoid that SG_IO
returns EINVAL if memory is heavily fragmented.
Since this value is
Even though it was only called for devices that have bs->sg set (which
must be character devices),
sg_get_max_segments looked at /sys/dev/block which only works for
block devices.
On Linux the sg driver has its own way to provide the maximum number of
iovecs in a scatter/gather list.
Signed-off-b
From: Joelle van Dyne
iOS hosts do not have these defined so we fallback to the
default behaviour.
Co-authored-by: Warner Losh
Reviewed-by: Peter Maydell
Signed-off-by: Joelle van Dyne
Message-Id: <20210315180341.31638-...@getutm.app>
Signed-off-by: Paolo Bonzini
---
block/file-posix.c | 21
Hi Kevin,
this is a combination of two series that both affect host block device
support in block/file-posix.c. Joelle's series is unchanged, while
mine was adjusted according to your review of v2.
v1->v2: add missing patch
v2->v3: add max_hw_transfer to BlockLimits
Joelle van Dyne (3):
blo
03.06.2021 02:38, John Snow wrote:
On 6/2/21 9:10 AM, Vladimir Sementsov-Ogievskiy wrote:
- use shorter construction
- don't create new dict if not needed
- drop extra unpacking key-val arguments
- drop extra default values
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max R
On 6/3/21 3:07 PM, Paolo Bonzini wrote:
> Depending on the configuration of QEMU, some binaries might not need libm
> at all. In that case libiscsi, which uses exp(), will fail to load.
> Link it in the module explicitly.
>
> Reported-by: Yi Sun
> Signed-off-by: Paolo Bonzini
> ---
> block/mes
Depending on the configuration of QEMU, some binaries might not need libm
at all. In that case libiscsi, which uses exp(), will fail to load.
Link it in the module explicitly.
Reported-by: Yi Sun
Signed-off-by: Paolo Bonzini
---
block/meson.build | 2 +-
meson.build | 4 ++--
2 files cha
Depending on the configuration of QEMU, some binaries might not need libm
at all. In that case libiscsi, which uses exp(), will fail to load.
This series makes sure that libm is linked in the module explicitly.
Paolo
Paolo Bonzini (2):
meson: allow optional dependencies for block modules
isc
Right now all dependencies for block modules are passed to
module_ss.add(when: ...), so they are mandatory. In the next patch we
will need to add a libm dependency to a module, but libm does not exist
on all systems. So, modify the creation of module_ss and modsrc so that
dependencies can also be
On 03/06/2021 14:25, Vladimir Sementsov-Ogievskiy wrote:
03.06.2021 14:03, Emanuele Giuseppe Esposito wrote:
So, you just make the class do nothing.. I'd prefer something like this:
@contextmanager
def NoTimeout:
yield
if qemu_gdb:
Timeout = NoTimeout
I am not sure I understand
03.06.2021 14:03, Emanuele Giuseppe Esposito wrote:
So, you just make the class do nothing.. I'd prefer something like this:
@contextmanager
def NoTimeout:
yield
if qemu_gdb:
Timeout = NoTimeout
I am not sure I understand what you want to do here.
I have a basic understanding of @co
03.06.2021 14:38, Paolo Bonzini wrote:
On 26/05/21 20:16, Vladimir Sementsov-Ogievskiy wrote:
So, the change:
-makecheck -> --makecheck
-valgrind -> --valgrind
-nocache -> --nocache
-misalign -> --misalign
Motivation:
1. Several long options are already have double dash:
--
03.06.2021 13:21, Emanuele Giuseppe Esposito wrote:
On 26/05/2021 20:16, Vladimir Sementsov-Ogievskiy wrote:
So, the change:
-makecheck -> --makecheck
-valgrind -> --valgrind
-nocache -> --nocache
-misalign -> --misalign
Motivation:
1. Several long options are already have d
03.06.2021 00:27, Eric Blake wrote:
On Fri, Apr 16, 2021 at 11:08:51AM +0300, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/nbd.c | 43 ++-
1 file changed, 26 insertions(+), 17 deletions(-)
Commit message s
On Thu, Jun 03, 2021 at 12:04:06PM +0200, Klaus Jensen wrote:
> On Jun 3 10:48, Stefan Hajnoczi wrote:
> > On Tue, Jun 01, 2021 at 08:07:48PM +0530, Gollu Appalanaidu wrote:
> > > @@ -5546,6 +5665,47 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr
> > > offset, uint64_t data,
> > > NVM
On 26/05/21 20:16, Vladimir Sementsov-Ogievskiy wrote:
So, the change:
-makecheck -> --makecheck
-valgrind -> --valgrind
-nocache -> --nocache
-misalign -> --misalign
Motivation:
1. Several long options are already have double dash:
--dry-run, --color, --groups, --exclude-gr
So, you just make the class do nothing.. I'd prefer something like this:
@contextmanager
def NoTimeout:
yield
if qemu_gdb:
Timeout = NoTimeout
I am not sure I understand what you want to do here.
I have a basic understanding of @contextmanager, but can you explain
more what you wan
On 26/05/2021 20:16, Vladimir Sementsov-Ogievskiy wrote:
So, the change:
-makecheck -> --makecheck
-valgrind -> --valgrind
-nocache -> --nocache
-misalign -> --misalign
Motivation:
1. Several long options are already have double dash:
--dry-run, --color, --groups, --exclu
On Jun 3 10:48, Stefan Hajnoczi wrote:
On Tue, Jun 01, 2021 at 08:07:48PM +0530, Gollu Appalanaidu wrote:
@@ -5546,6 +5665,47 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset,
uint64_t data,
NVME_GUEST_ERR(pci_nvme_ub_mmiowr_cmbsz_readonly,
"invalid wri
On Tue, Jun 01, 2021 at 08:07:48PM +0530, Gollu Appalanaidu wrote:
> @@ -5546,6 +5665,47 @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset,
> uint64_t data,
> NVME_GUEST_ERR(pci_nvme_ub_mmiowr_cmbsz_readonly,
> "invalid write to read only CMBSZ, ignored");
>
On Wed, 2 Jun 2021 at 14:45, Kevin Wolf wrote:
>
> The following changes since commit dd2db39d78431ab5a0b78777afaab3d61e94533e:
>
> Merge remote-tracking branch
> 'remotes/ehabkost-gl/tags/x86-next-pull-request' into staging (2021-06-01
> 21:23:26 +0100)
>
> are available in the Git repository
On 03/06/2021 01:23, John Snow wrote:
On 5/20/21 3:52 AM, Emanuele Giuseppe Esposito wrote:
Alsp add a new _qmp_timer field to the QEMUMachine class.
Let's change the default socket timeout to None, so that if
a subclass needs to add a timer, it can be done by modifying
this private field.
On 02/06/21 14:21, Kevin Wolf wrote:
Am 02.06.2021 um 11:13 hat Stefan Hajnoczi geschrieben:
On Fri, May 28, 2021 at 05:16:26PM +0300, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
This is my suggestion how to refactor block-copy to avoid extra atomic
operations in
"[PATCH v2 0/7] block-copy: pr
60 matches
Mail list logo