[libvirt] [RFC PATCHv2 4/n] snapshot: actually compute branch definition from XML

Eric Blake eblake at redhat.com
Tue Nov 20 22:22:59 UTC 2012

On 11/19/2012 05:09 PM, Eric Blake wrote:
> When asked to parse a branch snapshot XML definition, we have to
> piece together the definition of the new snapshot from parts of
> the branch point, as well as run some sanity checks that the
> branches are compatible.  This patch is rather restrictive in
> what it allows; depending on effort and future needs, we may be
> able to relax some of those restrictions and allow more cases.

> +    if (other) {
> +        /* For now, we only allow branch snapshots of external snapshots.  */
> +        if (virDomainSnapshotAlignDisks(def,
> +                                        VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL,
> +                                        true) < 0)
> +            goto cleanup;
> +        for (i = 0; i < def->ndisks; def++)

You can tell I was sending this late yesterday, with blatant bugs like
iterating the wrong variable.  Now that I've actually tested the patch,
and had valgrind point out the obvious, my v3 should be something that
actually works.

Eric Blake   eblake at 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: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121120/98a3526a/attachment-0001.sig>

More information about the libvir-list mailing list