[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 01/18] block: ensure bdrv_drain_all() works d
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v6 01/18] block: ensure bdrv_drain_all() works during bdrv_delete() |
Date: |
Wed, 7 Aug 2013 09:42:22 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jul 25, 2013 at 05:18:08PM +0200, Stefan Hajnoczi wrote:
> In bdrv_delete() make sure to call bdrv_make_anon() *after* bdrv_close()
> so that the device is still seen by bdrv_drain_all() when iterating
> bdrv_states.
>
> Cc: address@hidden
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> block.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block.c b/block.c
> index 6cd39fa..9d68270 100644
> --- a/block.c
> +++ b/block.c
> @@ -1600,11 +1600,11 @@ void bdrv_delete(BlockDriverState *bs)
> assert(!bs->job);
> assert(!bs->in_use);
>
> + bdrv_close(bs);
> +
> /* remove from list, if necessary */
> bdrv_make_anon(bs);
>
> - bdrv_close(bs);
> -
> g_free(bs);
> }
Kevin: Although I haven't seen reports of this bug, it might be a good
idea to merge this single patch for QEMU 1.6.
Stefan