This series includes several changes that, in different ways, touch the aio.c main loop.
Patches 1 and 2 let the tools use timers. Patches 3 to 6 simplify the aio loop by removing the separate process_queue callback, and by adding a return value to qemu_aio_wait. (Mostly extracted from my threading experiments, and retested). Patch 7 is zwu's patch to drain requests correctly in the presence of I/O throttling. This version does not add bdrv_drain; see comments in the patch and on the mailing list. Paolo Bonzini (6): qemu-io: use main_loop_wait qemu-tool: map vm_clock to rt_clock posix-aio: merge posix_aio_process_queue and posix_aio_read aio: remove process_queue callback and qemu_aio_process_queue aio: return "AIO in progress" state from qemu_aio_wait aio: simplify qemu_aio_wait Zhi Yong Wu (1): block: add the support to drain throttled requests aio.c | 176 +++++++++++++++++++++------------------------------- block.c | 21 ++++++- block/curl.c | 10 +-- block/iscsi.c | 4 +- block/nbd.c | 8 +- block/rbd.c | 5 +- block/sheepdog.c | 11 ++-- cmd.c | 10 ++-- linux-aio.c | 2 +- posix-aio-compat.c | 45 +++++--------- qemu-aio.h | 19 +----- qemu-io.c | 7 +- qemu-tool.c | 3 +- 13 files changed, 139 insertions(+), 182 deletions(-) -- 1.7.7.6