On 07/25/2012 08:50 AM, Orit Wasserman wrote: > Signed-off-by: Benoit Hudzia <benoit.hud...@sap.com> > Signed-off-by: Petter Svard <pett...@cs.umu.se> > Signed-off-by: Aidan Shribman <aidan.shrib...@sap.com> > Signed-off-by: Orit Wasserman <owass...@redhat.com> > Signed-off-by: Juan Quintela <quint...@redhat.com> > --- > +++ b/qapi-schema.json > @@ -264,11 +264,15 @@ > # migration has ended, it returns the total migration > # time. (since 1.2) > # > -# Since: 0.14.0. > +# @duplicate: #optional, number of duplicate pages (since 1.2)
I think I was the one that originally asked whether #optional was appropriate for back-compat reasons when adding to a struct, but Luis has since corrected me - #optional only makes sense for a return member that will not appear in all uses of the struct in the current version. But the number of duplicates is always available (even if it is 0), so it should not be optional. That is, this line should be: # @duplicate: number of duplicate pages (since 1.2) > +# > +# @normal : #optional, number of normal pages (since 1.2) Likewise. > +# > +# Since: 0.14.0 > ## > { 'type': 'MigrationStats', > 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , > - 'total_time': 'int' } } > + 'total_time': 'int', '*duplicate': 'int', '*normal': 'int' } } and this should be 'duplicate' and 'normal'. > +++ b/qmp-commands.hx > @@ -2099,6 +2099,8 @@ The main json-object contains the following: > - "transferred": amount transferred (json-int) > - "remaining": amount remaining (json-int) > - "total": total (json-int) > + - "duplicate": number of duplicated pages (json-int) > + - "normal" : number of normal pages transferred (json-int) > - "disk": only present if "status" is "active" and it is a block migration, > it is a json-object with the following disk information (in bytes): > - "transferred": amount transferred (json-int) > Incomplete if we decide that 'duplicate' and 'normal' are not optional; we should be updating example 4 and 5 to list the new fields. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature