[PATCH 2/2] node_device: Treat NVMe disks as regular disks

Michal Privoznik mprivozn at redhat.com
Wed Jan 26 13:13:21 UTC 2022


Unfortunately, udev doesn't set ID_TYPE attribute for NVMe disks,
therefore we have to add another case into udevKludgeStorageType()
to treat /dev/nvme* devlinks as any other disk.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045953
Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/node_device/node_device_udev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 14acb3fee0..27efda1ab0 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -900,6 +900,9 @@ udevKludgeStorageType(virNodeDeviceDef *def)
          * ID_TYPE=disk does not exist on DASDs they fall through
          * the udevProcessStorage detection logic. */
         { "/dev/dasd", "dasd" },
+
+        /* NVMe disk */
+        { "/dev/nvme", "disk" },
     };
 
     VIR_DEBUG("Could not find definitive storage type for device "
-- 
2.34.1




More information about the libvir-list mailing list