[libvirt] [PATCH v2 3/5] storage: conf: Don't set any default <mode> in the XML
Cole Robinson
crobinso at redhat.com
Tue May 19 23:33:07 UTC 2015
On 05/11/2015 04:10 AM, Ján Tomko wrote:
> On Tue, May 05, 2015 at 12:44:01PM -0400, Cole Robinson wrote:
>> The XML parser sets a default <mode> if none is explicitly passed in.
>> This is then used at pool/vol creation time, and unconditionally reported
>> in the XML.
>>
>> The problem with this approach is that it's impossible for other code
>> to determine if the user explicitly requested a storage mode. There
>> are some cases where we want to make this distinction, but we currently
>> can't.
>>
>> Handle <mode> parsing like we handle <owner>/<group>: if no value is
>> passed in, set it to -1, and adjust the internal consumers to handle
>> it.
>
>> --- a/tests/storagevolxml2xmlin/vol-file.xml
>> +++ b/tests/storagevolxml2xmlin/vol-file.xml
>> @@ -6,8 +6,8 @@
>> <target>
>> <path>/var/lib/libvirt/images/sparse.img</path>
>> <permissions>
>> - <mode>0</mode>
>> - <owner>0744</owner>
>> + <mode>00</mode>
>
> 00 is ugly.
>
>> + <owner>744</owner>
>
> Why are these changes needed? The patch does not touch the owner
> formatting.
>
Yeah I think this is some weirdness left over from v1 of the series, will fix
- Cole
More information about the libvir-list
mailing list