qemu-devel
[Top][All Lists]
Advanced

[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: Eric Blake
Subject: Re: [Qemu-devel] [RFC V3 7/7] qmp: Allow to take external snapshots on bs graphs node.
Date: Wed, 04 Dec 2013 17:11:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

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?

> -# @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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]