qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability
Date: Wed, 17 May 2017 19:02:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Eric Blake <address@hidden> 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 <address@hidden>
>> 
>> ---
>> 
>> @@ -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 <address@hidden>

Thanks, Juan.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]