]> git.proxmox.com Git - qemu.git/commit
block: Drain requests in bdrv_close
authorKevin Wolf <kwolf@redhat.com>
Wed, 11 Apr 2012 09:06:37 +0000 (11:06 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 19 Apr 2012 13:48:52 +0000 (15:48 +0200)
commit7094f12f868fc1b75b105bcc676e15964dab77af
treeb5e8acc8d3280beedb9c30d6edf9f9bfac39a29e
parentaafcdcc9ebd72b24bf8686f624ff98bb919de5fd
block: Drain requests in bdrv_close

If an AIO request is in flight that refers to a BlockDriverState that
has been closed and possibly even freed, more or less anything could
happen. I have seen segfaults, -EBADF return values and qcow2 sometimes
actually catches the situation in bdrv_close() and abort()s.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
block.c