docs/interop/qcow2.txt | 10 +- include/block/block-global-state.h | 8 +- include/block/block_int-common.h | 4 +- include/block/blockjob_int.h | 14 +- include/io/channel.h | 10 + block.c | 1 - block/commit.c | 7 +- block/create.c | 1 - block/crypto.c | 25 +- block/export/export.c | 6 +- block/graph-lock.c | 31 +- block/mirror.c | 23 +- block/parallels.c | 6 +- block/qcow.c | 6 +- block/qcow2.c | 43 +- block/qed.c | 6 +- block/raw-format.c | 2 +- block/stream.c | 7 +- block/vdi.c | 11 +- block/vhdx.c | 8 +- block/vmdk.c | 27 +- block/vpc.c | 6 +- blockdev.c | 606 +++++++++------------ blockjob.c | 22 +- io/channel.c | 33 +- nbd/server.c | 3 +- qemu-img.c | 5 +- tests/unit/test-bdrv-drain.c | 6 +- tests/unit/test-nested-aio-poll.c | 130 +++++ util/aio-posix.c | 11 + tests/qemu-iotests/iotests.py | 4 + tests/qemu-iotests/245 | 7 +- tests/qemu-iotests/245.out | 9 +- tests/qemu-iotests/tests/graph-changes-while-io | 56 +- .../qemu-iotests/tests/graph-changes-while-io.out | 4 +- tests/unit/meson.build | 5 +- 36 files changed, 661 insertions(+), 502 deletions(-) create mode 100644 tests/unit/test-nested-aio-poll.c