[PATCH 2/4] nodedev: improve DASD detection

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

 



In newer DASD driver versions the ID_TYPE tag is supported. This tag is
missing after a system reboot but when the ccw device is set offline and
online the tag is included. To fix this version independently we need to
check if devices detected as type disk is actually a DASD to maintain
the node object consistency and not end up with multiple node objects
for DASDs.

Resolves: https://issues.redhat.com/browse/RHEL-39497
Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx>
Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
---
 src/node_device/node_device_udev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 15e31d522a..c0e258fe9c 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1065,6 +1065,10 @@ udevProcessStorage(struct udev_device *device,
             storage->drive_type = g_strdup("sd");
         else if (udevKludgeStorageType(def) != 0)
             goto cleanup;
+    } else {
+        /* A detected disk might be a DASD */
+        if (STREQ(def->caps->data.storage.drive_type, "disk"))
+            udevFixupStorageType(def, "/dev/dasd", "dasd");
     }
 
     if (STREQ(def->caps->data.storage.drive_type, "cd") ||
-- 
2.45.0



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux