diff --git a/0026-add-the-support-for-NOF-devices.patch b/0026-add-the-support-for-NOF-devices.patch new file mode 100644 index 0000000000000000000000000000000000000000..2b7536be19593a057cd01b38ee0f10aa8d739150 --- /dev/null +++ b/0026-add-the-support-for-NOF-devices.patch @@ -0,0 +1,36 @@ +From e8e1cd4592a9a9b186359a219f510f2e658e5de8 Mon Sep 17 00:00:00 2001 +From: lijie345 <553175351@qq.com> +Date: Sun, 8 Nov 2020 20:38:56 +0800 +Subject: [PATCH] add the support for NOF devices + +multipath-tools can not take over the NOF devices, so add the support for NOF devices. + +Signed-off-by: lijie345 <553175351@qq.com> +--- + libmultipath/discovery.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index c49848e..144959a 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -108,6 +108,16 @@ transport (int h) + if ((stat(buff, &a_stat) >= 0) && S_ISDIR(a_stat.st_mode)) { + return 0; + } ++ memset(buff, 0, PATH_SIZE); ++ ++ /* nof device */ ++ strcpy(buff, "/sys"); ++ strcat(buff, "/class/nvme-fabrics/ctl/"); ++ off = strlen(buff); ++ snprintf(buff + off, PATH_SIZE - off, "nvme%d", h); ++ if ((stat(buff, &a_stat) >= 0) && S_ISDIR(a_stat.st_mode)) { ++ return 0; ++ } + return 1; + } + +-- +2.29.2.windows.2 + diff --git a/multipath-tools.spec b/multipath-tools.spec index 06d758cef9f4d79aa268d123c08cc668b1ee408a..a79ef27dd5803371475ec2da02c879725fb46fcc 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,6 +1,6 @@ Name: multipath-tools Version: 0.8.4 -Release: 4 +Release: 5 Summary: Tools to manage multipath devices with the device-mapper License: GPLv2-or-later and LGPLv2+ URL: http://christophe.varoqui.free.fr/ @@ -33,6 +33,7 @@ Patch22: 0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch Patch23: 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch Patch24: 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch Patch25: 0025-fix-boolean-value-with-json-c-0.14.patch +Patch26: 0026-add-the-support-for-NOF-devices.patch BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 BuildRequires: libselinux-devel, libsepol-devel, readline-devel, ncurses-devel, git BuildRequires: systemd-units, systemd-devel, json-c-devel, perl-interpreter, pkgconfig @@ -172,6 +173,12 @@ fi %changelog +* Sun Nov 8 2020 lijie345<553175351@qq.com> - 0.8.4-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add the support for NOF devices + * Fri Oct 16 2020 lixiaokeng - 0.8.4-4 - Type:bugfix - ID:NA