Vladimir Sementsov-Ogievskiy 618af89e55 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>
2022-06-24 17:07:06 +02:00
..
2022-05-03 15:16:21 +04:00
2022-04-28 08:51:56 +02:00
2022-03-04 08:50:41 -10:00
2020-12-10 12:15:18 -05:00
2020-10-15 16:06:27 +02:00
2022-03-15 13:57:44 +08:00
2022-04-20 10:51:11 -07:00
2020-12-10 17:16:44 +01:00
2022-04-21 17:03:51 +04:00
2022-03-04 18:14:40 +01:00
2021-04-01 15:27:44 +04:00