From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPuSg-0003cz-JE for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:49:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPuSf-0001YQ-9E for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:49:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPuSf-0001YM-0E for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:49:13 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3ACnCIL001058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Apr 2013 08:49:12 -0400 Message-ID: <51655FC7.4070804@redhat.com> Date: Wed, 10 Apr 2013 06:49:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <877gkavlw2.fsf@blackfin.pond.sub.org> <516544C3.2060306@redhat.com> <516559EB.8020005@redhat.com> <20130410084025.5db97979@redhat.com> In-Reply-To: <20130410084025.5db97979@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2CQJQIBXQRWDQDQJUTITE" Subject: Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Pavel Hrdina , Markus Armbruster , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2CQJQIBXQRWDQDQJUTITE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/10/2013 06:40 AM, Luiz Capitulino wrote: > On Wed, 10 Apr 2013 06:24:11 -0600 > Eric Blake wrote: >=20 >>> - If you want to overwrite an existing snapshot, you could specify >>> the 'id' or the 'name' argument or both of them and also you will= >>> have to use the 'force' argument >> >> But the argument made in this thread is that QMP should _not_ have a >> force argument. It should be a flat-out error in QMP to try to create= a >> snapshot with a conflicting name or tag; preferably with a distinct >> error type. Higher-level apps (HMP savevm -f) would try to create; if= >> -f is not specified, the error is good enough; if -f is specified and >> that particular error is returned, then HMP calls delete and then >> re-tries the create. No 'force' argument needed at the QMP layer. >=20 > To avoid adding a new error class, the HMP command could query for the > snapshot name and delete it if it exists before creating the snapshot. Atomic collision detection is nicer than having to pre-query - fewer QMP calls in the common case. But you're right that none of the existing ErrorClass categories fit the idea of "creation refused because name would collide". --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2CQJQIBXQRWDQDQJUTITE 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/ iQEcBAEBCAAGBQJRZV/HAAoJEKeha0olJ0NqvYIIAIXZ90SQqGNcLmTfw3A2A+73 8rb4Xzw7rsaxxV6KXlClgysB1MOc9VtWkoGGp5fTlTuksRRcZha/pNm4LnGOT7d9 ciR5fdxD4WOr8Q+7pujojxSqnEfD9oLN+dqudKNonHO+LFRC3zk7eLi+km5KzUMM t6Ah0c71+3XcLPbKP88YdO785Wtf8gaNMWWBOkRdFquVhLo81QwLCDdhiI7qGYNA AUXoLc7+P88Ap+G2Ts9dbOCPwWLz/mIwgr+7shcht0tduCvBwsplw2nFLh6epGgp pc007QHMh0unCkV4/qIPSaFZNGeWEo4W9VI1V0Gw34715nVXuey1yHnHn6N+kuk= =AMcJ -----END PGP SIGNATURE----- ------enig2CQJQIBXQRWDQDQJUTITE--