diff --git a/0022-multipath-display-the-correct-configuration-when-dum.patch b/0022-multipath-display-the-correct-configuration-when-dum.patch index 1a1d6b5a1efb2b74cab1b0e4f97cdadd2563ff7b..70cc6a8f4e51b714afd9a24a037af5a3fbbec26c 100644 --- a/0022-multipath-display-the-correct-configuration-when-dum.patch +++ b/0022-multipath-display-the-correct-configuration-when-dum.patch @@ -1,54 +1,44 @@ -From 1c254fdc42fe238fd475f724a948d22d1951791e Mon Sep 17 00:00:00 2001 +From 0802e9dfd27e2333615e8068d7fa55a614bef92e Mon Sep 17 00:00:00 2001 From: Kou Wenqi -Date: Mon, 24 Jun 2024 13:40:30 +0800 -Subject: [PATCH] multipath: display the correct configuration when dumpping +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 +Reviewed-by: Martin Wilck --- - multipath/main.c | 8 ++++++++ - 1 file changed, 8 insertions(+) + multipath/main.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/multipath/main.c b/multipath/main.c -index 90f940f..1ab313d 100644 +index 90f940f..69acd06 100644 --- a/multipath/main.c +++ b/multipath/main.c -@@ -828,6 +828,8 @@ main (int argc, char *argv[]) - struct config *conf; - int retries = -1; - bool enable_foreign = false; -+ int retrigger_tries_ori; -+ int force_sync_ori; - - libmultipath_init(); - if (atexit(dm_lib_exit) || atexit(libmultipath_exit)) -@@ -838,7 +840,9 @@ main (int argc, char *argv[]) +@@ -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(); -+ retrigger_tries_ori = conf->retrigger_tries; - conf->retrigger_tries = 0; -+ force_sync_ori = conf->force_sync; - conf->force_sync = 1; +- conf->retrigger_tries = 0; +- conf->force_sync = 1; if (atexit(cleanup_vecs)) condlog(1, "failed to register cleanup handler for vecs: %m"); -@@ -908,10 +912,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; - case 'T': - cmd = CMD_DUMP_CONFIG; -+ conf->retrigger_tries = retrigger_tries_ori; -+ conf->force_sync = force_sync_ori; - break; - case 'h': - usage(argv[0]); + 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 diff --git a/multipath-tools.spec b/multipath-tools.spec index 080b1973ce8b4fdc3e2c6c8fe0c94673bb2a2059..909a4623aa841178b4b8d2b998492019e87ed0ae 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ #needsrootforbuild Name: multipath-tools Version: 0.9.5 -Release: 6 +Release: 7 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -185,6 +185,9 @@ fi %changelog +* Tue Aug 27 2024 kouwenqi - 0.9.5-7 +- sync patch22 with community + * Tue Aug 20 2024 Jiaming Zhang - 0.9.5-6 - Added 'Buildarch:noarch' to the help subpackage