[libvirt] [PATCH 1/4] snapshot: new query APIs

Eric Blake eblake at redhat.com
Mon Jun 11 17:00:15 UTC 2012


On 06/11/2012 12:48 AM, Osier Yang wrote:
> On 2012年05月25日 11:33, Eric Blake wrote:
>> Right now, starting from just a virDomainSnapshotPtr, and wanting to
>> know if it is the current snapshot for its respective domain, you have
>> to use virDomainSnapshotGetDomain(), then virDomainSnapshotCurrent(),
>> then compare the two names returned by virDomainSnapshotGetName().
>> It is a bit easier if we can directly query this information from the
>> snapshot itself.
>>

>>
>> * include/libvirt/libvirt.h.in (virDomainSnapshotIsCurrent)
>> (virDomainSnapshotHasMetadata): New declarations.
>> * src/libvirt.c (virDomainSnapshotIsCurrent)
>> (virDomainSnapshotHasMetadata): New functions.
>> * src/libvirt_public.syms (LIBVIRT_0.9.13): Export them.
>> * src/driver.h (virDrvDomainSnapshotIsCurrent)
>> (virDrvDomainSnapshotHasMetadata): New driver callbacks.

>> +LIBVIRT_0.9.13 {
>> +    global:
>> +        virDomainSnapshotHasMetadata;
>> +        virDomainSnapshotIsCurrent;
>> +} LIBVIRT_0.9.11;
>> +
>>   # .... define new API here using predicted next version number ....
> 
> I'm not hep in the overall snapshot design, but the APIs looks
> quite straightforward, so ACK.

Thanks; I've gone ahead and pushed this patch (which means we are now
committed to providing it before 0.9.13); this of course means that
other API additions probably have to rebase, but that should be
relatively straightforward conflict resolution.  I will split and repost
patch 4/4 into two patches, one for qemu (which appeared to be
non-controversial) and one for esx/vbox (which may depend on list
consensus on whether blind success is desirable).

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/73c5e4c1/attachment-0001.sig>


More information about the libvir-list mailing list