Blame SOURCES/0550-Export-NVMe-WWID-udev-attribute-5348.patch

17b0f1
From c9c86577937088e36bcfb67e701aebe51d2cc893 Mon Sep 17 00:00:00 2001
17b0f1
From: Keith Busch <keith.busch@intel.com>
17b0f1
Date: Fri, 17 Feb 2017 00:46:06 -0700
17b0f1
Subject: [PATCH] Export NVMe WWID udev attribute (#5348)
17b0f1
17b0f1
We need this for multipath support without relying on NVMe to SCSI
17b0f1
translations.
17b0f1
17b0f1
Signed-off-by: Keith Busch <keith.busch@intel.com>
17b0f1
17b0f1
Cherry-picked from: 5c1be4f73082d09011661516c39fb53626d8bdc7
17b0f1
Resolves: #1503253
17b0f1
---
17b0f1
 rules/60-persistent-storage.rules | 1 +
17b0f1
 1 file changed, 1 insertion(+)
17b0f1
17b0f1
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
17b0f1
index 10642a1fd8..ba619633b7 100644
17b0f1
--- a/rules/60-persistent-storage.rules
17b0f1
+++ b/rules/60-persistent-storage.rules
17b0f1
@@ -27,6 +27,7 @@ KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{w
17b0f1
 KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n"
17b0f1
 
17b0f1
 KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}"
17b0f1
+KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{wwid}=="?*", ENV{ID_WWN}="$attr{wwid}"
17b0f1
 KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{model}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_SERIAL}="$attr{model}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}", OPTIONS="string_escape=replace"
17b0f1
 
17b0f1
 KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}"