From: Max Reitz <mreitz@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-block@nongnu.org
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
Juan Quintela <quintela@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Peter Krempa <pkrempa@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [RFC v2] migration: Add migrate-set-bitmap-node-mapping
Date: Thu, 14 May 2020 09:13:48 +0200 [thread overview]
Message-ID: <5454a628-0c6c-086c-c398-b5b3a8c6ec5b@redhat.com> (raw)
In-Reply-To: <0270abbd-3fa7-dcca-bbf5-80dd0fad1733@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2454 bytes --]
On 13.05.20 18:11, Eric Blake wrote:
> On 5/13/20 9:56 AM, Max Reitz wrote:
>> This command allows mapping block node names to aliases for the purpose
>> of block dirty bitmap migration.
>>
>> This way, management tools can use different node names on the source
>> and destination and pass the mapping of how bitmaps are to be
>> transferred to qemu (on the source, the destination, or even both with
>> arbitrary aliases in the migration stream).
>>
>> Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>
>> @@ -713,6 +731,44 @@ static bool dirty_bitmap_has_postcopy(void *opaque)
>> return true;
>> }
>> +void
>> qmp_migrate_set_bitmap_node_mapping(MigrationBlockNodeMappingList
>> *mapping,
>> + Error **errp)
>> +{
>> + QDict *in_mapping = qdict_new();
>> + QDict *out_mapping = qdict_new();
>> +
>> + for (; mapping; mapping = mapping->next) {
>> + MigrationBlockNodeMapping *entry = mapping->value;
>> +
>> + if (qdict_haskey(out_mapping, entry->node_name)) {
>> + error_setg(errp, "Cannot map node name '%s' twice",
>> + entry->node_name);
>> + goto fail;
>> + }
>
> Can we call this command more than once? Is it cumulative (call it once
> to set mapping for "a", second time to also set mapping for "b"), or
> should it reset (second call wipes out all mappings from first call, any
> mappings that must exist must be passed in the final call)?
I tried to make it clear in the documentation:
> +# @mapping: The mapping; must be one-to-one, but not necessarily
> +# complete. Any mapping not given will be reset to the
> +# default (i.e. the identity mapping).
So everything that isn’t set in the second call is reset. I thought
about what you proposed (because I guess that’s the most intuitive
idea), but after consideration I didn’t see why we’d need different
behavior, so it would only serve to make the code more complicated.
Max
> The idea makes sense, and the interface seems usable. It's nice that
> either source, destination, or both sides of migration can use it (which
> helps in upgrade vs. downgrade scenarios).
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-05-14 7:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 14:56 [RFC v2] migration: Add migrate-set-bitmap-node-mapping Max Reitz
2020-05-13 16:11 ` Eric Blake
2020-05-14 7:13 ` Max Reitz [this message]
2020-05-14 11:07 ` Kevin Wolf
2020-05-13 20:09 ` Vladimir Sementsov-Ogievskiy
2020-05-14 7:42 ` Max Reitz
2020-05-14 9:09 ` Max Reitz
2020-05-14 10:58 ` Vladimir Sementsov-Ogievskiy
2020-05-14 11:04 ` Kevin Wolf
2020-05-14 8:42 ` Dr. David Alan Gilbert
2020-05-14 9:08 ` Max Reitz
2020-05-14 9:32 ` Dr. David Alan Gilbert
2020-05-18 16:26 ` Peter Krempa
2020-05-18 17:52 ` Vladimir Sementsov-Ogievskiy
2020-05-18 18:20 ` Peter Krempa
2020-05-18 18:47 ` Vladimir Sementsov-Ogievskiy
2020-06-02 10:56 ` Max Reitz
2020-06-02 11:12 ` Peter Krempa
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=5454a628-0c6c-086c-c398-b5b3a8c6ec5b@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=pkrempa@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=vsementsov@virtuozzo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).