Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
0022-multipath-display-the-correct-configuration-when-dum.patch 1.36 KB
Copy Edit Raw Blame History
kouwq authored 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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化