Re: [PATCHv2 13/16] storage: use cache to walk backing chain

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

 



On 10/16/2012 03:16 PM, Eric Blake wrote:

>>> +        if (disk->format > 0)
>>> +            format = disk->format;
>>> +        else if (ctl->allowDiskFormatProbing)
>>> +            format = VIR_STORAGE_FILE_AUTO;
>>> +        else
>>> +            format = VIR_STORAGE_FILE_RAW;
>>
>> It seems like I've seen this same bit of code a few times now...
>>
>>> +
>>> +        /* XXX - if we knew the qemu user:group here we could send it in
>>> +         *        so that the open could be re-tried as that user:group.
>>> +         */
>>> +        disk->chain = virStorageFileGetMetadata(disk->src, format, -1, -1,
>>> +                                                ctl->allowDiskFormatProbing,
>>> +                                                NULL);
>>> +
> 
> True - I'll experiment with a followup patch that moves the format
> selection of the initial layer into virStorageFileGetMetadata; if it
> works, expect another patch to be added in v3 (and if not, we'll just
> live with the duplication).

Turns out there were exactly two callers, both introduced in this
series, so my v3 will refactor the redundant code into
virStorageFileGetMetadata.

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