qemu-e2k/include/block
Hanna Czenczek 5bdbaebcce virtio: Re-enable notifications after drain
During drain, we do not care about virtqueue notifications, which is why
we remove the handlers on it.  When removing those handlers, whether vq
notifications are enabled or not depends on whether we were in polling
mode or not; if not, they are enabled (by default); if so, they have
been disabled by the io_poll_start callback.

Because we do not care about those notifications after removing the
handlers, this is fine.  However, we have to explicitly ensure they are
enabled when re-attaching the handlers, so we will resume receiving
notifications.  We do this in virtio_queue_aio_attach_host_notifier*().
If such a function is called while we are in a polling section,
attaching the notifiers will then invoke the io_poll_start callback,
re-disabling notifications.

Because we will always miss virtqueue updates in the drained section, we
also need to poll the virtqueue once after attaching the notifiers.

Buglink: https://issues.redhat.com/browse/RHEL-3934
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-ID: <20240202153158.788922-3-hreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-02-07 21:51:03 +01:00
..
accounting.h block: add accounting for zone append operation 2023-05-15 08:18:10 -04:00
aio_task.h
aio-wait.h system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
aio.h virtio: Re-enable notifications after drain 2024-02-07 21:51:03 +01:00
block_backup.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block_int-common.h commit: Allow users to request only format driver names in backing file format 2024-01-26 11:16:58 +01:00
block_int-global-state.h stream: Allow users to request only format driver names in backing file format 2024-01-26 11:16:58 +01:00
block_int-io.h block: Mark bdrv_cow_child() and callers GRAPH_RDLOCK 2023-11-07 19:14:19 +01:00
block_int.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block-common.h block: remove outdated AioContext locking comments 2023-12-21 22:49:27 +01:00
block-copy.h block: Mark bdrv_co_block_status() and callers GRAPH_RDLOCK 2023-02-23 19:49:07 +01:00
block-global-state.h commit: Allow users to request only format driver names in backing file format 2024-01-26 11:16:58 +01:00
block-hmp-cmds.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
block-io.h block: remove outdated AioContext locking comments 2023-12-21 22:49:27 +01:00
block.h include/block: Untangle inclusion loops 2023-01-20 07:24:28 +01:00
blockjob_int.h block: Mark block_job_add_bdrv() GRAPH_WRLOCK 2023-11-07 19:14:19 +01:00
blockjob.h Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
dirty-bitmap.h block: Mark bdrv_*_dirty_bitmap() and callers GRAPH_RDLOCK 2023-02-23 19:49:32 +01:00
export.h block/export: don't require AioContext lock around blk_exp_ref/unref() 2023-05-30 17:32:02 +02:00
fuse.h
graph-lock.h graph-lock: remove AioContext locking 2023-12-21 22:49:27 +01:00
nbd.h nbd/server: Prepare for per-request filtering of BLOCK_STATUS 2023-10-05 11:02:08 -05:00
nvme.h hw/nvme: flexible data placement emulation 2023-03-06 15:28:02 +01:00
qapi.h block: Mark bdrv_get_parent_name() and callers GRAPH_RDLOCK 2023-10-12 16:31:33 +02:00
qdict.h
raw-aio.h io_uring: move LuringState typedef to block/aio.h 2024-01-18 10:43:14 +01:00
replication.h
reqlist.h
snapshot.h block: remove AioContext locking 2023-12-21 22:49:27 +01:00
thread-pool.h thread-pool: avoid passing the pool parameter every time 2023-04-25 13:17:28 +02:00
throttle-groups.h block/throttle-groups: Use ThrottleDirection instread of bool is_write 2023-08-29 10:49:24 +02:00
ufs.h include/block/ufs.h: spelling fix: setted 2023-11-15 12:06:04 +03:00
write-threshold.h block: Clean up includes 2023-02-08 07:28:05 +01:00