[libvirt] [PATCHv2 4/9] snapshot: Add support for specifying snapshot disk backing type

Eric Blake eblake at redhat.com
Mon Jan 27 22:12:50 UTC 2014


On 01/16/2014 06:14 AM, Peter Krempa wrote:
> Add support for specifying various types when doing snapshots. This will
> later allow to do snapshots on network backed volumes. Disks of type
> 'volume' are not supported by snapshots (yet).
> ---
> 
> Notes:
>     Version 2:
>     - always format disk type and fix fallout
> 


> +            <group>
> +              <attribute name="type">
> +                <value>dir</value>

I guess this one is here for symmetry, although we don't really allow
taking a snapshot of a directory mount, let alone a directory that is a
snapshot of a file.  What if you omit this branch of the <choice>...

> 
> -    def->type = -1;
> +    if ((type = virXMLPropString(node, "type"))) {
> +        if ((def->type = virDomainDiskTypeFromString(type)) < 0 ||
> +            def->type == VIR_DOMAIN_DISK_TYPE_VOLUME) {

...as well as explicitly reject directory types here?

But overall looks okay to me.  ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140127/e84bdf91/attachment-0001.sig>


More information about the libvir-list mailing list