From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4d9b-00074f-J4 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:01:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4d9Z-0005wG-JD for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:01:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4d9Z-0005vn-AZ for qemu-devel@nongnu.org; Mon, 05 Mar 2012 14:01:01 -0500 Message-ID: <4F550C34.90005@redhat.com> Date: Mon, 05 Mar 2012 11:55:48 -0700 From: Eric Blake MIME-Version: 1.0 References: <1330968842-24635-1-git-send-email-pbonzini@redhat.com> <1330968842-24635-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1330968842-24635-6-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE74D63FBFB3905A570BCF855" Subject: Re: [Qemu-devel] [PATCH v3 5/8] qmp: convert blockdev-snapshot-sync to a wrapper around transactions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, fsimonce@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE74D63FBFB3905A570BCF855 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/05/2012 10:33 AM, Paolo Bonzini wrote: > Simplify the blockdev-snapshot-sync code and gain failsafe operation > by turning it into a wrapper around the new transaction command. A new= > option is also added matching "mode". >=20 > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 81 ++++++++++++----------------------------------= ------- > hmp-commands.hx | 9 ++++-- > hmp.c | 6 +++- > qapi-schema.json | 15 +++++---- > qmp-commands.hx | 2 + > 5 files changed, 40 insertions(+), 73 deletions(-) >=20 > +++ b/qapi-schema.json > @@ -1143,6 +1143,9 @@ > # @snapshot-file: the target of the new image. A new file will be crea= ted. > # > # @format: #optional the format of the snapshot image, default is 'qco= w2'. > +# > +# @mode: #optional whether and how QEMU should create a new image, def= ault is > +# 'absolute-paths'. > ## > { 'type': 'BlockdevSnapshot', > 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',= > @@ -1199,21 +1202,19 @@ > # > # @format: #optional the format of the snapshot image, default is 'qco= w2'. > # > +# @mode: #optional whether and how QEMU should create a new image, def= ault is > +# 'absolute-paths'. Right now, libvirt has an API virDomainSnapshotCreateXML with a flag VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT, which should map to this new mode operand. Am I guaranteed that if I pass a 'mode' argument of 'existing' to an older qemu that lacked mode, I will get a sane error? If so, then this rewrite looks fine from libvirt's point of view. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigE74D63FBFB3905A570BCF855 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/ iQEcBAEBCAAGBQJPVQw0AAoJEKeha0olJ0NqTD4IAJL9hxmrgSBZ2Btt3bbxS46/ 1wL59xB3aLeM8H/fIyH6jOCqyaJozIq2/iXU4uGslKBNK5z2i8Z5oRTy3ZpStLr1 IaKmpzMyrKkQ7nDlr2Kb7Fp85WfBR7SNkw67TmN22TibOcT8rYc3hjuWFUAvSK1/ +XizwbyNtuuDGpqaUjOwcBIPg6L+KcBt43C/8jfWwBC+VDvkPYK7y12hHCQrNXcl BKDOR7OJERhJTDNq/p3xlU7evFsBavxfX17DuRYnbrKi4J17tRuPU7CbICyA76JH i2NcLZaY3FpEovzrmCG7JE8PPvUtVnnetDBJMoC1yJv8DEt50QfsKBDRTMk2Nz4= =V3fa -----END PGP SIGNATURE----- --------------enigE74D63FBFB3905A570BCF855--