On 06/15/12 06:18, Eric Blake wrote:
It turns out that one-bit filtering makes it hard to select the inverse set, so it is easier to provide filtering groups. For back-compat, omitting all bits within a group means the group is not used for filtering, and by definition of a group (each snapshot matches exactly one bit within the group, and the set of bits in the group covers all snapshots), selecting all bits also makes the group useless. Unfortunately, virDomainSnapshotListChildren defined the bit VIR_DOMAIN_SNAPSHOT_LIST_DESCENDANTS as an expansion rather than a filter, so we cannot make it part of a filter group, so that bit (and its counterpart VIR_DOMAIN_SNAPSHOT_LIST_ROOTS for virDomainSnapshotList) remains a single control bit. * include/libvirt/libvirt.h.in (virDomainSnapshotListFlags): Add a couple more flags. * src/libvirt.c (virDomainSnapshotNum) (virDomainSnapshotNumChildren): Document them. (virDomainSnapshotListNames, virDomainSnapshotListChildrenNames): Likewise, and add thread-safety caveats. * src/conf/virdomainlist.h (VIR_DOMAIN_SNAPSHOT_FILTERS_*): New convenience macros. * src/conf/domain_conf.c (virDomainSnapshotObjListCopyNames) (virDomainSnapshotObjListCount): Support the new flags. ---
ACK. Peter -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list