From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnnCq-0007Vi-NC for qemu-devel@nongnu.org; Sat, 15 Jun 2013 05:55:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnnCp-0008Ii-KF for qemu-devel@nongnu.org; Sat, 15 Jun 2013 05:55:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnnCp-0008Ic-C5 for qemu-devel@nongnu.org; Sat, 15 Jun 2013 05:55:35 -0400 Message-ID: <51BC3A10.6040001@redhat.com> Date: Sat, 15 Jun 2013 10:55:28 +0100 From: Eric Blake MIME-Version: 1.0 References: <1371209999-15579-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1371209999-15579-10-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1371209999-15579-10-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2DXIDFUAWPHRLMKIMBLLV" Subject: Re: [Qemu-devel] [PATCH V2 09/12] qmp: add interface blockdev-snapshot-delete-internal-sync List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, phrdina@redhat.com, famz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, stefanha@redhat.com, pbonzini@redhat.com, dietmar@proxmox.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2DXIDFUAWPHRLMKIMBLLV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/14/2013 12:39 PM, Wenchao Xia wrote: > Snapshot ID can't be specified in this interface. Why not? If it is possible to look up by id in isolation, then it should be possible to delete by id in isolation. Also, if it is possible to create a snapshot that has an id but no name (and I think qcow2 allows such snapshots, even if we don't want to expose that corner case of creation via normal QMP), then it is mandatory to have a way to delete by id, since there is no name to delete by. >=20 > Signed-off-by: Wenchao Xia > --- > blockdev.c | 12 ++++++++++++ > qapi-schema.json | 19 +++++++++++++++++++ > qmp-commands.hx | 30 ++++++++++++++++++++++++++++++ > 3 files changed, 61 insertions(+), 0 deletions(-) >=20 > +++ b/qapi-schema.json > @@ -1712,6 +1712,25 @@ > 'data': { 'device': 'str', '*name': 'str'} } > =20 > ## > +# @blockdev-snapshot-delete-internal-sync > +# > +# Synchronously delete an internal snapshot of a block device, when th= e format > +# of the image used support it. Should this command be made available via 'transaction'? That is, if I have a two-disk VM, and use 'transaction' to take a snapshot of both disks at once, shouldn't I also have a way to delete the snapshots of both at once, or gracefully fail without data loss if the second one has problems? > +# > +# @device: the name of the device to delete the snapshot from > +# > +# @name: the snapshot's name to be deleted > +# > +# Returns: nothing on success > +# If @device is not a valid block device, DeviceNotFound > +# If snapshot not found, generic error will be returned > +# > +# Since 1.6 > +## > +{ 'command': 'blockdev-snapshot-delete-internal-sync', > + 'data': { 'device': 'str', 'name': 'str'} } I'm not convinced that this interface is powerful enough. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2DXIDFUAWPHRLMKIMBLLV 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRvDoQAAoJEKeha0olJ0NqtDIH/3ftWrGDuwxX7NoJZ629DIit g/zrSoN23BWwQ1XGlhdjC4/Lel+SfG1b620oEe5tEfZcxU6/cgQejE/92oytGMjt YHWmPPLScxzRxx4m76Ei6ZpYPCeQWiT5zkwX5XThWB8m2ufKi03zwBKgQmCsf9Sz mPKWtIGvrxvj8cO6vwYlffrxENF/EBx5CpXxkYdnHjs+x4jOIE6lFCtJttSvCJ3S T4UdWmqYULkwKChDT97uqLM83AgHR22k8UpjamdqAFXV6gwld8WTzmJkAlkoFs/m JdOOSgavg6ibQprW7FzSVeGtNMRUwqGffvBtcq2NzmR/B85cBl3PR4MEYwGoFC0= =tQuP -----END PGP SIGNATURE----- ------enig2DXIDFUAWPHRLMKIMBLLV--