On Mon, Oct 10, 2011 at 03:51:36PM -0600, Eric Blake wrote:
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?
IMHO a followup is fine, that should be fairly mechanical
and allow us to actually see if this is a better approach or not
(counting - vs + lines should make this clear :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/