diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-01-15 18:26:50 -0500 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2019-01-15 18:26:50 -0500 |
commit | a78a1a48cd1a2e86f23f113bb05e2d3dd8ae0bf6 (patch) | |
tree | 2e2007b9051da3cdab632a4f29af3c8f1e777f3e /block/dirty-bitmap.c | |
parent | fa9c2da29404be9baeb7b8f88fed3cb232688cd9 (diff) |
dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area
The function alters bdrv_dirty_iter_next_area(), which is wrong and
less efficient (see further commit
"block/mirror: fix and improve do_sync_target_write" for description).
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r-- | block/dirty-bitmap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index b162f4ac22..c1518373f9 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -787,6 +787,12 @@ int64_t bdrv_dirty_bitmap_next_zero(BdrvDirtyBitmap *bitmap, uint64_t offset, return hbitmap_next_zero(bitmap->bitmap, offset, bytes); } +bool bdrv_dirty_bitmap_next_dirty_area(BdrvDirtyBitmap *bitmap, + uint64_t *offset, uint64_t *bytes) +{ + return hbitmap_next_dirty_area(bitmap->bitmap, offset, bytes); +} + void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const BdrvDirtyBitmap *src, HBitmap **backup, Error **errp) { |