aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@openvz.org>2022-05-17 14:12:06 +0300
committerKevin Wolf <kwolf@redhat.com>2022-06-24 17:07:06 +0200
commit618af89e559daf897cc5013d3476a9c41ee76e00 (patch)
treeb3512de6b37340f2d9aa171f2270cbd2f6114ed4 /include/block
parent58cbfbdf73d1d20ba9506b1260a4cb321adad47d (diff)
downloadqemu-618af89e559daf897cc5013d3476a9c41ee76e00.zip
qemu-618af89e559daf897cc5013d3476a9c41ee76e00.tar.gz
qemu-618af89e559daf897cc5013d3476a9c41ee76e00.tar.bz2
block: simplify handling of try to merge different sized bitmaps
We have too much logic to simply check that bitmaps are of the same size. Let's just define that hbitmap_merge() and bdrv_dirty_bitmap_merge_internal() require their argument bitmaps be of same size, this simplifies things. Let's look through the callers: For backup_init_bcs_bitmap() we already assert that merge can't fail. In bdrv_reclaim_dirty_bitmap_locked() we gracefully handle the error that can't happen: successor always has same size as its parent, drop this logic. In bdrv_merge_dirty_bitmap() we already has assertion and separate check. Make the check explicit and improve error message. Signed-off-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru> Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20220517111206.23585-4-v.sementsov-og@mail.ru> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int-io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index bb45420..ded29e7 100644
--- a/include/block/block_int-io.h
+++ b/include/block/block_int-io.h
@@ -102,7 +102,7 @@ bool blk_dev_is_tray_open(BlockBackend *blk);
void bdrv_set_dirty(BlockDriverState *bs, int64_t offset, int64_t bytes);
void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out);
-bool bdrv_dirty_bitmap_merge_internal(BdrvDirtyBitmap *dest,
+void bdrv_dirty_bitmap_merge_internal(BdrvDirtyBitmap *dest,
const BdrvDirtyBitmap *src,
HBitmap **backup, bool lock);