代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/multipath-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。