[libvirt] [PATCHv2 variant 1] snapshot: implement new APIs for esx and vbox

Eric Blake eblake at redhat.com
Wed Jun 20 17:22:18 UTC 2012


On 06/17/2012 04:29 AM, Matthias Bolte wrote:
> 2012/6/12 Eric Blake <eblake at redhat.com>:
>> The two new APIs are rather trivial; based on bits and pieces of
>> other existing APIs.  But rather than blindly return 0 or 1 for
>> HasMetadata, I chose to first validate that the snapshot in
>> question in fact exists.  In the process, I noticed other APIs
>> that were blindly succeeding instead of checking for existence.
>>
>> * src/esx/esx_driver.c (esxDomainSnapshotIsCurrent)
>> (esxDomainSnapshotHasMetadata): New functions.
>> (esxDomainIsUpdated, esxDomainIsPersistent): Add existence checks.
>> * src/vbox/vbox_tmpl.c (vboxDomainSnapshotIsCurrent)
>> (vboxDomainSnapshotHasMetadata): New functions.
>> (vboxDomainIsPersistent, vboxDomainIsUpdated): Add existence checks.
>> ---
>>
>> v2: add existence checks to other functions
>> I like this version better.  However, while it compiles, I'm
>> completely unable to runtime test it, so I'd appreciate a
>> good review.
>>

>> +
>> +cleanup:
> 
> VBOX_RELEASE(snap); is missing here.

Fixed.

> 
>> +    VBOX_RELEASE(machine);
>> +    vboxIIDUnalloc(&iid);
>> +    return ret;
>> +}
> 
> Tested and works. ACK.

I've split this patch into two parts (adjust the existing functions to
check for existence, and adding the new functions), then pushed.

-- 
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/20120620/a5a2edd1/attachment-0001.sig>


More information about the libvir-list mailing list