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

Peter Krempa pkrempa at redhat.com
Wed Jan 29 12:01:55 UTC 2014


On 01/27/14 23:12, Eric Blake wrote:
> 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.
> 

I've fixed your comments and squashed the patch adding tests into this
one and pushed the result. I've pushed this one separately as I found a
few bugs in the rest of the series that will need a repost of the rest.

Peter

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


More information about the libvir-list mailing list