From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4BWs-0000S8-SS for qemu-devel@nongnu.org; Wed, 22 Aug 2012 10:03:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4BWm-000730-Ii for qemu-devel@nongnu.org; Wed, 22 Aug 2012 10:03:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4BWm-00072p-A8 for qemu-devel@nongnu.org; Wed, 22 Aug 2012 10:03:24 -0400 Message-ID: <5034E6A2.7060900@redhat.com> Date: Wed, 22 Aug 2012 08:03:14 -0600 From: Eric Blake MIME-Version: 1.0 References: <1345639535-8822-1-git-send-email-benoit@irqsave.net> <1345639535-8822-2-git-send-email-benoit@irqsave.net> In-Reply-To: <1345639535-8822-2-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig26B595F401A8BBA9AC691173" Subject: Re: [Qemu-devel] [PATCH V4 1/2] qapi: Add SnapshotInfo and ImageInfo. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org, pbonzini@redhat.com, xiawenc@linux.vnet.ibm.com, =?UTF-8?B?QmVub8OudCBDYW5ldA==?= This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26B595F401A8BBA9AC691173 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/22/2012 06:45 AM, Beno=C3=AEt Canet wrote: > Signed-off-by: Benoit Canet > --- > qapi-schema.json | 62 ++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 1 file changed, 62 insertions(+) >=20 > diff --git a/qapi-schema.json b/qapi-schema.json > index a92adb1..4c4b9b9 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -126,6 +126,68 @@ > 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' = ] } > =20 > ## > +# @SnapshotInfo > +# > +# @id: unique snapshot id > +# > +# @name: user choosen name s/choosen/chosen/ > +# > +# @vm-state-size: size of the VM state > +# > +# @date-sec: UTC date of the snapshot > +# > +# @date-nsec: date in nano seconds > +# > +# @vm-clock-nsec: VM clock relative to boot in nano seconds Since we have two fields named *-nsec, it might be worth clarifying that date-nsec is merely the fractional portion to be combined with date-sec (always less than 1000000000), while vm-clock-nsec includes seconds if the drift is that large. For that matter, should we even be exposing things in this manner? I know the internal struct has seconds and nanos separate for date, because it maps to struct timespec; but why can't we combine them into one giant number for JSON? Or are we worried about exceeding int64_t if we take seconds * 1000000000 when dealing with the timestamp the snapshot was created, even though we aren't worried about the VM clock being that far away from boot? > +# > +# Since: 1.2 Probably too late for 1.2, so this should be 1.3. > +## > +# @ImageInfo: > +# > +# Information about a QEMU image file > +# > +# @filename: name of the image file > +# > +# @format: format of the image file > +# > +# @virtual-size: maximum capacity in bytes of the image > +# > +# @actual-size: #optional actual size on disk in bytes of the image That seems backwards - with a raw file, don't you know the actual size, but have no idea what it can further grow to? > +# > +# @dirty-flag: #optional true if image is not cleanly closed > +# > +# @cluster-size: #optional size of a cluster in bytes > +# > +# @encrypted: #optional true if the image is encrypted > +# > +# @backing-filename: #optional name of the backing file > +# > +# @full-backing-filename: #optional full path of the backing file > +# > +# @backing-filename-format: #optional the format of the backing file > +# > +# @snapshots: #optional list of VM snapshots > +# > +# Since: 1.2 Again, 1.3. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig26B595F401A8BBA9AC691173 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQNOajAAoJEKeha0olJ0Nq9p4IAJVq+5Jj077gQLQiHtgKwHCq kYz7L4nD3T1/gQvCCzr8WIVHWAPYaQKfWmIhwYZpdO5nal1TrfL65pxoqkA6qC9D UvVGo2fqKY33h77NDf1y76UZDz4UYCnMtYcLmepjp8uUKIGH1DMsGYfUHhZt3Bl3 /UaswcXfj3c6j5AxG42tbPNHeiDBrktl8CCtRm06a0v7OH4r72h/+yCqVrjIREQZ R+4SC00wMalKiz08K9pX9wsKsGcGJZiZ3Rp5tYK+b6AlOkn6jhu2h8BBUWdIsYj+ DNwZYePc5IPmcAFX2w/ESpxjQkF5J2SSXbxa00jW9oMX50nrkEAIZtIzWhtr+xo= =Kq2m -----END PGP SIGNATURE----- --------------enig26B595F401A8BBA9AC691173--