diff mbox series

[13/13] multipathd: only call reload_and_sync_map() when ghost delay expires

Message ID 20241206233617.382200-14-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: Benjamin Marzinski
Headers show
Series multipathd: More map reload handling, and checkerloop work | expand

Commit Message

Martin Wilck Dec. 6, 2024, 11:36 p.m. UTC
While we're waiting for active paths to appear when ghost delay is
enabled, we do add new paths to multipathd's internal mpp data structure
as they are discovered (unlike missing uevent case, where we orphan
the paths instead). When the ghost_delay timer expires, it should be
sufficient to call the more light-weight reload_and_sync_map() instead
of update_map().

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index e48fa79..8cca0ce 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2932,8 +2932,7 @@  static void checker_finished(struct vectors *vecs)
 	int i;
 
 	vector_foreach_slot(vecs->mpvec, mpp, i) {
-		if ((missing_uev_wait_tick(mpp, &uev_timed_out) ||
-		     ghost_delay_tick(mpp)) &&
+		if (missing_uev_wait_tick(mpp, &uev_timed_out) &&
 		    update_map(mpp, vecs, 0)) {
 			/* multipath device deleted */
 			i--;
@@ -2941,7 +2940,8 @@  static void checker_finished(struct vectors *vecs)
 		}
 		if ((update_mpp_prio(mpp) ||
 		     (mpp->need_reload && mpp->synced_count > 0) ||
-		     deferred_failback_tick(mpp)) &&
+		     deferred_failback_tick(mpp) ||
+		     ghost_delay_tick(mpp)) &&
 		    reload_and_sync_map(mpp, vecs) == 2)
 			/* multipath device deleted */
 			i--;