Re: [Qemu-devel] [PATCH 3/3] block: convert qemu_aio_flush() calls to bdrv_drain_all()

2011-11-30 Thread Stefan Hajnoczi
On Wed, Nov 30, 2011 at 12:28 PM, Christoph Hellwig wrote: > On Wed, Nov 30, 2011 at 12:23:43PM +, Stefan Hajnoczi wrote: >> Many places in QEMU call qemu_aio_flush() to complete all pending >> asynchronous I/O.  Most of these places actually want to drain all block >> requests but there is bl

Re: [Qemu-devel] [PATCH 3/3] block: convert qemu_aio_flush() calls to bdrv_drain_all()

2011-11-30 Thread Christoph Hellwig
On Wed, Nov 30, 2011 at 12:23:43PM +, Stefan Hajnoczi wrote: > Many places in QEMU call qemu_aio_flush() to complete all pending > asynchronous I/O. Most of these places actually want to drain all block > requests but there is block layer API to do so. there seems to be a "not" missing in the

[Qemu-devel] [PATCH 3/3] block: convert qemu_aio_flush() calls to bdrv_drain_all()

2011-11-30 Thread Stefan Hajnoczi
Many places in QEMU call qemu_aio_flush() to complete all pending asynchronous I/O. Most of these places actually want to drain all block requests but there is block layer API to do so. This patch introduces the bdrv_drain_all() API to wait for requests across all BlockDriverStates to complete.