[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 10/15] block: Add two dirty bitmap getters
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 10/15] block: Add two dirty bitmap getters |
Date: |
Tue, 8 Mar 2016 12:45:01 +0800 |
For dirty bitmap users to get the size and the name of a
BdrvDirtyBitmap.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: John Snow <address@hidden>
---
block/dirty-bitmap.c | 10 ++++++++++
include/block/dirty-bitmap.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index a2413c0..50bb9e0 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -154,6 +154,16 @@ void bdrv_dirty_bitmap_reset_meta(BlockDriverState *bs,
hbitmap_reset(bitmap->meta, sector, nb_sectors);
}
+int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap)
+{
+ return bitmap->size;
+}
+
+const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap)
+{
+ return bitmap->name;
+}
+
bool bdrv_dirty_bitmap_frozen(BdrvDirtyBitmap *bitmap)
{
return bitmap->successor;
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 50e0fca..caa4d82 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -32,6 +32,8 @@ uint32_t bdrv_get_default_bitmap_granularity(BlockDriverState
*bs);
uint32_t bdrv_dirty_bitmap_granularity(BdrvDirtyBitmap *bitmap);
bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap);
bool bdrv_dirty_bitmap_frozen(BdrvDirtyBitmap *bitmap);
+const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap);
+int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap);
DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap);
int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap,
int64_t sector);
--
2.4.3
- [Qemu-devel] [PATCH v4 04/15] block: Move block dirty bitmap code to separate files, (continued)
- [Qemu-devel] [PATCH v4 04/15] block: Move block dirty bitmap code to separate files, Fam Zheng, 2016/03/07
- [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 <=
- [Qemu-devel] [PATCH v4 11/15] block: Assert that bdrv_release_dirty_bitmap succeeded, Fam Zheng, 2016/03/07
- [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