[blivet:master 12/16] Add a LinearRAID class to the list of Raid classes.

David Lehman dlehman at redhat.com
Wed May 7 19:18:03 UTC 2014


On 05/07/2014 01:55 PM, Anne Mulhern wrote:
>
>
>
>
> ----- Original Message -----
>> From: "David Lehman" <dlehman at redhat.com>
>> To: anaconda-patches at lists.fedorahosted.org
>> Sent: Tuesday, May 6, 2014 4:49:22 PM
>> Subject: Re: [blivet:master 12/16] Add a LinearRAID class to the list of Raid	classes.
>>
>>
>>
>> On 05/06/2014 11:42 AM, mulhern wrote:
>>> Signed-off-by: mulhern <amulhern at redhat.com>
>>> ---
>>>    blivet/devicelibs/raid.py | 9 +++++++++
>>>    1 file changed, 9 insertions(+)
>>>
>>> diff --git a/blivet/devicelibs/raid.py b/blivet/devicelibs/raid.py
>>> index ebc98e6..31bee3d 100644
>>> --- a/blivet/devicelibs/raid.py
>>> +++ b/blivet/devicelibs/raid.py
>>> @@ -479,3 +479,12 @@ class Container(object):
>>>
>>>    Container = Container()
>>>    ALL_LEVELS.addRaidLevel(Container)
>>> +
>>> +class LinearRAID(object):
>>> +
>>> +    name = "linear"
>>> +    names = [name, 'single', 'none']
>>> +    min_members = 0
>>
>> I think min_members should be one.
>>
>>> +
>>> +LinearRAID = LinearRAID()
>>> +ALL_LEVELS.addRaidLevel(LinearRAID)
>>>
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
>
> I started out with 1. The reason I switched to 0 was the code in
> patches (14) and (16) where I wanted to preserve the existing semantics.
>
> If we make LinearRAID.min_members 1, then in (14) so long as self.metaDataLevel
> or self.dataLevel is set then min_members must be at least 1 and therefore
> it must raise a DeviceError if trying to remove the last parent. The argument
> for (16) is similar. This would be a definite change in behavior.
> If you think it's the correct behavior, then we should definitely go with
> LinearRAID.min_members = 1.

Let's go with one, then. Containers with no members make no sense IMO.

David


More information about the anaconda-patches mailing list