diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-01-15 18:26:49 -0500 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2019-01-15 18:26:49 -0500 |
commit | 76d570dc495c56bbdcc4574bfc6d512dcb8e9aa9 (patch) | |
tree | 80b114f05c7c9f30dcd1655cfa50c1f1330572d2 /block/dirty-bitmap.c | |
parent | 4b9f0b0f7c84eea2dfb0d5be3e0254bc91319dbc (diff) |
dirty-bitmap: improve bdrv_dirty_bitmap_next_zero
Add bytes parameter to the function, to limit searched range.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r-- | block/dirty-bitmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 6b688394e4..b162f4ac22 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -781,9 +781,10 @@ char *bdrv_dirty_bitmap_sha256(const BdrvDirtyBitmap *bitmap, Error **errp) return hbitmap_sha256(bitmap->bitmap, errp); } -int64_t bdrv_dirty_bitmap_next_zero(BdrvDirtyBitmap *bitmap, uint64_t offset) +int64_t bdrv_dirty_bitmap_next_zero(BdrvDirtyBitmap *bitmap, uint64_t offset, + uint64_t bytes) { - return hbitmap_next_zero(bitmap->bitmap, offset); + return hbitmap_next_zero(bitmap->bitmap, offset, bytes); } void bdrv_merge_dirty_bitmap(BdrvDirtyBitmap *dest, const BdrvDirtyBitmap *src, |