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