On 12/11/2014 06:29 PM, Liang Li wrote: > Add the qmp and hmp commands to query the parameters used in live > migration. > > Signed-off-by: Liang Li > Signed-off-by: Yang Zhang > --- > hmp-commands.hx | 2 ++ > hmp.c | 19 +++++++++++++++++++ > hmp.h | 1 + > migration.c | 25 +++++++++++++++++++++++++ > monitor.c | 7 +++++++ > qapi-schema.json | 10 ++++++++++ > qmp-commands.hx | 24 ++++++++++++++++++++++++ > 7 files changed, 88 insertions(+) > > + if (params) { > + monitor_printf(mon, "parameters: "); > + for (p = params; p; p = p->next) { > + monitor_printf(mon, "%s: %d ", > + MigrationParameter_lookup[p->value->parameter], > + (int)p->value->value); Why are you casting to 'int'? I'm worried that this will fail if you ever have a 64-bit parameter, or if we ever have a non-integral parameter. > +++ b/qapi-schema.json > @@ -584,6 +584,16 @@ > { 'command': 'migrate-set-parameters', > 'data': { 'parameters': ['MigrationParameterStatus'] } } > ## > +# @query-migrate-parameters > +# > +# Returns information about the current migration parameters status > +# > +# Returns: @MigrationParametersStatus > +# > +# Since: 2.3 > +## > +{ 'command': 'query-migrate-parameters', 'returns': ['MigrationParameterStatus']} Unusual spacing. Line is longer than 80 columns. > +query-migrate-parameters > +------------------------ > + > +Query current migration parameters > + > +- "parameters": migration parameters value > + - "compress-level" : compress level value (json-int) Is it worth giving the example with all three defined parameters, rather than truncating it to just one? Again, see my comments on 12/13 about possibly squashing these together, and/or using a union to make it obvious that we might support non-integral parameters in the future. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org