diff options
author | Fam Zheng <famz@redhat.com> | 2016-10-13 17:58:25 -0400 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-10-24 17:56:07 +0200 |
commit | 15891fac7dd0300f94cca081cfef51b074cb988b (patch) | |
tree | c4f3f209f7861a8d8f3baa799a4b7ee8b9fc9023 /block | |
parent | fb933437de327a9a322d4c2473d0c23aa8d9a267 (diff) | |
download | qemu-15891fac7dd0300f94cca081cfef51b074cb988b.tar.gz qemu-15891fac7dd0300f94cca081cfef51b074cb988b.tar.bz2 qemu-15891fac7dd0300f94cca081cfef51b074cb988b.zip |
block: Add two dirty bitmap getters
For dirty bitmap users to get the size and the name of a
BdrvDirtyBitmap.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1476395910-8697-6-git-send-email-jsnow@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/dirty-bitmap.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 9c6febbcb7..860acc9b5b 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; |