qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/13] block: Assert that bdrv_release_dirty_bit


From: John Snow
Subject: Re: [Qemu-devel] [PATCH 10/13] block: Assert that bdrv_release_dirty_bitmap succeeded
Date: Thu, 7 Jan 2016 14:38:51 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 01/04/2016 05:27 AM, Fam Zheng wrote:
> This makes sure we don't leak a dirty bitmap in any case.
> 
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block/dirty-bitmap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 9cac794..60ee965 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -297,6 +297,7 @@ void bdrv_release_dirty_bitmap(BlockDriverState *bs, 
> BdrvDirtyBitmap *bitmap)
>              return;
>          }
>      }
> +    abort();
>  }
>  
>  void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap)
> 

Before this patch: release can be called on a (BDS, BITMAP) pair in
cases where the bitmap does not belong to the BDS and this function just
ignored it.

After this patch: We abort() in cases where we get this pairing incorrect.

I don't think there is any reason to ever get this wrong on a call to
this function, so this is alright.

Reviewed-by: John Snow <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]