From 02a131adb0a2440d39cd7cac3a6d3cefe15635a7 Mon Sep 17 00:00:00 2001 From: chenrenhui Date: Mon, 30 Jun 2025 12:49:46 +0000 Subject: [PATCH] clear handled flag after coalesce_paths --- ...ar-handled-flag-after-coalesce_paths.patch | 33 +++++++++++++++++++ multipath-tools.spec | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 0023-clear-handled-flag-after-coalesce_paths.patch diff --git a/0023-clear-handled-flag-after-coalesce_paths.patch b/0023-clear-handled-flag-after-coalesce_paths.patch new file mode 100644 index 0000000..b831abe --- /dev/null +++ b/0023-clear-handled-flag-after-coalesce_paths.patch @@ -0,0 +1,33 @@ +From c1750927fa19c2fe55d03e56a16d5c10a0c890c1 Mon Sep 17 00:00:00 2001 +From: chenrenhui +Date: Tue, 1 Jul 2025 10:51:37 +0800 +Subject: [PATCH] clear handled flag after coalesce_paths + +The commit 1b4ed55ada1f("avoid handling paths repeatedly in +coalesce paths") added the handled flag for pathes, but never +clear it. This patch clears it at the end of coalesce_paths. +--- + libmultipath/configure.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libmultipath/configure.c b/libmultipath/configure.c +index 33ca591..f7ddd60 100644 +--- a/libmultipath/configure.c ++++ b/libmultipath/configure.c +@@ -1276,6 +1276,13 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid, + else + remove_map(mpp, vecs->pathvec, NULL); + } ++ ++ /* clear handled after coalesce_paths */ ++ vector_foreach_slot (pathvec, pp1, i) { ++ if (pp1->handled) ++ pp1->handled = 0; ++ } ++ + ret = CP_OK; + out: + free(size_mismatch_seen); +-- +2.33.0 + diff --git a/multipath-tools.spec b/multipath-tools.spec index 909a462..5f2aa57 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ #needsrootforbuild Name: multipath-tools Version: 0.9.5 -Release: 7 +Release: 8 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/ @@ -31,6 +31,7 @@ Patch19: 0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch Patch20: 0020-multipath.conf.5-fix-documentation-for-find_multipat.patch Patch21: 0021-multipath.conf.5-fix-the-description-of-prio_args-fo.patch Patch22: 0022-multipath-display-the-correct-configuration-when-dum.patch +Patch23: 0023-clear-handled-flag-after-coalesce_paths.patch BuildRequires: multipath-tools, libcmocka, libcmocka-devel BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 @@ -185,6 +186,9 @@ fi %changelog +* Mon Jun 30 2025 chenrenhui - 0.9.5-8 +- clear handled flag after coalesce_paths + * Tue Aug 27 2024 kouwenqi - 0.9.5-7 - sync patch22 with community -- Gitee