Re: [PATCH 1/5] snapshots: Add flag to guarantee topological sort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 08, 2019 at 12:05:08AM -0600, Eric Blake wrote:
> When doing REDEFINE on multiple snapshot metadata XML descriptions, we
> require that a child cannot be redefined before its parent.  Since
> libvirt already tracks a DAG, it is more convenient if we can ensure
> that virDomainListAllSnapshots() and friends have a way to return data
> in an order that we can directly reuse, rather than having to
> post-process the data ourselves to reconstruct the DAG.
> 
> Add VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL as our new guarantee (well, a
> guarantee at the time of the API call conclusion; there's always a
> possible TOCTTOU race where someone redefining snapshots in between
> the API results and the client actually using the list might render
> the list out-of-date). Four listing APIs are directly benefitted by
> the new flag; additionally, since we document that the older racy
> ListNames interfaces should be sized by using the same flags on their
> Num counterparts, the Num interfaces must document when they accept
> (and ignore) the flag.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  include/libvirt/libvirt-domain-snapshot.h |  4 +++
>  src/libvirt-domain-snapshot.c             | 42 ++++++++++++++++++++++-
>  2 files changed, 45 insertions(+), 1 deletion(-)

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux