Skip to contentSkip to conversation

dm-multipath: blacklist NVMe devices

PATCH Applied Vaughan Cao 2 participants 2 messages Feb 27, 2014 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-multipath: blacklist NVMe devices

Multipath works at the request level and NVMe bypasses the request layer. So multipath is not going to be supported for NVMe devices. Add NVMe to default blacklist.

---
 libmultipath/blacklist.c | 6 ++++++
 multipath.conf.defaults  | 1 +
 2 files changed, 7 insertions(+)
libmultipath/blacklist.c +6 -0
index 79ddcde..651bd7e 100644
@@ -176,6 +176,12 @@ setup_default_blist (struct config * conf)
 	if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
 		return 1;
 
+	str = STRDUP("^nvme.*");
+	if (!str)
+		return 1;
+	if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
+		return 1;
+
 	str = STRDUP("(ID_SCSI_VPD|ID_WWN)");
 	if (!str)
 		return 1;
multipath.conf.defaults +1 -0
index e761902..12fb3f0 100644
@@ -31,6 +31,7 @@
 #	devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
 #	devnode "^hd[a-z]"
 #	devnode "^dcssblk[0-9]*"
+#	devnode "^nvme.*"
 #	device {
 #		vendor "DGC"
 #		product "LUNZ"
Signature · 1 line
1.8.3.1
#1 lore raw

Applied.

Thanks.

Quoted 42 lines · Vaughan Cao

Multipath works at the request level and NVMe bypasses the request layer. So multipath is not going to be supported for NVMe devices. Add NVMe to default blacklist.

---
 libmultipath/blacklist.c | 6 ++++++
 multipath.conf.defaults  | 1 +
 2 files changed, 7 insertions(+)
libmultipath/blacklist.c +6 -0
index 79ddcde..651bd7e 100644
@@ -176,6 +176,12 @@ setup_default_blist (struct config * conf)
        if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
                return 1;
 
+       str = STRDUP("^nvme.*");
+       if (!str)
+               return 1;
+       if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
+               return 1;
+
        str = STRDUP("(ID_SCSI_VPD|ID_WWN)");
        if (!str)
                return 1;
multipath.conf.defaults +1 -1
index e761902..12fb3f0 100644
@@ -31,6 +31,7 @@
 #      devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
 #      devnode "^hd[a-z]"
 #      devnode "^dcssblk[0-9]*"
+#      devnode "^nvme.*"
 #      device {
 #              vendor "DGC"
 #              product "LUNZ"
--

1.8.3.1