[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v9 06/10] block: Assert that bdrv_release_dirty_bitm
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH v9 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded |
Date: |
Tue, 4 Oct 2016 18:52:40 -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 860acc9..31d5296 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.7.4
- [Qemu-block] [PATCH v9 00/10] Dirty bitmap changes for migration/persistence work, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 03/10] tests: Add test code for meta bitmap, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 02/10] HBitmap: Introduce "meta" bitmap to track bit changes, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 05/10] block: Add two dirty bitmap getters, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 01/10] block: Hide HBitmap in block dirty bitmap interface, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 08/10] block: BdrvDirtyBitmap serialization interface, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 04/10] block: Support meta dirty bitmap, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded,
John Snow <=
- [Qemu-block] [PATCH v9 10/10] block: More operations for meta dirty bitmap, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 07/10] hbitmap: serialization, John Snow, 2016/10/04
- [Qemu-block] [PATCH v9 09/10] tests: Add test code for hbitmap serialization, John Snow, 2016/10/04