diff options
author | Vladimir Sementsov-Ogievskiy | 2020-06-26 15:06:58 +0200 |
---|---|---|
committer | Eric Blake | 2020-07-17 15:18:51 +0200 |
commit | 7cb015197b383a62f5729d2c92b1050db0185c1c (patch) | |
tree | 46b7008dfdf7bdde3c2a9fa3d6b78771b0ea0574 /migration | |
parent | Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' in... (diff) | |
download | qemu-7cb015197b383a62f5729d2c92b1050db0185c1c.tar.gz qemu-7cb015197b383a62f5729d2c92b1050db0185c1c.tar.xz qemu-7cb015197b383a62f5729d2c92b1050db0185c1c.zip |
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; } |