On Tue, Jul 02, 2013 at 03:36:25PM +0200, Stefan Hajnoczi wrote:
> Since 80ccf93b we flush the block device during close.  The
> bdrv_drain_all() call should come before bdrv_flush() to ensure guest
> write requests have completed.  Otherwise we may miss pending writes
> when flushing.
> 
> Call bdrv_drain_all() again for safety as the final step after
> bdrv_flush().  This should not be necessary but we can be paranoid here
> in case bdrv_flush() left I/O pending.
> 
> Cc: qemu-sta...@nongnu.org
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
> v2:
>  * Drain after block_job_cancel_sync() [kwolf]
> 
>  block.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

Reply via email to