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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability
Date: Wed, 17 May 2017 10:52:11 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

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.


> +++ 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/

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

s/are more flexible/offers more flexibility/

> +#          (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>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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