resume them in
.drained_end(). This eliminates the need for the
aio_set_fd_handler(is_external=true) flag, which is being removed from
QEMU.
This is a long list but splitting it into individual commits would
probably lead to git bisect failures - the changes are all related.
Signed-off-by:
, and BlockDriver.
Narrow IO_OR_GS_CODE() to GLOBAL_STATE_CODE() where appropriate.
The test-bdrv-drain test case calls bdrv_drain() from an IOThread. This
is now only allowed from coroutine context, so update the test case to
run in a coroutine.
Signed-off-by: Stefan Hajnoczi
---
include/block
oot_set_aio_ctx_commit()
being invoked as part of the AioContext change propagation. This can be
solved by temporarily setting blk->allow_aio_context_change to true.
Future patches call blk_get_aio_context() from
BlockDevOps->drained_end(), so this patch will become necessary.
Signed-off-by: Stefa
ht requests remain once
qdev_simple_device_unplug_cb() returns.
Thanks to these two conditions we don't need aio_disable_external()
anymore.
Cc: Zhengui Li
Reviewed-by: Paolo Bonzini
Reviewed-by: Daniil Tatianin
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/virtio-scsi.c | 3 ---
1 file changed, 3 d
o use BlockDevOps
.drained_begin/end() callbacks. It no longer relies on is_external=true
so it is safe to pass is_external=false.
This is part of ongoing work to remove the aio_disable_external() API.
Signed-off-by: Stefan Hajnoczi
---
hw/xen/xen-bus.c | 8
1 file changed, 4 insertions(
depend on the
dataplane instance, so move the blk_set_dev_ops() call after
xen_block_dataplane_create().
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/xen-block.h | 2 ++
hw/block/dataplane/xen-block.c | 42 +-
hw/block/xen-block.c
ff-by: Stefan Hajnoczi
---
hw/i386/kvm/xen_xenstore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 900679af8a..6e81bc8791 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -133,7 +
attaching/detaching ioeventfds if the data
plane is started/stopped during a drained section. This should be rare,
but maybe the mirror block job can trigger it.
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 17 +--
hw/block/virtio-blk.c | 38
.
For both reasons, we can't just continue at block_job_next_locked(job).
Instead, start at the head of the list again after job_cancel_locked()
and skip those jobs that we already cancelled (or that are completing
anyway).
Signed-off-by: Kevin Wolf
Reviewed-by: Stefan Hajnoczi
Signed-off-by: S
ew I/O requests are not submitted in drained sections.
Kevin Wolf (1):
block: Fix use after free in blockdev_mark_auto_del()
Stefan Hajnoczi (20):
block-backend: split blk_do_set_aio_context()
hw/qdev: introduce qdev_is_realized() helper
virtio-scsi: avoid race between unplug and transp
On Tue, May 02, 2023 at 11:23:28AM +0200, Mads Ynddal wrote:
> From: Mads Ynddal
>
> The arguments extracted from `sys.argv` named and unpacked to make it
> clear what the arguments are and what they're used for.
>
> The two input files were opened, but never explicitly closed. File usage
> chan
On Tue, May 02, 2023 at 11:23:27AM +0200, Mads Ynddal wrote:
> From: Mads Ynddal
>
> I wanted to use simpletrace.py for an internal project, so I tried to update
> and polish the code. Some of the commits resolve specific issues, while some
> are more subjective.
An internal project based on qem
> anyway).
>
> Signed-off-by: Kevin Wolf
> ---
> blockdev.c | 18 ++
> 1 file changed, 14 insertions(+), 4 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Wed, May 03, 2023 at 10:43:16AM -0500, Eric Blake wrote:
> On Tue, May 02, 2023 at 05:11:19PM -0400, Stefan Hajnoczi wrote:
> > Most export types install BlockDeviceOps pointers. It is easy to forget
> > to remove them because that happens automatically via the "drive"
On Wed, May 03, 2023 at 11:15:56AM +0200, Stefano Garzarella wrote:
> On Tue, May 02, 2023 at 03:02:32PM -0400, Stefan Hajnoczi wrote:
> > On Tue, May 02, 2023 at 04:50:50PM +0200, Stefano Garzarella wrote:
> > > The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports
On Wed, May 03, 2023 at 10:00:57AM +0200, Kevin Wolf wrote:
> Am 02.05.2023 um 20:56 hat Stefan Hajnoczi geschrieben:
> > On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote:
> > > Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben:
> > > > Only report
On Wed, May 03, 2023 at 10:08:46AM +0200, Kevin Wolf wrote:
> Am 02.05.2023 um 22:06 hat Stefan Hajnoczi geschrieben:
> > On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote:
> > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > > > vhost-user act
On Wed, May 03, 2023 at 01:40:49PM +0200, Kevin Wolf wrote:
> Am 02.05.2023 um 22:02 hat Stefan Hajnoczi geschrieben:
> > On Tue, May 02, 2023 at 03:19:52PM +0200, Kevin Wolf wrote:
> > > Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben:
> > > > On Fri, Ap
eed to remember.
This fixes the nbd and vhost-user-blk export types.
Fixes: fd6afc501a01 ("nbd/server: Use drained block ops to quiesce the server")
Fixes: ca858a5fe94c ("vhost-user-blk-server: notify client about disk resize")
Signed-off-by: Stefan Hajnoczi
---
block/export/exp
On Tue, May 02, 2023 at 06:21:20PM +0200, Kevin Wolf wrote:
> Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > For simplicity, always run BlockDevOps .drained_begin/end/poll()
> > callbacks in the main loop thread. This makes it easier to implement the
> > callb
On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote:
> Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > vhost-user activity must be suspended during bdrv_drained_begin/end().
> > This prevents new requests from interfering with whatever is happening
> > i
On Tue, May 02, 2023 at 03:19:52PM +0200, Kevin Wolf wrote:
> Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben:
> > On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin Wolf wrote:
> > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > > > This patch is p
On Tue, May 02, 2023 at 05:42:51PM +0200, Kevin Wolf wrote:
> Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > Each vhost-user-blk request runs in a coroutine. When the BlockBackend
> > enters a drained section we need to enter a quiescent state. Currently
> > a
On Tue, May 02, 2023 at 04:50:50PM +0200, Stefano Garzarella wrote:
> The virtio-blk-vhost-vdpa driver in libblkio 1.3.0 supports the new
> 'fd' property. Let's expose this to the user, so the management layer
> can pass the file descriptor of an already opened vhost-vdpa character
> device. This i
On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote:
> Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben:
> > Only report a transport reset event to the guest after the SCSIDevice
> > has been unrealized by qdev_simple_device_unplug_cb().
> >
> > qdev_sim
ce the bug, but I have included a test case that
demonstrates the problem.
Stefan Hajnoczi (2):
aio-posix: do not nest poll handlers
tested: add test for nested aio_poll() in poll handlers
tests/unit/test-nested-aio-poll.c | 130 ++
util/aio-posix.c
Signed-off-by: Stefan Hajnoczi
---
tests/unit/test-nested-aio-poll.c | 130 ++
tests/unit/meson.build| 1 +
2 files changed, 131 insertions(+)
create mode 100644 tests/unit/test-nested-aio-poll.c
diff --git a/tests/unit/test-nested-aio-poll.c
b/tests
ppe Esposito
Cc: Paolo Bonzini
Signed-off-by: Stefan Hajnoczi
---
util/aio-posix.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/util/aio-posix.c b/util/aio-posix.c
index a8be940f76..34bc2a64d8 100644
--- a/util/aio-posix.c
+++ b/util/aio-posix.c
@@ -353,8 +353,19 @@ static bool
8513
> Fixes: 9c86c97f12 ("async: Add an optional reentrancy guard to the BH API")
> Signed-off-by: Alexander Bulekov
> ---
> util/async.c | 14 --
> 1 file changed, 8 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
Tsirkin
Cc: Cindy Lu
Cc: Yajun Wu
Signed-off-by: Stefan Hajnoczi
---
v2:
- Added VHOST_USER_PROTOCOL_F_STATUS check [Yajun Wu]
- Added "Fixes:" tag [Michael]
---
hw/virtio/vhost-user.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-us
On Fri, Apr 21, 2023 at 01:30:48PM +0800, Yajun Wu wrote:
>
> On 4/20/2023 9:07 PM, Stefan Hajnoczi wrote:
> >
> > Setting the VIRTIO Device Status Field to 0 resets the device. The
> > device's state is lost, including the vring configuration.
> >
> >
ce/trace-hmp-cmds.c| 17 +-
> scripts/qapi/gen.py | 4 +-
> scripts/tracetool/format/c.py | 6 --
> scripts/tracetool/format/h.py | 16 +
> trace-events | 50 ---
> 25 files changed, 43 insertions(+), 486 deletions(-)
&g
-
> include/block/block-global-state.h | 5 -
> include/block/block_int-common.h | 3 ++-
> block.c| 9 +
> block/io.c | 1 -
> 4 files changed, 15 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
quorum.c | 4 ++--
> blockdev.c | 3 +++
> 7 files changed, 19 insertions(+), 10 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
gt; ---
> include/block/qapi.h | 7 ---
> qemu-img.c | 2 ++
> 2 files changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
gt; block/qapi.c | 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
sito
> Signed-off-by: Kevin Wolf
> ---
> include/block/block_int-common.h | 12 ++--
> block/amend.c| 8 +++-
> 2 files changed, 13 insertions(+), 7 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
> include/block/block_int-common.h | 4 ++--
> block.c | 2 ++
> 3 files changed, 9 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
gt; block/mirror.c | 8 ++--
> block/raw-format.c | 2 +-
> 7 files changed, 22 insertions(+), 14 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Tue, Apr 25, 2023 at 07:31:51PM +0200, Kevin Wolf wrote:
> @@ -5778,6 +5779,7 @@ int64_t coroutine_fn
> bdrv_co_get_allocated_file_size(BlockDriverState *bs)
> {
> BlockDriver *drv = bs->drv;
> IO_CODE();
> +assert_bdrv_graph_readable();
Is there a need for runtime assertions in
; block/mirror.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
The commit message is misleading. This commit does not take the graph
lock, it declares that the caller must already hold the graph lock.
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
gt; block/vhdx.c | 9 +
> 1 file changed, 5 insertions(+), 4 deletions(-)
The commit message is misleading. This commit does not take the graph
lock, it declares that the caller must already hold the graph lock.
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
pe Esposito
> Signed-off-by: Kevin Wolf
> ---
> block/coroutines.h | 5 +++--
> block/nbd.c| 39 +--
> 2 files changed, 24 insertions(+), 20 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
general
--enable-debug option.
Signed-off-by: Stefan Hajnoczi
---
meson_options.txt | 2 ++
configure | 1 +
meson.build | 2 ++
block/graph-lock.c| 3 +++
scripts/meson-buildoptions.sh | 4
5 files changed, 12 insertions(+)
diff
| 11 +++
> 1 file changed, 3 insertions(+), 8 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
---
> 4 files changed, 21 insertions(+), 26 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Tue, Apr 25, 2023 at 07:31:45PM +0200, Kevin Wolf wrote:
> GRAPH_RDLOCK_GUARD() and GRAPH_RDLOCK_GUARD_MAINLOOP() only take a
> reader lock for the graph, so the correct annotation for them to use is
> TSA_ASSERT_SHARED rather than TSA_ASSERT.
>
> Signed-off-by: Kevin Wolf
> ---
> include/blo
insertions(+)
Modulo Eric's comment about the commit description:
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Tue, Apr 25, 2023 at 07:31:43PM +0200, Kevin Wolf wrote:
> test-bdrv-drain contains a few test cases that are run both in coroutine
> and non-coroutine context. Running the entire code including the setup
> and shutdown in coroutines is incorrect because graph modifications can
> generally not h
On Tue, Apr 25, 2023 at 07:31:42PM +0200, Kevin Wolf wrote:
> This QMP handler runs in a coroutine, so it must use the corresponding
> no_co_wrappers instead.
>
> Signed-off-by: Kevin Wolf
> ---
> blockdev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
| 18 +-
> block/vpc.c | 6 +++---
> 12 files changed, 44 insertions(+), 40 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
ertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
ck/qcow2.c | 19 +--
> 3 files changed, 13 insertions(+), 12 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
++--
> 1 file changed, 12 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin Wolf wrote:
> Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben:
> > This patch is part of an effort to remove the aio_disable_external()
> > API because it does not fit in a multi-queue block layer world where
> > ma
tests/unit/test-aio-multithread.c | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi
signature.asc
Description: PGP signature
On Sat, Apr 29, 2023 at 11:05:06PM +0100, Richard Henderson wrote:
> On 4/28/23 13:39, Stefan Hajnoczi wrote:
> > The following changes since commit 05d50ba2d4668d43a835c5a502efdec9b92646e6:
> >
> >Merge tag 'migration-20230427-pull-request' of
> > https
From: Sam Li
Add the documentation about the zoned device support to virtio-blk
emulation.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-9
zone
- write to a zone
- zone append
Signed-off-by: Sam Li
Message-id: 20230427172339.3709-2-faithilike...@gmail.com
[Fix errno propagation from handle_aiocb_zone_mgmt()
--Stefan]
Signed-off-by: Stefan Hajnoczi
---
include/block/block-common.h | 14 +++
include/block/block_int-common.h
The following changes since commit 05d50ba2d4668d43a835c5a502efdec9b92646e6:
Merge tag 'migration-20230427-pull-request' of
https://gitlab.com/juan.quintela/qemu into staging (2023-04-28 08:35:06 +0100)
are available in the Git repository at:
https://gitlab.com/stefanha/qemu.git tags/block-
On Fri, Apr 28, 2023 at 01:20:11AM +0800, Sam Li wrote:
> Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones
> that are larger than the LBA size. It can only allow sequential writes, which
> reduces write amplification in SSD, leading to higher throughput and increased
>
From: Sam Li
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-8-faithilike...@gmail.com
Message-id: 20230324090605.28361-8-faithilike...@gmail.com
Signed-off-by: Stefan
From: Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to
pass through requests of zone commands.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed
On Fri, Apr 28, 2023 at 01:23:35AM +0800, Sam Li wrote:
> This patch series add zone append operation based on the previous
> zoned device support part. The file-posix driver is modified to
> add zone append emulation using regular writes.
>
> v9:
> - address review comments [Stefan]
> * fix get
completion the device will respond with the position where the data has
been written in the zone.
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
Reviewed-by: Stefan Hajnoczi
Message-id: 20230427172339.3709-3-faithilike...@gmail.com
Signed-off-by: Stefan Hajnoczi
---
include/block/block
From: Sam Li
Use scripts/update-linux-headers.sh to update headers to 6.3-rc1.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Signed-off-by: Stefan Hajnoczi
[Reran scripts/update-linux-headers.sh on Linux v6.3. The only change
was the use of __virtioXX types
From: Sam Li
Taking account of the new zone append write operation for zoned devices,
BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read,
write, flush).
Signed-off-by: Sam Li
Signed-off-by: Stefan Hajnoczi
Message-Id: <20230407082528.18841-4-faithilike...@gmail.
Signed-off-by: Stefan Hajnoczi
Message-Id: <20230407082528.18841-3-faithilike...@gmail.com>
---
hw/block/virtio-blk-common.c | 2 +
hw/block/virtio-blk.c| 389 +++
hw/virtio/virtio-qmp.c | 2 +
3 files changed, 393 insertions(+)
diff --gi
From: Sam Li
Add the documentation about the example of using virtio-blk driver
to pass the zoned block devices through to the guest.
Signed-off-by: Sam Li
Signed-off-by: Stefan Hajnoczi
[Fix rST syntax
--Stefan]
Message-Id: <20230407082528.18841-6-faithilike...@gmail.com>
---
docs
From: Sam Li
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi
Message-Id: <20230407082528.18841-5-faithilike...@gmail.com>
---
hw/block/virtio-blk.c | 12
hw/block/trace-events | 7 +++
2 files changed, 19 insertions(+)
diff --gi
From: Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not
allowed.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-6
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-3-faithilike...@gmail.com
Message-id: 20230324090605.28361-3-faithilike...@gmail.com
[Adjust commit message prefix as suggested by
From: Sam Li
The new block layer APIs of zoned block devices can be tested by:
$ tests/qemu-iotests/check zoned
Run each zone operation on a newly created null_blk device
and see whether it outputs the same zone information.
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Acked-by: Kevin
From: Sam Li
The patch tests zone append writes by reporting the zone wp after
the completion of the call. "zap -p" option can print the sector
offset value after completion, which should be the start sector
where the append write begins.
Signed-off-by: Sam Li
Reviewed-by: Stefa
From: Sam Li
Signed-off-by: Sam Li
Reviewed-by: Dmitry Fomichev
Reviewed-by: Stefan Hajnoczi
Message-id: 20230427172339.3709-5-faithilike...@gmail.com
Signed-off-by: Stefan Hajnoczi
---
block/file-posix.c | 3 +++
block/trace-events | 2 ++
2 files changed, 5 insertions(+)
diff --git a
=host_device, filename=/dev/nullb0
-c "zrp offset nr_zones"
Signed-off-by: Sam Li
Reviewed-by: Hannes Reinecke
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-4-faithilike...@gmail.com
From: Sam Li
Signed-off-by: Sam Li
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Damien Le Moal
Reviewed-by: Hannes Reinecke
Reviewed-by: Dmitry Fomichev
Acked-by: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
Message-id: 20230427172019.3345-2-faithilike...@gmail.com
Message-id
le fdmon-io_uring in the future (and I'm working on that).
Signed-off-by: Stefan Hajnoczi
---
util/fdmon-io_uring.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/fdmon-io_uring.c b/util/fdmon-io_uring.c
index ab43052dd7..35165bcb46 100644
--- a/util/fdmon-io_uring.c
+++ b/util/fdm
attaching/detaching ioeventfds if the data
plane is started/stopped during a drained section. This should be rare,
but maybe the mirror block job can trigger it.
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 17 +--
hw/block/virtio-blk.c | 38
The FUSE export calls blk_exp_ref/unref() without the AioContext lock.
Instead of fixing the FUSE export, adjust blk_exp_ref/unref() so they
work without the AioContext lock. This way it's less error-prone.
Suggested-by: Paolo Bonzini
Signed-off-by: Stefan Hajnoczi
---
include/block/exp
by: Daniil Tatianin
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-bus.c| 3 ++-
hw/scsi/virtio-scsi.c | 18 +-
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 07275fb631..64d7311757 100644
--- a/hw/scsi/scsi-b
: Stefan Hajnoczi
---
hw/block/dataplane/virtio-blk.c | 2 ++
hw/scsi/virtio-scsi-dataplane.c | 9 +
2 files changed, 11 insertions(+)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index b28d81737e..bd7cc6e76b 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b
when there are requests in
flight. The in-flight counter needs to be atomic.
Signed-off-by: Stefan Hajnoczi
---
include/qemu/vhost-user-server.h | 4 +++-
block/export/vhost-user-blk-server.c | 16
util/vhost-user-server.c | 14 ++
3 files c
-off-by: Stefan Hajnoczi
---
include/hw/qdev-core.h | 17 ++---
hw/scsi/scsi-bus.c | 3 +--
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index bd50ad5ee1..4d734cf35e 100644
--- a/include/hw/qdev-core.h
+++ b/include
e are no
more requests.
Avoid confusing by renaming refcount and ref/unref to in_flight and
inc/dec.
Reviewed-by: Paolo Bonzini
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Stefan Hajnoczi
---
include/qemu/vhost-user-server.h | 6 +++---
block/export/vhost-user-blk-server.c
o use BlockDevOps
.drained_begin/end() callbacks. It no longer relies on is_external=true
so it is safe to pass is_external=false.
This is part of ongoing work to remove the aio_disable_external() API.
Signed-off-by: Stefan Hajnoczi
---
hw/xen/xen-bus.c | 8
1 file changed, 4 insertions(
ff-by: Stefan Hajnoczi
---
hw/i386/kvm/xen_xenstore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c
index 900679af8a..6e81bc8791 100644
--- a/hw/i386/kvm/xen_xenstore.c
+++ b/hw/i386/kvm/xen_xenstore.c
@@ -133,7 +
oot_set_aio_ctx_commit()
being invoked as part of the AioContext change propagation. This can be
solved by temporarily setting blk->allow_aio_context_change to true.
Future patches call blk_get_aio_context() from
BlockDevOps->drained_end(), so this patch will become necessary.
Signed-off-by: Stefa
.
Signed-off-by: Stefan Hajnoczi
---
include/sysemu/block-backend-common.h | 25 +
block/io.c| 3 ++-
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/include/sysemu/block-backend-common.h
b/include/sysemu/block-backend-common.h
index
depend on the
dataplane instance, so move the blk_set_dev_ops() call after
xen_block_dataplane_create().
Signed-off-by: Stefan Hajnoczi
---
hw/block/dataplane/xen-block.h | 2 ++
hw/block/dataplane/xen-block.c | 42 +-
hw/block/xen-block.c
The BlockBackend quiesce_counter is greater than zero during drained
sections. Add an API to check whether the BlockBackend is in a drained
section.
The next patch will use this API.
Signed-off-by: Stefan Hajnoczi
---
include/sysemu/block-backend-global-state.h | 1 +
block/block-backend.c
, is_external, io_read, io_poll, io_poll_ready;
@@
- aio_set_event_notifier(ctx, notifier, is_external, io_read, io_poll,
io_poll_ready)
+ aio_set_event_notifier(ctx, notifier, io_read, io_poll, io_poll_ready)
Reviewed-by: Juan Quintela
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Stefan
Host notifiers can now use is_external=false since virtio-blk and
virtio-scsi no longer rely on is_external=true for drained sections.
Signed-off-by: Stefan Hajnoczi
---
hw/virtio/virtio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio
resume them in
.drained_end(). This eliminates the need for the
aio_set_fd_handler(is_external=true) flag, which is being removed from
QEMU.
This is a long list but splitting it into individual commits would
probably lead to git bisect failures - the changes are all related.
Signed-off-by:
sees one
pair of .drained_begin/end() calls.
After this commit, virtio-scsi no longer depends on hw/virtio's
ioeventfd aio_set_event_notifier(is_external=true). This commit is a
step towards removing the aio_disable_external() API.
Signed-off-by: Stefan Hajnoczi
---
include/hw/scsi/s
This is part of ongoing work to remove the aio_disable_external() API.
Use BlockDevOps .drained_begin/end/poll() instead of
aio_set_fd_handler(is_external=true).
As a side-effect the FUSE export now follows AioContext changes like the
other export types.
Signed-off-by: Stefan Hajnoczi
ily stop file descriptor handlers.
This ensures that new I/O requests are not submitted in drained sections.
The first two virtio-scsi patches were already sent as a separate series. I
included them because they are necessary in order to fully remove
aio_disable_external().
Stefan Hajnoczi (20):
d the aio_disable_external()
API cannot be used since multiple AioContext may be processing I/O, not
just one.
Switch to BlockDevOps->drained_begin/end() callbacks.
Signed-off-by: Stefan Hajnoczi
---
block/export/vhost-user-blk-server.c | 43 ++--
util/vhost-user-server.c
simple_device_unplug_cb()
returns.
Thanks to these two conditions we don't need aio_disable_external()
anymore.
Cc: Zhengui Li
Reviewed-by: Paolo Bonzini
Reviewed-by: Daniil Tatianin
Signed-off-by: Stefan Hajnoczi
---
hw/scsi/scsi-disk.c | 1 +
hw/scsi/virtio-scsi.c | 3 ---
2 file
On Fri, Apr 21, 2023 at 11:36:02AM +0800, Yongji Xie wrote:
> Hi Stefan,
>
> On Thu, Apr 20, 2023 at 7:39 PM Stefan Hajnoczi wrote:
> >
> > vduse_blk_detach_ctx() waits for in-flight requests using
> > AIO_WAIT_WHILE(). This is not allowe
1401 - 1500 of 10281 matches
Mail list logo