nvme-cli/SOURCES/0001-udev-rules-set-ctrl_loss_tmo-to-1-for-ONTAP-NVMe-TCP.patch

30 lines
1.5 KiB
Diff
Raw Normal View History

From 0782167f3a6709df232b746cdfa2a036c6207f7f Mon Sep 17 00:00:00 2001
From: Martin George <marting@netapp.com>
Date: Tue, 3 Oct 2023 16:05:23 +0530
Subject: [PATCH] udev-rules: set ctrl_loss_tmo to -1 for ONTAP NVMe/TCP
Setting ctrl_loss_tmo to -1 for ONTAP NVMe/TCP controllers would enable
indefinite reconnect attempts during a path loss and help avoid purging
the path on the host, which otherwise may lead to mounted fs read-only
behavior. So add a rule towards enabling the same.
Signed-off-by: Martin George <marting@netapp.com>
---
nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
index 299fe2251418..99b6a8ba0bf8 100644
--- a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
+++ b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
@@ -1,3 +1,6 @@
# Enable round-robin for NetApp ONTAP and NetApp E-Series
ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp ONTAP Controller", ATTR{iopolicy}="round-robin"
ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp E-Series", ATTR{iopolicy}="round-robin"
+
+# Set ctrl_loss_tmo to -1 for NetApp ONTAP NVMe/TCP
+ACTION!="remove", SUBSYSTEM=="nvme", KERNEL=="nvme*", ATTR{transport}=="tcp", ATTR{model}=="NetApp ONTAP Controller", ATTR{ctrl_loss_tmo}="-1"
--
2.39.3