Il 11/04/2012 12:40, Kevin Wolf ha scritto:
> @@ -816,6 +816,8 @@ void bdrv_close(BlockDriverState *bs)
> if (bs->job) {
> block_job_cancel_sync(bs->job);
> }
> +bdrv_drain_all();
Actually the bdrv_drain_all needs to go first.
This is because block_job_cance
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