Skip to content

Commit 7cb0151

Browse files
Vladimir Sementsov-Ogievskiyebblake
authored andcommitted
migration/block-dirty-bitmap: fix add_bitmaps_to_list
We shouldn't fail when finding an unnamed bitmap in a unnamed node or node with auto-generated node name, as bitmap migration ignores such bitmaps in the first place. Fixes: 82640ed Fixes: 4ff5cc1 Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> [eblake: commit message grammar tweaks] Signed-off-by: Eric Blake <[email protected]>
1 parent 151f76c commit 7cb0151

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

migration/block-dirty-bitmap.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,11 @@ static int add_bitmaps_to_list(BlockDriverState *bs, const char *bs_name)
274274
DirtyBitmapMigBitmapState *dbms;
275275
Error *local_err = NULL;
276276

277-
bitmap = bdrv_dirty_bitmap_first(bs);
277+
FOR_EACH_DIRTY_BITMAP(bs, bitmap) {
278+
if (bdrv_dirty_bitmap_name(bitmap)) {
279+
break;
280+
}
281+
}
278282
if (!bitmap) {
279283
return 0;
280284
}

0 commit comments

Comments
 (0)