On Fri, Mar 08, 2019 at 12:05:09AM -0600, Eric Blake wrote: > Wire up support for VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL in the > domain-agnostic support code. > > Clients of snapshot_conf were previously getting a depth-first search > on anything that used virDomainSnapshotForEachDescendant(); but a > switch to a breadth-first search will give a topological search. > > With that change, we now always have a topological sort for > virDomainSnapshotListAllChildren(); then with one more tweak, we > can get a topological rather than a faster random hash visit > for virDomainListAllSnapshots(). > > Note that virDomainSnapshotForEach() still uses a random hash > visit; we could change that signature to take a tri-state for > random, depth-first, or breadth-first visit if we ever had clients > that cared about the distinctions, but for now, none of the > drivers seem to care. > > Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> > --- > src/conf/snapshot_conf.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list