1 Star 0 Fork 40

秦飞/multipath-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0022-multipath-display-the-correct-configuration-when-dum.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
kouwq 提交于 2024-08-26 12:16 . sync patch22 with community
From 0802e9dfd27e2333615e8068d7fa55a614bef92e Mon Sep 17 00:00:00 2001
From: Kou Wenqi <kouwenqi@kylinos.cn>
Date: Tue, 13 Aug 2024 10:12:36 +0800
Subject: [PATCH] multipath: display the correct configuration when dumping
config
"multipath -t" and "multipath -T" might show the wrong
multipathd configuration items "retrigger_tries" and
"force_sync". Make sure they don't.
Signed-off-by: Kou Wenqi <kouwenqi@kylinos.cn>
Reviewed-by: Martin Wilck <mwilck@suse.com>
---
multipath/main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c
index 90f940f..69acd06 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -838,8 +838,6 @@ main (int argc, char *argv[])
if (atexit(uninit_config))
condlog(1, "failed to register cleanup handler for config: %m");
conf = get_multipath_config();
- conf->retrigger_tries = 0;
- conf->force_sync = 1;
if (atexit(cleanup_vecs))
condlog(1, "failed to register cleanup handler for vecs: %m");
while ((arg = getopt(argc, argv, ":adDcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
@@ -984,6 +982,11 @@ main (int argc, char *argv[])
libmp_udev_set_sync_support(1);
+ if (cmd != CMD_DUMP_CONFIG) {
+ conf->retrigger_tries = 0;
+ conf->force_sync = 1;
+ }
+
if ((cmd == CMD_LIST_SHORT || cmd == CMD_LIST_LONG) && enable_foreign)
conf->enable_foreign = strdup("");
--
2.27.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

搜索帮助