All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, fam@euphon.net, vsementsov@virtuozzo.com,
	quintela@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com,
	stefanha@redhat.com,
	Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
	den@openvz.org, jsnow@redhat.com, dgilbert@redhat.com
Subject: [PATCH v4 6/6] migration/block-dirty-bitmap: forbid migration by generated node-name
Date: Fri, 22 May 2020 01:06:48 +0300	[thread overview]
Message-ID: <20200521220648.3255-7-vsementsov@virtuozzo.com> (raw)
In-Reply-To: <20200521220648.3255-1-vsementsov@virtuozzo.com>

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>
---
 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 65f2948f07..71528581e4 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.21.0



  parent reply	other threads:[~2020-05-21 22:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-21 22:06 [PATCH v4 0/6] fix migration with bitmaps and mirror Vladimir Sementsov-Ogievskiy
2020-05-21 22:06 ` [PATCH v4 1/6] migration/block-dirty-bitmap: refactor init_dirty_bitmap_migration Vladimir Sementsov-Ogievskiy
2020-05-21 22:06 ` [PATCH v4 2/6] block/dirty-bitmap: add bdrv_has_named_bitmaps helper Vladimir Sementsov-Ogievskiy
2020-05-21 22:06 ` [PATCH v4 3/6] migration/block-dirty-bitmap: fix bitmaps pre-blockdev migration during mirror job Vladimir Sementsov-Ogievskiy
2020-05-22 12:58   ` Eric Blake
2020-05-21 22:06 ` [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap Vladimir Sementsov-Ogievskiy
2020-06-03  7:52   ` Thomas Huth
2020-06-03  8:06     ` Vladimir Sementsov-Ogievskiy
2020-06-04  7:21       ` Thomas Huth
2020-06-04  7:51         ` Vladimir Sementsov-Ogievskiy
2020-06-04  9:40           ` Thomas Huth
2020-05-21 22:06 ` [PATCH v4 5/6] migration/block-dirty-bitmap: add_bitmaps_to_list: check disk name once Vladimir Sementsov-Ogievskiy
2020-05-21 22:06 ` Vladimir Sementsov-Ogievskiy [this message]
2020-05-22 15:24 ` [PATCH v4 0/6] fix migration with bitmaps and mirror Eric Blake
2020-05-22 16:06   ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200521220648.3255-7-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=andrey.shinkevich@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=dgilbert@redhat.com \
    --cc=fam@euphon.net \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.