[PATCH nvme-cli] huawei: set the default policy to round-robin

chengjike chengjike.cheng at huawei.com
Mon Nov 22 06:03:08 PST 2021


add udev rules to set iopolicy for certain Huawei devices to "round-robin"

Signed-off-by: chengjike <chengjike.cheng at huawei.com>
---
 nvme.spec.in                                              | 4 ++++
 nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-huawei.rules | 2 ++
 2 files changed, 6 insertions(+)
 create mode 100644 nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-huawei.rules

diff --git a/nvme.spec.in b/nvme.spec.in
index a8c4486..4fdd78b 100644
--- a/nvme.spec.in
+++ b/nvme.spec.in
@@ -38,6 +38,7 @@ make install-spec DESTDIR=%{buildroot} PREFIX=/usr
 %ghost %{_sysconfdir}/nvme/config.json
 %{_sysconfdir}/udev/rules.d/70-nvmf-autoconnect.rules
 %{_sysconfdir}/udev/rules.d/71-nvmf-iopolicy-netapp.rules
+%{_sysconfdir}/udev/rules.d/71-nvmf-iopolicy-huawei.rules
 %{_libdir}/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
 %{_libdir}/systemd/system/nvmf-connect at .service
 %{_libdir}/systemd/system/nvmefc-boot-connections.service
@@ -62,6 +63,9 @@ if [ $1 -eq 1 ]; then # 1 : This package is being installed for the first time
 fi
 
 %changelog
+* Mon Nov 22 2021 chengjike <chengjike.cheng at huawei.com>
+  - Add new udev rules to set iopolicy for Huawei devices
+
 * Tue Dec 17 2019 Simon Schricker <sschricker at suse.de>
   - Add new udev rules to set iopolicy for NetApp devices
 
diff --git a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-huawei.rules b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-huawei.rules
new file mode 100644
index 0000000..9fe5af5
--- /dev/null
+++ b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-huawei.rules
@@ -0,0 +1,2 @@
+# Enable round-robin for Huawei devices
+ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{model}=="Huawei*", ATTR{iopolicy}="round-robin"
-- 
2.21.0.windows.1




More information about the Linux-nvme mailing list