Re: [PATCHv2 16/16] blockjob: implement shallow commit flag in qemu

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

 



On 10/17/2012 03:28 PM, Laine Stump wrote:
> On 10/13/2012 06:00 PM, Eric Blake wrote:
>> Now that we can crawl the chain of backing files, we can do
>> argument validation and implement the 'shallow' flag.  In
>> testing this, I discovered that it can be handy to pass the
>> shallow flag and an explicit base, as a means of validating
>> that the base is indeed the file we expected.
>>

>> +    } else if (!(top_canon = virStorageFileChainLookup(disk->chain, disk->src,
>> +                                                       top, &top_meta,
>> +                                                       &top_parent))) {

>> +    } else if (!(base_canon = virStorageFileChainLookup(top_meta, top_canon,
>> +                                                        base, NULL, NULL))) {

>> +    if ((flags & VIR_DOMAIN_BLOCK_COMMIT_SHALLOW) &&
>> +        base_canon != top_meta->backingStore) {

Here's one of those places where I'm exploiting the pointer-equality
(rather than the more expensive STREQ) given by
virStorageFileChainLookup from patch 11; I'll add a comment in v3 so
that it is more obvious why I expect it to work.

> 
> Looks reasonable. ACK.

Yay - the bulk of the time in me writing this patch was coming up with
the right interface for virStorageFileChainLookup (and then rebasing
those changes in earlier to the series) so that I had everything I needed.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]