[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on b
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on bs graphs node. |
Date: |
Thu, 5 Dec 2013 15:16:26 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Le Wednesday 04 Dec 2013 à 17:11:26 (-0700), Eric Blake a écrit :
> On 12/03/2013 06:26 AM, Benoît Canet wrote:
> > Signed-off-by: Benoit Canet <address@hidden>
> > ---
> > blockdev.c | 49 +++++++++++++++++++++++++++++++++++++++++--------
> > hmp.c | 4 +++-
> > qapi-schema.json | 13 ++++++++++---
> > qmp-commands.hx | 11 ++++++++++-
> > 4 files changed, 64 insertions(+), 13 deletions(-)
> >
>
> >
> > + 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?
Yes bs device living just under block backend will ever be accessible via device
whereas other bs really need a node-name to be set to be manipulated.
Also it avoid adding a new mandatory field for the device case which is good for
compatibility with previous versions.
Best regards
Benoît
>
> > -# @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 from.
> > +#
> > +# @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 created.
> > #
> > +# @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 'qcow2'.
>
> Unrelated to this patch, but @format is another field worth turning into
> an enum instead of an open-coded string.
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., (continued)
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Fam Zheng, 2013/12/03
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Benoît Canet, 2013/12/04
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Fam Zheng, 2013/12/04
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Benoît Canet, 2013/12/04
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Fam Zheng, 2013/12/04
- Re: [Qemu-devel] [RFC V3 6/7] block: Create authorizations mechanism for external snapshots., Benoît Canet, 2013/12/05
[Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on bs graphs node., Benoît Canet, 2013/12/03