[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 11/15] block: Assert that bdrv_release_dirty_bitm
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded |
Date: |
Tue, 8 Mar 2016 12:45:02 +0800 |
We use a loop over bs->dirty_bitmaps to make sure the caller is
only releasing a bitmap owned by bs. Let's also assert that in this case
the caller is releasing a bitmap that does exist.
Signed-off-by: Fam Zheng <address@hidden>
---
block/dirty-bitmap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 50bb9e0..295788d 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -305,6 +305,9 @@ static void
bdrv_do_release_matching_dirty_bitmap(BlockDriverState *bs,
}
}
}
+ if (bitmap) {
+ abort();
+ }
}
void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap)
--
2.4.3
- [Qemu-devel] [PATCH v4 06/15] block: Hide HBitmap in block dirty bitmap interface, (continued)
- [Qemu-devel] [PATCH v4 06/15] block: Hide HBitmap in block dirty bitmap interface, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 07/15] HBitmap: Introduce "meta" bitmap to track bit changes, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 08/15] tests: Add test code for meta bitmap, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 09/15] block: Support meta dirty bitmap, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 10/15] block: Add two dirty bitmap getters, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded,
Fam Zheng <=
- [Qemu-devel] [PATCH v4 12/15] hbitmap: serialization, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 13/15] block: BdrvDirtyBitmap serialization interface, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 14/15] tests: Add test code for hbitmap serialization, Fam Zheng, 2016/03/07
- [Qemu-devel] [PATCH v4 15/15] block: More operations for meta dirty bitmap, Fam Zheng, 2016/03/07
- Re: [Qemu-devel] [PATCH v4 00/15] Dirty bitmap changes for migration/persistence work, Max Reitz, 2016/03/11