On 3/12/19 11:03 AM, Ján Tomko wrote: > 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. >> > > I'd rather deal with that by not introducing the new flag to the old > APIs. The ListAll APIs were introduced back in 2012 and are even older > than the minimum QEMU version we support. It's easy enough (in later patches) to NOT accept the new flag in the virCheckFlags() macro for the implementation of those functions. On the other hand, it's trivial to support. But if you don't like new flags to old APIs, even though the old and new APIs share a common enum, I can make that change. > > Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> > > Jano -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list