[libvirt] [PATCH 3/4] snapshot: take advantage of new relations
Eric Blake
eblake at redhat.com
Mon Oct 10 21:51:36 UTC 2011
On 10/09/2011 09:02 PM, Daniel Veillard wrote:
>> + if (!(flags& VIR_DOMAIN_SNAPSHOT_LIST_ROOTS)) {
>> + virHashForEach(snapshots->objs, virDomainSnapshotObjListCount,&data);
>> + } else if (data.flags) {
>> + virDomainSnapshotObjPtr root = snapshots->first_root;
>> + while (root) {
>> + virDomainSnapshotObjListCount(root, root->def->name,&data);
>> + root = root->sibling;
>> + }
>
> I was just wondering if a data structure with a meta-root snapshot
> and unifying first_root as a first_children on that meta-root wouldn't
> lead to simpler code overall.
Possibly. In fact, ESX does just that. Should I respin this patch
series to factor that in on first commit, or do it as a followup commit?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list