On 05/12/2017 08:31 AM, Alexey Perevalov wrote:
> Postcopy total blocktime is available on destination side only.
> But query-migrate was possible only for source. This patch
> adds ability to call query-migrate on destination. To distinguish
> src/dst, state of the MigrationState is using, query-migrate prepares
> MigrationInfo for source machine only in case of migration's state is 
> different
> than MIGRATION_STATUS_NONE.
> 
> To be able to see postcopy blocktime, need to request postcopy-blocktime
> capability.
> 
> The query-migrate command will show following sample result:
> {"return":
>     "postcopy_vcpu_blocktime": [115, 100],
>     "status": "completed",
>     "postcopy_blocktime": 100
> }}
> 
> postcopy_vcpu_blocktime contains list, where the first item is the first
> vCPU in QEMU.
> 
> Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com>
> ---

> +++ b/qapi-schema.json
> @@ -712,6 +712,8 @@
>  #              @status is 'failed'. Clients should not attempt to parse the
>  #              error strings. (Since 2.7)
>  #
> +# @postcopy_vcpu_blocktime: list of the postcopy blocktime per vCPU (Since 
> 2.9)

You've missed 2.9; this should be 2.10.

> +#
>  # Since: 0.14.0
>  ##
>  { 'struct': 'MigrationInfo',
> @@ -723,7 +725,9 @@
>             '*downtime': 'int',
>             '*setup-time': 'int',
>             '*cpu-throttle-percentage': 'int',
> -           '*error-desc': 'str'} }
> +           '*error-desc': 'str',
> +           '*postcopy_blocktime' : 'int64',
> +           '*postcopy_vcpu_blocktime': ['int64']} }

You're adding two fields, but only documented one of them
(postcopy_blocktime needs mention).

New fields should favor names with '-', not '_'; especially when part of
a struct that is already using '-' names.  So these should be
'postcopy-blocktime' and 'postcopy-vcpu-blocktime'.

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