qemu-e2k/block
Stefan Hajnoczi 7838c67f22 block/nvme: support nested aio_poll()
QEMU block drivers are supposed to support aio_poll() from I/O
completion callback functions. This means completion processing must be
re-entrant.

The standard approach is to schedule a BH during completion processing
and cancel it at the end of processing. If aio_poll() is invoked by a
callback function then the BH will run. The BH continues the suspended
completion processing.

All of this means that request A's cb() can synchronously wait for
request B to complete. Previously the nvme block driver would hang
because it didn't process completions from nested aio_poll().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Message-id: 20200617132201.1832152-8-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-06-23 15:46:08 +01:00
..
monitor blockdev: Split off basic bitmap operations for qemu-img 2020-05-19 10:32:14 -05:00
accounting.c
aio_task.c
backup-top.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
backup-top.h
backup.c backup: Make sure that source and target size match 2020-05-08 13:26:35 +02:00
blkdebug.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
blklogwrites.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
blkreplay.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
blkverify.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
block-backend.c block: Pass BdrvChildRole in remaining cases 2020-05-18 19:05:25 +02:00
block-copy.c block/block-copy: Simplify block_copy_do_copy() 2020-05-18 19:05:25 +02:00
bochs.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
cloop.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
commit.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
copy-on-read.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
create.c
crypto.c qcow2: Expose bitmaps' size during measure 2020-05-28 13:16:16 -05:00
crypto.h
curl.c block/curl: HTTP header field names are case insensitive 2020-03-11 12:42:29 +01:00
dirty-bitmap.c block/dirty-bitmap: add bdrv_has_named_bitmaps helper 2020-05-28 13:15:22 -05:00
dmg-bz2.c
dmg-lzfse.c
dmg.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
dmg.h
file-posix.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
file-win32.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
filter-compress.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
gluster.c gluster: Drop useless has_zero_init callback 2020-05-08 13:26:35 +02:00
io_uring.c io_uring: use io_uring_cq_ready() to check for ready cqes 2020-06-05 09:54:48 +01:00
io.c block: Factor out bdrv_run_co() 2020-06-05 09:54:48 +01:00
iscsi-opts.c
iscsi.c lockable: replaced locks with lock guard macros where appropriate 2020-05-04 16:07:43 +01:00
linux-aio.c misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
Makefile.objs block: Refactor subdirectory recursion during make 2020-06-17 14:53:39 +02:00
mirror.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
nbd.c block: Call attention to truncation of long NBD exports 2020-06-10 12:58:59 -05:00
nfs.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
null.c
nvme.c block/nvme: support nested aio_poll() 2020-06-23 15:46:08 +01:00
parallels.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
parallels.h
qapi-sysemu.c block: Move system emulator QMP commands to block/qapi-sysemu.c 2020-03-06 17:15:38 +01:00
qapi.c block: Fix VM size field width in snapshot dump 2020-02-20 16:43:42 +01:00
qcow2-bitmap.c qcow2: Tweak comments on qcow2_get_persistent_dirty_bitmap_size 2020-06-17 14:53:39 +02:00
qcow2-cache.c
qcow2-cluster.c qcow2: Support BDRV_REQ_ZERO_WRITE for truncate 2020-04-30 17:51:07 +02:00
qcow2-refcount.c block: Comment cleanups 2020-05-05 13:17:36 +02:00
qcow2-snapshot.c qcow2: Allow resize of images with internal snapshots 2020-05-05 13:17:36 +02:00
qcow2-threads.c qcow2: add zstd cluster compression 2020-05-13 14:20:31 +02:00
qcow2.c qcow2: Expose bitmaps' size during measure 2020-05-28 13:16:16 -05:00
qcow2.h qcow2: Expose bitmaps' size during measure 2020-05-28 13:16:16 -05:00
qcow.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
qed-check.c
qed-cluster.c
qed-l2-cache.c
qed-table.c
qed.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
qed.h
quorum.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
raw-format.c qcow2: Expose bitmaps' size during measure 2020-05-28 13:16:16 -05:00
rbd.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
replication.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
sheepdog.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
snapshot.c block/snapshot: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
ssh.c block: Drop unused .bdrv_has_zero_init_truncate 2020-05-08 13:26:35 +02:00
stream.c block/stream: Remove redundant statement in stream_run() 2020-03-09 15:59:31 +01:00
throttle-groups.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
throttle.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
trace-events block/nvme: support nested aio_poll() 2020-06-23 15:46:08 +01:00
vdi.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
vhdx-endian.c
vhdx-log.c block: Add flags to bdrv(_co)_truncate() 2020-04-30 17:51:07 +02:00
vhdx.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
vhdx.h
vmdk.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
vpc.c block: Use bdrv_default_perms() 2020-05-18 19:05:25 +02:00
vvfat.c block: Drop @child_class from bdrv_child_perm() 2020-05-18 19:05:25 +02:00
vxhs.c
win32-aio.c
write-threshold.c