summaryrefslogtreecommitdiffstats
path: root/migration/block-dirty-bitmap.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2020-05-22 00:06:48 +0200
committerEric Blake2020-05-28 20:15:22 +0200
commit4ff5cc121b089d8b16fa3da1e44feababcd1f815 (patch)
treedd492e6f495a0b092dc35dd681af497f037ae487 /migration/block-dirty-bitmap.c
parentmigration: add_bitmaps_to_list: check disk name once (diff)
downloadqemu-4ff5cc121b089d8b16fa3da1e44feababcd1f815.tar.gz
qemu-4ff5cc121b089d8b16fa3da1e44feababcd1f815.tar.xz
qemu-4ff5cc121b089d8b16fa3da1e44feababcd1f815.zip
migration: forbid bitmap migration by generated node-name
It actually never worked with libvirt, as auto-generated names are different on source and destination. It's unsafe and useless to migrate by auto-generated node-names, so let's forbid it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200521220648.3255-7-vsementsov@virtuozzo.com> [eblake: shorter subject line] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'migration/block-dirty-bitmap.c')
-rw-r--r--migration/block-dirty-bitmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index 7be1644b33..47bc0f650c 100644
--- a/migration/block-dirty-bitmap.c
+++ b/migration/block-dirty-bitmap.c
@@ -285,6 +285,13 @@ static int add_bitmaps_to_list(BlockDriverState *bs, const char *bs_name)
return -1;
}
+ if (bs_name[0] == '#') {
+ error_report("Bitmap '%s' in a node with auto-generated "
+ "name '%s' can't be migrated",
+ bdrv_dirty_bitmap_name(bitmap), bs_name);
+ return -1;
+ }
+
FOR_EACH_DIRTY_BITMAP(bs, bitmap) {
if (!bdrv_dirty_bitmap_name(bitmap)) {
continue;