[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v8 06/10] block: Assert that bdrv_release_dirty_bitm
From: |
John Snow |
Subject: |
[Qemu-block] [PATCH v8 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded |
Date: |
Mon, 1 Aug 2016 20:12:39 -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 v8 00/10] Dirty bitmap changes for migration/persistence work, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 02/10] HBitmap: Introduce "meta" bitmap to track bit changes, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 04/10] block: Support meta dirty bitmap, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 05/10] block: Add two dirty bitmap getters, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded,
John Snow <=
- [Qemu-block] [PATCH v8 07/10] hbitmap: serialization, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 09/10] tests: Add test code for hbitmap serialization, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 08/10] block: BdrvDirtyBitmap serialization interface, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 10/10] block: More operations for meta dirty bitmap, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 01/10] block: Hide HBitmap in block dirty bitmap interface, John Snow, 2016/08/01
- [Qemu-block] [PATCH v8 03/10] tests: Add test code for meta bitmap, John Snow, 2016/08/01
- Re: [Qemu-block] [PATCH v8 00/10] Dirty bitmap changes for migration/persistence work, Max Reitz, 2016/08/03