From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoMXZ-0007Zj-Fu for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:11:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoMXV-0006QM-0F for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:11:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoMXU-0006QD-NH for qemu-devel@nongnu.org; Wed, 04 Dec 2013 19:11:32 -0500 Message-ID: <529FC4AE.6000906@redhat.com> Date: Wed, 04 Dec 2013 17:11:26 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386077165-19577-1-git-send-email-benoit@irqsave.net> <1386077165-19577-8-git-send-email-benoit@irqsave.net> In-Reply-To: <1386077165-19577-8-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wONO9ppO3DJtEsXVB8XRVR8Vfr3xjNBDX" Subject: Re: [Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on bs graphs node. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, famz@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wONO9ppO3DJtEsXVB8XRVR8Vfr3xjNBDX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/03/2013 06:26 AM, Beno=C3=AEt Canet wrote: > Signed-off-by: Benoit Canet > --- > blockdev.c | 49 +++++++++++++++++++++++++++++++++++++++++-------= - > hmp.c | 4 +++- > qapi-schema.json | 13 ++++++++++--- > qmp-commands.hx | 11 ++++++++++- > 4 files changed, 64 insertions(+), 13 deletions(-) >=20 >=20 > + if (has_node_name && !has_snapshot_node_name) { > + error_setg(errp, "New snapshot node name missing"); > + return; > + } Why is it okay to omit the node name when passing a device name (which creates an anonymous node as the new root of the device tree) but not when passing a node name? Are you trying to guarantee that all anonymous nodes can be reached from a device name, and that when taking a snapshot from a node name the new node is not necessarily tied to a device and must therefore be named? > -# @device: the name of the device to generate the snapshot from. > +# Either @device or @node-name must be set but not both. > +# > +# @device: #optional the name of the device to generate the snapshot f= rom. > +# > +# @node-name: #optional graph node name to generate the snapshot from = (Since 1.8) > # > # @snapshot-file: the target of the new image. A new file will be crea= ted. > # > +# @snapshot-node-name: the graph node name of the new image (Since 1.8= ) 2.0, also mark this one #optional > +# > # @format: #optional the format of the snapshot image, default is 'qco= w2'. Unrelated to this patch, but @format is another field worth turning into an enum instead of an open-coded string. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wONO9ppO3DJtEsXVB8XRVR8Vfr3xjNBDX 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSn8SuAAoJEKeha0olJ0NqdMcH/jmty6G2smE7/3SMcfgW3k0u fImor+6lPrvO71pP1abIXQ2F1ooqvmraOILA4XUR77fljj6xQrmDq5qMS3EFtnjH F8CGLE1oYlT6Ik5jTU+kWLRcr084ZMJ4vVsn8g6pf/KfTs7rQf6/4tgnLIDOpuhx Kv4q/vdCm3QRTKaFfz2KLjXM0CYq2tQD1lgS+qeIKHcjiEAmQN46/DBFZMhKjewA Kj9/6wYLLykMSCUFSMachzt1WsleGmQFlUDI/Hab0WfROfk0DWY+oIXryJ+uYVQn WPmvN260mH27D0B46KzsX5nmRXASTd0vJk0yMq6bR3Zfe1fclAHyi5+cbmA44Is= =gi6d -----END PGP SIGNATURE----- --wONO9ppO3DJtEsXVB8XRVR8Vfr3xjNBDX--