Re: [PATCHv5 22/28] util: storage: Return complete parent info from virStorageFileChainLookup

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

 



On 07/09/14 01:28, Eric Blake wrote:
> On 07/04/2014 05:29 AM, Peter Krempa wrote:
>> Instead of just returning the parent path, return the complete parent
>> source structure.
>> ---
>>  src/qemu/qemu_driver.c    | 16 ++++-----
>>  src/util/virstoragefile.c | 17 ++++------
>>  src/util/virstoragefile.h |  2 +-
>>  tests/virstoragetest.c    | 86 ++++++++++++++++++++++-------------------------
>>  4 files changed, 56 insertions(+), 65 deletions(-)
> 
>> @@ -15585,10 +15585,9 @@ qemuDomainBlockCommit(virDomainPtr dom,
>>      clean_access = true;
>>      if (qemuDomainPrepareDiskChainElement(driver, vm, disk, baseSource,
>>                                            VIR_DISK_CHAIN_READ_WRITE) < 0 ||
>> -        (top_parent && top_parent != disk->src->path &&
>> -         qemuDomainPrepareDiskChainElementPath(driver, vm, disk,
>> -                                               top_parent,
>> -                                               VIR_DISK_CHAIN_READ_WRITE) < 0))
>> +        (top_parent != disk->src &&
>> +         qemuDomainPrepareDiskChainElement(driver, vm, disk, top_parent,
>> +                                           VIR_DISK_CHAIN_READ_WRITE) < 0))
> 
> Oops.  This doesn't quite work with active commit (where top_parent is
> NULL, but where qemuDomainPrepareDiskChainElement isn't too happy to get
> a NULL pointer).  But then again, I'm rebasing my active commit on top
> of you, so your patch is not wrong if it goes in first.  If you want,
> restore the condition to '(top_parent && top_parent != disk->src &&...)'.

I went with the active_commit tolerant approach as the code was actually
there before this patch.

Peter


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]