[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/11] migration: forbid bitmap migration by generated node-name
From: |
Eric Blake |
Subject: |
[PULL 06/11] migration: forbid bitmap migration by generated node-name |
Date: |
Tue, 26 May 2020 11:42:06 -0500 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
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 <address@hidden>
Reviewed-by: Andrey Shinkevich <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
[eblake: shorter subject line]
Signed-off-by: Eric Blake <address@hidden>
---
migration/block-dirty-bitmap.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c
index 7be1644b330a..47bc0f650c1e 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;
--
2.26.2
- [PULL 00/11] bitmaps patches for 2020-05-26, Eric Blake, 2020/05/26
- [PULL 01/11] migration: refactor init_dirty_bitmap_migration, Eric Blake, 2020/05/26
- [PULL 02/11] block/dirty-bitmap: add bdrv_has_named_bitmaps helper, Eric Blake, 2020/05/26
- [PULL 03/11] migration: fix bitmaps pre-blockdev migration with mirror job, Eric Blake, 2020/05/26
- [PULL 05/11] migration: add_bitmaps_to_list: check disk name once, Eric Blake, 2020/05/26
- [PULL 06/11] migration: forbid bitmap migration by generated node-name,
Eric Blake <=
- [PULL 04/11] iotests: 194: test also migration of dirty bitmap, Eric Blake, 2020/05/26
- [PULL 08/11] qcow2: Expose bitmaps' size during measure, Eric Blake, 2020/05/26
- [PULL 07/11] iotests: Fix test 178, Eric Blake, 2020/05/26
- [PULL 09/11] qemu-img: Factor out code for merging bitmaps, Eric Blake, 2020/05/26
- [PULL 10/11] qemu-img: Add convert --bitmaps option, Eric Blake, 2020/05/26
- [PULL 11/11] iotests: Add test 291 to for qemu-img bitmap coverage, Eric Blake, 2020/05/26
- Re: [PULL 00/11] bitmaps patches for 2020-05-26, Peter Maydell, 2020/05/27