]> git.proxmox.com Git - mirror_qemu.git/commit - block/linux-aio.c
block: plug whole tree at once, introduce bdrv_io_unplugged_begin/end
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Apr 2016 16:33:34 +0000 (18:33 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 May 2016 13:22:07 +0000 (15:22 +0200)
commit6b98bd649520d07df4d1b7a0a54ac73bf178519c
tree22924e241859dcc57d55fdb1d71c8f4220313633
parentce0f141259f06fd77fde2519cc352618ad797ce2
block: plug whole tree at once, introduce bdrv_io_unplugged_begin/end

Extract the handling of io_plug "depth" from linux-aio.c and let the
main bdrv_drain loop do nothing but wait on I/O.

Like the two newly introduced functions, bdrv_io_plug and bdrv_io_unplug
now operate on all children.  The visit order is now symmetrical between
plug and unplug, making it possible for formats to implement plug/unplug.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c
block/linux-aio.c
block/raw-aio.h
block/raw-posix.c
include/block/block.h
include/block/block_int.h