Re: [PATCH 2/8] Fixup MDRaidArrayDevice.biosraid

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

 



On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:
> 1) Containers don't have formats, so this checks always fails, making
>    mdraid BIOS RAID sets not show up in storage.partitioned.
> 
> 2) MDRaidArrayDevice.biosraid is used to not show biosraid related
>    mdraid sets as editable raid sets in the partition UI, so we should return
>    true for containers too, as we don't want to show those there either
> 
> 3) Containers however are not partitionable, so we cannot use the
>    biosraid property in the partitionable property.
> ---
>  storage/devices.py |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/storage/devices.py b/storage/devices.py
> index f21e730..3bae2d8 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -2824,13 +2824,13 @@ class MDRaidArrayDevice(StorageDevice):
>  
>      @property
>      def biosraid(self):
> -        return (len(self.devices) != 0 and
> -                self.devices[0].type == "mdcontainer" and
> -                getattr(self.devices[0].format, "biosraid", False))
> +        """ Is this a BIOS RAID related set? """
> +        return self.type == "mdcontainer" or \
> +               (self.devices and self.devices[0].type == "mdcontainer")

Can't users create md arrays using containers? If so, this isn't good
enough. You might want to put back the format check, something like
this:

return (len(self.devices) != 0 and
        (self.type == "mdcontainer" and
         self.devices[0].format.biosraid) or
        (self.devices[0].type == "mdcontainer" and
         self.devices[0].biosraid))

Dave

>  
>      @property
>      def partitionable(self):
> -        return self.biosraid
> +        return self.devices and self.devices[0].type == "mdcontainer"
>  
>      def dracutSetupString(self):
>          return "rd_MD_UUID=%s" % self.uuid


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux