[PATCH 5/6] Add function to check fake raids member

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

 



This patch add new function for checking if udev_device is fake raid.

Function udev_device_is_dmraid was removed.
commit 114b723eb733e9b42ea584467b113036180c7170
Author: Jacek Danecki <Jacek.Danecki@xxxxxxxxx>
Date:   Fri Apr 10 13:45:45 2009 -0400

    Add function to check fake raids member

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 15713d9..7a19a2f 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1157,13 +1157,13 @@ class DeviceTree(object):
             log.debug("%s is a cdrom" % name)
             if device is None:
                 device = self.addUdevOpticalDevice(info)
-        elif udev_device_is_dmraid(info):
+        elif udev_device_is_fakeraidset_member(info):
             # This is special handling to avoid the "unrecognized disklabel"
             # code since dmraid member disks won't have a disklabel. We
             # use a StorageDevice because DiskDevices need disklabels.
             # Quite lame, but it doesn't matter much since we won't use
             # the StorageDevice instances for anything.
-            log.debug("%s is part of a dmraid" % name)
+            log.debug("%s is part of a fake raid" % name)
             if device is None:
                 device = StorageDevice(name,
                                 major=udev_device_get_major(info),
diff --git a/storage/udev.py b/storage/udev.py
index 63cc3fd..64496d4 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -294,7 +294,7 @@ def udev_device_get_lv_sizes(info):
 
     return [float(s) / 1024 for s in sizes]
 
-def udev_device_is_dmraid(info):
+def udev_device_is_fakeraidset_member(info):
     # Note that this function does *not* identify raid sets.
     # Tests to see if device is parto of a dmraid set.
     # dmraid and mdriad have the same ID_FS_USAGE string,  ID_FS_TYPE has a
@@ -303,7 +303,8 @@ def udev_device_is_dmraid(info):
     # dmraid will be everything that is raid and not linux_raid_member
     from formats.dmraid import DMRaidMember
     if info.has_key("ID_FS_TYPE") and \
-            info["ID_FS_TYPE"] in DMRaidMember._udevTypes:
+            ((info["ID_FS_TYPE"] in DMRaidMember._udevTypes ) or \
+            (info["ID_FS_TYPE"] == "isw_raid_member" )):
         return True
 
     return False
_______________________________________________
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