[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 10/13] block: Assert that bdrv_rele
From: |
John Snow |
Subject: |
Re: [Qemu-block] [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>
- Re: [Qemu-block] [Qemu-devel] [PATCH 06/13] HBitmap: Introduce "meta" bitmap to track bit changes, (continued)
- [Qemu-block] [PATCH 09/13] block: Add two dirty bitmap getters, Fam Zheng, 2016/01/04
- [Qemu-block] [PATCH 10/13] block: Assert that bdrv_release_dirty_bitmap succeeded, Fam Zheng, 2016/01/04
- Re: [Qemu-block] [Qemu-devel] [PATCH 10/13] block: Assert that bdrv_release_dirty_bitmap succeeded,
John Snow <=
- [Qemu-block] [PATCH 11/13] hbitmap: serialization, Fam Zheng, 2016/01/04
- [Qemu-block] [PATCH 12/13] block: BdrvDirtyBitmap serialization interface, Fam Zheng, 2016/01/04
- [Qemu-block] [PATCH 13/13] tests: Add test code for hbitmap serialization, Fam Zheng, 2016/01/04
- Re: [Qemu-block] [Qemu-devel] [PATCH 00/13] Dirty bitmap changes for migration/persistence work, John Snow, 2016/01/07