aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2022-03-03 20:43:41 +0100
committerHanna Reitz <hreitz@redhat.com>2022-03-07 09:33:30 +0100
commita6426475a75fb793d4c9dd9fe94815e8d18ddaa1 (patch)
tree4d51988de6bc5f7c12b7b927799f68b054595e8f /block
parent84b1e80f67f74a9d505802343458d4ebe8bdb3e4 (diff)
block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()
Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220303194349.2304213-9-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/dirty-bitmap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 9aa5aebaa9..da1b91166f 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -879,6 +879,12 @@ bool bdrv_dirty_bitmap_next_dirty_area(BdrvDirtyBitmap *bitmap,
dirty_start, dirty_count);
}
+bool bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap, int64_t offset,
+ int64_t bytes, int64_t *count)
+{
+ return hbitmap_status(bitmap->bitmap, offset, bytes, count);
+}
+
/**
* bdrv_merge_dirty_bitmap: merge src into dest.
* Ensures permissions on bitmaps are reasonable; use for public API.