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

Re: [PATCH 2/4] Hide biosraid member devices that contain MDRaidMember formats.



Hi,

On 12/16/2009 07:18 PM, David Lehman wrote:
@@ -1710,7 +1714,8 @@ class DeviceTree(object):
           # Now, if the device is a disk, see if there is a usable disklabel.
           # If not, see if the user would like to create one.
           format = getFormat(format_type)
-        if device.partitionable and not format.hidden:
+        if device.partitionable and not \
+           (format.hidden or udev_device_is_biosraid(info)):
               self.handleUdevDiskLabelFormat(info, device)
               if device.partitioned or self.isIgnored(info):
                   # If the device has a disklabel, or the user chose not to

This hunk seems a bit double, given that you already override hidden to
take the biosraid format attribute into account. I know this has
not been set yet, but still this does not feel right. I must admit
I cannot come up with a decent other way to do this, but still this seems
wrong.


Yeah, I agree. I've added a follow-on patch which I will squash into
this commit:

diff --git a/storage/devicetree.py b/storage/devicetree.py
index ff8c168..469fb14 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1713,9 +1713,9 @@ class DeviceTree(object):

          # Now, if the device is a disk, see if there is a usable
disklabel.
          # If not, see if the user would like to create one.
-        format = getFormat(format_type)
          if device.partitionable and not \
-           (format.hidden or udev_device_is_biosraid(info)):
+           (udev_device_is_biosraid(info) or
+            udev_device_is_multipath_member(info)):
              self.handleUdevDiskLabelFormat(info, device)
              if device.partitioned or self.isIgnored(info):
                  # If the device has a disklabel, or the user chose not
to


Evolution has probably inserted hard line breaks into my patch,

Yes it has :)

but you hopefully get the point.

Yes I do, ack with this change added.

Regards,

Hans


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