qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, dgilbert@redhat.com, lvivier@redhat.com,
	peterx@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability
Date: Wed, 17 May 2017 19:02:07 +0200	[thread overview]
Message-ID: <87k25fbenk.fsf@secure.mitica> (raw)
In-Reply-To: <2c957f44-3318-0f99-6f6e-936df2bce154@redhat.com> (Eric Blake's message of "Wed, 17 May 2017 10:52:11 -0500")

Eric Blake <eblake@redhat.com> wrote:
> On 05/17/2017 10:38 AM, Juan Quintela wrote:
>> Create one capability for block migration and one parameter for
>> incremental block migration.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> 
>> ---
>> 
>> @@ -1207,6 +1242,26 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>>          return;
>>      }
>>  
>> +    if (((has_blk && blk) || (has_inc && inc))
>> +        && (migrate_use_block() || migrate_use_block_incremental())) {
>> +        error_setg(errp, "Command options are incompatible with current "
>> +                   "migration capabilities");
>> +        return;
>> +    }
>> +
>> +    if ((has_blk && blk) || (has_inc & inc)) {
>> +        migrate_set_block_enabled(true, &local_err);
>> +        if (local_err) {
>> +            error_propagate(errp, local_err);
>> +            return;
>> +        }
>> +        s->must_remove_block_options = true;
>> +    }
>
> You wrote:
> if (A && B) {
>   error;
> }
> if (A) {
>   stuff;
> }
>
> I might have done:
>
> if (A) {
>   if (B) {
>     error;
>   }
>   stuff;
> }
>
> but it's the same either way.

One less line, and as I have to respin due to the last patch.

>> +++ b/qapi-schema.json
>> @@ -894,11 +894,18 @@
>>  # @release-ram: if enabled, qemu will free the migrated ram pages on the source
>>  #        during postcopy-ram migration. (since 2.9)
>>  #
>> +# @block: If enabled, QEMU will also migrate the contents of all block
>> +#          devices.  Default is disabled.  A possible alternative are
>
> s/are/uses/

done

>> +#          mirror jobs to a builtin NBD server on the destination, which
>> +#          are more flexible.
>
> s/are more flexible/offers more flexibility/

done

>> +#          (Since 2.10)
>> +#
>>  # Since: 1.2
>>  ##
>>  { 'enum': 'MigrationCapability',
>>    'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
>> -           'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram'] }
>> +           'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
>> +           'block' ] }
>>  
>
> The grammar touchups can be done in preparing the pull request, if there
> is no other reason for a respin.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks, Juan.

  reply	other threads:[~2017-05-17 17:02 UTC|newest]

Thread overview: 25+ 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 [this message]
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
  -- 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 2/5] migration: Create block capability Juan Quintela
2017-05-18 14:49   ` Eric Blake
2017-05-19  9:20   ` Markus Armbruster
2017-05-16 11:11 [Qemu-devel] [PATCH v4 0/5] Remove old MigrationParams Juan Quintela
2017-05-16 11:11 ` [Qemu-devel] [PATCH 2/5] migration: Create block capability Juan Quintela
2017-05-16 14:20   ` Markus Armbruster
2017-05-16 14:34     ` Juan Quintela
2017-05-16 16:00       ` Markus Armbruster
2017-05-16 16:08         ` Eric Blake
2017-05-16 16:42           ` Markus Armbruster
2017-05-16 16:48             ` Eric Blake
2017-05-16 17:07               ` Markus Armbruster
2017-05-16 17:37               ` 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=87k25fbenk.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).