diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2020-06-26 16:06:58 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2020-07-17 08:18:51 -0500 |
commit | 7cb015197b383a62f5729d2c92b1050db0185c1c (patch) | |
tree | 46b7008dfdf7bdde3c2a9fa3d6b78771b0ea0574 /migration | |
parent | 151f76c689b1ff4c2c59e6d8469a0d4fe5346f55 (diff) |
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: 82640edb88faa
Fixes: 4ff5cc121b089
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200626130658.76498-1-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: commit message grammar tweaks]
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/block-dirty-bitmap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 47bc0f650c..b0dbf9eeed 100644 --- a/migration/block-dirty-bitmap.c +++ b/migration/block-dirty-bitmap.c @@ -274,7 +274,11 @@ static int add_bitmaps_to_list(BlockDriverState *bs, const char *bs_name) DirtyBitmapMigBitmapState *dbms; Error *local_err = NULL; - bitmap = bdrv_dirty_bitmap_first(bs); + FOR_EACH_DIRTY_BITMAP(bs, bitmap) { + if (bdrv_dirty_bitmap_name(bitmap)) { + break; + } + } if (!bitmap) { return 0; } |