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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]