[libvirt] [PATCH 03/18] util: storage: Don't force path canonicalization when loading metadata
Peter Krempa
pkrempa at redhat.com
Wed Apr 23 07:59:04 UTC 2014
On 04/23/14 09:56, Peter Krempa wrote:
> On 04/22/14 22:53, Eric Blake wrote:
>> On 04/22/2014 07:34 AM, Eric Blake wrote:
>>> On 04/20/2014 04:13 PM, Peter Krempa wrote:
>>>> Avoid breaking gluster volumes that don't have local representation. Use
>>>> the provided name when canonicalization fails. Broken by commit 79f11b35
...
>>
>> diff --git i/src/util/virstoragefile.c w/src/util/virstoragefile.c
>> index c707200..6ea45a4 100644
>> --- i/src/util/virstoragefile.c
>> +++ w/src/util/virstoragefile.c
>> @@ -1012,9 +1012,12 @@ virStorageFileGetMetadataFromBuf(const char *path,
>> virStorageFileMetadataPtr ret = NULL;
>> char *canonPath;
>>
>> - if (!(canonPath = canonicalize_file_name(path)) &&
>> - VIR_STRDUP(canonPath, path) < 0) {
>> - virReportSystemError(errno, _("unable to resolve '%s'"), path);
>> + if (virStorageIsFile(path)) {
>
> You are suggesting this same change in patch 6/18 ... as that patch
> actually removes this code I'll leave this patch as-is and fix the code
> in the new helper introduced in 6/18.
Or I can squash those two commits together (effectively just mention the
fix in the commit message).
>
>
>> + if (!(canonPath = canonicalize_file_name(path))) {
>> + virReportSystemError(errno, _("unable to resolve '%s'"), path);
>> + return NULL;
>> + }
>> + } else if (VIR_STRDUP(canonPath, path) < 0) {
>> return NULL;
>> }
>>
>
> Peter
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140423/bf0f4a67/attachment-0001.sig>
More information about the libvir-list
mailing list