!196 multipath: display the correct configuration when dumpping config
From: @kouwq Reviewed-by: @swf504 Signed-off-by: @swf504
This commit is contained in:
commit
a34bac7479
@ -0,0 +1,54 @@
|
|||||||
|
From d03a21a3474993cdf95c73da7ea70308659c3d70 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kou Wenqi <kouwenqi@kylinos.cn>
|
||||||
|
Date: Mon, 5 Aug 2024 14:35:06 +0800
|
||||||
|
Subject: [PATCH] multipath: display the correct configuration when dumpping
|
||||||
|
config
|
||||||
|
|
||||||
|
"multipath -t" and "multipath -T" might show the wrong
|
||||||
|
multipathd configuration items "retrigger_tries" and
|
||||||
|
"force_sync". Make sure they don't.
|
||||||
|
---
|
||||||
|
multipath/main.c | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
|
index 3c5a70e..f52430f 100644
|
||||||
|
--- a/multipath/main.c
|
||||||
|
+++ b/multipath/main.c
|
||||||
|
@@ -866,6 +866,8 @@ main (int argc, char *argv[])
|
||||||
|
char *dev = NULL;
|
||||||
|
struct config *conf;
|
||||||
|
int retries = -1;
|
||||||
|
+ int retrigger_tries_ori;
|
||||||
|
+ int force_sync_ori;
|
||||||
|
|
||||||
|
udev = udev_new();
|
||||||
|
logsink = 0;
|
||||||
|
@@ -873,7 +875,9 @@ main (int argc, char *argv[])
|
||||||
|
if (!conf)
|
||||||
|
exit(RTVL_FAIL);
|
||||||
|
multipath_conf = conf;
|
||||||
|
+ retrigger_tries_ori = conf->retrigger_tries;
|
||||||
|
conf->retrigger_tries = 0;
|
||||||
|
+ force_sync_ori = conf->force_sync;
|
||||||
|
conf->force_sync = 1;
|
||||||
|
while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
||||||
|
switch(arg) {
|
||||||
|
@@ -944,10 +948,14 @@ main (int argc, char *argv[])
|
||||||
|
conf->find_multipaths = FIND_MULTIPATHS_GREEDY;
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
+ conf->retrigger_tries = retrigger_tries_ori;
|
||||||
|
+ conf->force_sync = force_sync_ori;
|
||||||
|
r = dump_config(conf, NULL, NULL) ? RTVL_FAIL : RTVL_OK;
|
||||||
|
goto out_free_config;
|
||||||
|
case 'T':
|
||||||
|
cmd = CMD_DUMP_CONFIG;
|
||||||
|
+ conf->retrigger_tries = retrigger_tries_ori;
|
||||||
|
+ conf->force_sync = force_sync_ori;
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
usage(argv[0]);
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: multipath-tools
|
Name: multipath-tools
|
||||||
Version: 0.8.4
|
Version: 0.8.4
|
||||||
Release: 25
|
Release: 26
|
||||||
Summary: Tools to manage multipath devices with the device-mapper
|
Summary: Tools to manage multipath devices with the device-mapper
|
||||||
License: GPL-2.0-or-later and LGPL-2.0-only
|
License: GPL-2.0-or-later and LGPL-2.0-only
|
||||||
URL: http://christophe.varoqui.free.fr/
|
URL: http://christophe.varoqui.free.fr/
|
||||||
@ -59,6 +59,7 @@ Patch46: 0046-libmultipath-check-for-null-wwid-before-strcmp.patch
|
|||||||
Patch47: 0047-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch
|
Patch47: 0047-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch
|
||||||
Patch48: 0048-multipath.conf.5-fix-documentation-for-find_multipat.patch
|
Patch48: 0048-multipath.conf.5-fix-documentation-for-find_multipat.patch
|
||||||
Patch49: 0049-multipath.conf.5-fix-the-description-of-prio_args-fo.patch
|
Patch49: 0049-multipath.conf.5-fix-the-description-of-prio_args-fo.patch
|
||||||
|
Patch50: 0050-multipath-display-the-correct-configuration-when-dum.patch
|
||||||
|
|
||||||
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
|
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
|
||||||
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
|
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
|
||||||
@ -206,6 +207,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 5 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.4-26
|
||||||
|
- multipath: display the correct configuration when dumpping config
|
||||||
|
|
||||||
* Fri Aug 2 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.4-25
|
* Fri Aug 2 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.4-25
|
||||||
- multipath.conf.5: fix the description of prio_args for path_latency prio
|
- multipath.conf.5: fix the description of prio_args for path_latency prio
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user