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
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
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_int.h
block-common.h block: remove outdated AioContext locking comments 2023-12-21 22:49:27 +01:00
block-copy.h
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
block-io.h block: remove outdated AioContext locking comments 2023-12-21 22:49:27 +01:00
block.h
blockjob_int.h
blockjob.h Rename "QEMU global mutex" to "BQL" in comments and docs 2024-01-08 10:45:43 -05:00
dirty-bitmap.h
export.h
fuse.h
graph-lock.h graph-lock: remove AioContext locking 2023-12-21 22:49:27 +01:00
nbd.h
nvme.h
qapi.h
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
throttle-groups.h
ufs.h
write-threshold.h