1 Star 0 Fork 40

秦飞/multipath-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
From cc63b6025b423e1d89388c0b3dbae3e67cb0436b Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 22 Aug 2023 16:21:43 +0200
Subject: [PATCH] libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN
"multipath -d" might change sysfs timeouts of SCSI devices.
Make sure it doesn't.
Signed-off-by: Martin Wilck <mwilck@suse.com>
Cc: Jehan Singh <jehan.singh@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/configure.c | 4 ++--
libmultipath/discovery.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 9513baae..029fbbd2 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -1193,13 +1193,13 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
if (cmpp)
mpp->queue_mode = cmpp->queue_mode;
+ if (cmd == CMD_DRY_RUN && mpp->action == ACT_UNDEF)
+ mpp->action = ACT_DRY_RUN;
if (setup_map(mpp, &params, vecs)) {
remove_map(mpp, vecs->pathvec, NULL);
continue;
}
- if (cmd == CMD_DRY_RUN)
- mpp->action = ACT_DRY_RUN;
if (mpp->action == ACT_UNDEF)
select_action(mpp, curmp,
force_reload == FORCE_RELOAD_YES ? 1 : 0);
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index e4de48e7..84ce5fe7 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -857,6 +857,9 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
bool warn_dev_loss = false;
bool warn_fast_io_fail = false;
+ if (mpp->action == ACT_DRY_RUN || mpp->action == ACT_REJECT)
+ return 0;
+
if (mpp->no_path_retry > 0) {
uint64_t no_path_retry_tmo =
(uint64_t)mpp->no_path_retry * conf->checkint;
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qin-fei-1/multipath-tools.git
git@gitee.com:qin-fei-1/multipath-tools.git
qin-fei-1
multipath-tools
multipath-tools
master

搜索帮助