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

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

 



Hi,

On 01/22/2010 04:43 PM, David Lehman wrote:
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?

No when using external metadata the sets are always inside a container,
even if there is only one set. And when using native metadata there
are no containers.

The containers are purely an intermediate device, which we need in the tree
for parent child relations, etc. But they should never be used in any way.

Regards,

Hans

_______________________________________________
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