[Top][All Lists]

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

[Qemu-block] [PATCH v6 06/10] block: Assert that bdrv_release_dirty_bitm

From: John Snow
Subject: [Qemu-block] [PATCH v6 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded
Date: Fri, 15 Jul 2016 16:27:37 -0400

From: Fam Zheng <address@hidden>

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>
Reviewed-by: Max Reitz <address@hidden>
Signed-off-by: John Snow <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 a71c9b7..39e072a 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)

reply via email to

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