]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: virsh fallback for snapshot-list --descendants --from
authorEric Blake <eblake@redhat.com>
Thu, 29 Sep 2011 22:31:02 +0000 (16:31 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 10 Oct 2011 23:24:47 +0000 (17:24 -0600)
commit521cc44700f81b0f31711cc6d1ec3fad20c62ae9
tree5059f41df3149013057f2b024d47ba780c6bb195
parent16d7b3908e61e347e55875fb79e97f8d3e4e4fb7
snapshot: virsh fallback for snapshot-list --descendants --from

Given a list of snapshots and their parents, finding all descendants
requires a hairy traversal.  This code is O(n^3); it could maybe be
made to scale O(n^2) with the use of a hash table, but that costs more
memory.  Hopefully there aren't too many people with a hierarchy
so large as to approach REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX (1024).

* tools/virsh.c (cmdSnapshotList): Add final fallback.
tools/virsh.c