From: Eric Blake <eblake@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com,
armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable
Date: Wed, 17 May 2017 11:01:39 -0500 [thread overview]
Message-ID: <8d6af160-aba9-c73d-90fb-5e0433638244@redhat.com> (raw)
In-Reply-To: <20170517153812.21993-6-quintela@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]
On 05/17/2017 10:38 AM, Juan Quintela wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Many users now prefer to use drive_mirror over NBD as an
> alternative to the older migrate -b option; drive_mirror is
> more complex to setup but gives you more options (e.g. only
> migrating some of the disks if some of them are shared).
>
> Allow the large chunk of block migration code to be compiled
> out for those who don't use it.
>
> Based on a downstream-patch we've had for a while by Jeff Cody.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> configure | 11 +++++++++++
> include/migration/block.h | 24 +++++++++++++++++++++++-
> migration/Makefile.objs | 2 +-
> migration/migration.c | 13 +++++++++++++
> 4 files changed, 48 insertions(+), 2 deletions(-)
> @@ -763,6 +768,14 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params,
> }
>
> for (cap = params; cap; cap = cap->next) {
> +#ifndef CONFIG_LIVE_BLOCK_MIGRATION
> + if (cap->value->capability == MIGRATION_CAPABILITY_BLOCK) {
> + error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i) "
> + "block migration");
> + error_append_hint(errp, "Use drive_mirror+NBD instead.\n");
> + continue;
> + }
> +#endif
If I'm not mistaken, this will cause an unconditional error even if I do
the QMP { "command":"migrate", "arguments":{"uri":"...", "blk":false} }
Wouldn't it be better to make the conditional:
if (cap->value->capability == MIGRATION_CAPABILITY_BLOCK &&
cap->value->state) {
so that I can pass an explicit false, and the error only happens when
trying to set the optional parameter to true? I ask, because libvirt
(currently) ALWAYS passes the "inc" and "blk" QMP parameters, but
generally to an explicit false when it uses NBD+mirror.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-05-17 16:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 15:38 [Qemu-devel] [PATCH v5 0/5] Remove old MigrationParams Juan Quintela
2017-05-17 15:38 ` [Qemu-devel] [PATCH 1/5] hmp: Use visitor api for hmp_migrate_set_parameter() Juan Quintela
2017-05-17 15:38 ` [Qemu-devel] [PATCH 2/5] migration: Create block capability Juan Quintela
2017-05-17 15:52 ` Eric Blake
2017-05-17 17:02 ` Juan Quintela
2017-05-17 15:38 ` [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams Juan Quintela
2017-05-17 15:54 ` Eric Blake
2017-05-17 16:18 ` Juan Quintela
2017-05-24 12:28 ` Markus Armbruster
2017-05-24 12:44 ` Markus Armbruster
2017-05-17 15:38 ` [Qemu-devel] [PATCH 4/5] migration: Remove " Juan Quintela
2017-05-17 15:38 ` [Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable Juan Quintela
2017-05-17 16:01 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-18 11:18 [Qemu-devel] [PATCH 0/5] Remove old MigrationParams Juan Quintela
2017-05-18 11:18 ` [Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable Juan Quintela
2017-05-18 12:19 ` Dr. David Alan Gilbert
2017-05-18 13:08 ` Juan Quintela
2017-05-18 14:50 ` Eric Blake
2017-05-16 11:11 [Qemu-devel] [PATCH v4 0/5] Remove old MigrationParams Juan Quintela
2017-05-16 11:11 ` [Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable Juan Quintela
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=8d6af160-aba9-c73d-90fb-5e0433638244@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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 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).