sync patch50 with community
This commit is contained in:
parent
4142437018
commit
4cdee0e8e5
@ -1,54 +1,44 @@
|
|||||||
From d03a21a3474993cdf95c73da7ea70308659c3d70 Mon Sep 17 00:00:00 2001
|
From 0802e9dfd27e2333615e8068d7fa55a614bef92e Mon Sep 17 00:00:00 2001
|
||||||
From: Kou Wenqi <kouwenqi@kylinos.cn>
|
From: Kou Wenqi <kouwenqi@kylinos.cn>
|
||||||
Date: Mon, 5 Aug 2024 14:35:06 +0800
|
Date: Tue, 13 Aug 2024 10:12:36 +0800
|
||||||
Subject: [PATCH] multipath: display the correct configuration when dumpping
|
Subject: [PATCH] multipath: display the correct configuration when dumping
|
||||||
config
|
config
|
||||||
|
|
||||||
"multipath -t" and "multipath -T" might show the wrong
|
"multipath -t" and "multipath -T" might show the wrong
|
||||||
multipathd configuration items "retrigger_tries" and
|
multipathd configuration items "retrigger_tries" and
|
||||||
"force_sync". Make sure they don't.
|
"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 | 8 ++++++++
|
multipath/main.c | 7 +++++--
|
||||||
1 file changed, 8 insertions(+)
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/multipath/main.c b/multipath/main.c
|
diff --git a/multipath/main.c b/multipath/main.c
|
||||||
index 3c5a70e..f52430f 100644
|
index 65f2949..4853d17 100644
|
||||||
--- a/multipath/main.c
|
--- a/multipath/main.c
|
||||||
+++ b/multipath/main.c
|
+++ b/multipath/main.c
|
||||||
@@ -866,6 +866,8 @@ main (int argc, char *argv[])
|
@@ -875,8 +875,6 @@ 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)
|
if (!conf)
|
||||||
exit(RTVL_FAIL);
|
exit(RTVL_FAIL);
|
||||||
multipath_conf = conf;
|
multipath_conf = conf;
|
||||||
+ retrigger_tries_ori = conf->retrigger_tries;
|
- conf->retrigger_tries = 0;
|
||||||
conf->retrigger_tries = 0;
|
- conf->force_sync = 1;
|
||||||
+ force_sync_ori = conf->force_sync;
|
|
||||||
conf->force_sync = 1;
|
|
||||||
while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) {
|
||||||
switch(arg) {
|
switch(arg) {
|
||||||
@@ -944,10 +948,14 @@ main (int argc, char *argv[])
|
case 1: printf("optarg : %s\n",optarg);
|
||||||
conf->find_multipaths = FIND_MULTIPATHS_GREEDY;
|
@@ -1017,6 +1015,11 @@ main (int argc, char *argv[])
|
||||||
break;
|
|
||||||
case 't':
|
libmp_udev_set_sync_support(1);
|
||||||
+ conf->retrigger_tries = retrigger_tries_ori;
|
|
||||||
+ conf->force_sync = force_sync_ori;
|
+ if (cmd != CMD_DUMP_CONFIG) {
|
||||||
r = dump_config(conf, NULL, NULL) ? RTVL_FAIL : RTVL_OK;
|
+ conf->retrigger_tries = 0;
|
||||||
goto out_free_config;
|
+ conf->force_sync = 1;
|
||||||
case 'T':
|
+ }
|
||||||
cmd = CMD_DUMP_CONFIG;
|
+
|
||||||
+ conf->retrigger_tries = retrigger_tries_ori;
|
if (init_checkers(conf->multipath_dir)) {
|
||||||
+ conf->force_sync = force_sync_ori;
|
condlog(0, "failed to initialize checkers");
|
||||||
break;
|
goto out;
|
||||||
case 'h':
|
|
||||||
usage(argv[0]);
|
|
||||||
--
|
--
|
||||||
2.27.0
|
2.27.0
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: multipath-tools
|
Name: multipath-tools
|
||||||
Version: 0.8.4
|
Version: 0.8.4
|
||||||
Release: 29
|
Release: 30
|
||||||
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/
|
||||||
@ -210,6 +210,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 27 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.4-30
|
||||||
|
- sync patch50 with community
|
||||||
|
|
||||||
* Wed Aug 21 2024 Jiaming Zhang <zhangjiaming@cqsoftware.com.cn> - 0.8.4-29
|
* Wed Aug 21 2024 Jiaming Zhang <zhangjiaming@cqsoftware.com.cn> - 0.8.4-29
|
||||||
- Added 'Buildarch:noarch' to the help subpackage
|
- Added 'Buildarch:noarch' to the help subpackage
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user