Skip to contentSkip to conversation

two multipathd fixes

PATCH In review Martin Wilck 3 participants 6 messages Nov 13, 2018 – Nov 14, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

cover two multipathd fixes

Hi Christophe,

Two small fixes, based on my prior submissions which have been acked by Ben.

Martin

Martin Wilck (2):
multipathd: fix irritating "minor number mismatch" message
multipathd: reset delay_wait_checks counter on failure

 multipathd/main.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/2 multipathd: fix irritating "minor number mismatch" message

This is really an alias mismatch, not a minor number mismatch.

---
 multipathd/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
multipathd/main.c +2 -2
index 6289718d..0dddddb3 100644
@@ -778,8 +778,8 @@ uev_remove_map (struct uevent * uev, struct vectors * vecs)
 		goto out;
 	}
 	if (strcmp(mpp->alias, alias)) {
-		condlog(2, "%s: minor number mismatch (map %d, event %d)",
-			mpp->alias, mpp->dmi->minor, minor);
+		condlog(2, "%s: map alias mismatch: have \"%s\", got \"%s\")",
+			uev->kernel, mpp->alias, alias);
 		goto out;
 	}
 
Signature · 1 line
2.19.1
#2 lore raw

PATCH 2/2 multipathd: reset delay_wait_checks counter on failure

In reply to Martin Wilck

If path reinstantiation is delayed by delay_wait_checks, wait_checks is counting down, the path fails during the delay phase, and then comes up again, the wait_check counter starts counting down at the same value where it previously stopped, which may be very low (even 1).

To avoid that, reset the counter to pp->delay_wait_checks if a failure is encountered during the delay phase.

---
 multipathd/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
multipathd/main.c +5 -1
index 0dddddb3..622aa1ac 100644
@@ -2035,8 +2035,12 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
 					pp->wait_checks = pp->mpp->delay_wait_checks;
 					pp->watch_checks = 0;
 				}
-			}else
+			} else {
 				fail_path(pp, 0);
+				if (pp->wait_checks > 0)
+					pp->wait_checks =
+						pp->mpp->delay_wait_checks;
+			}
 
 			/*
 			 * cancel scheduled failback
Signature · 1 line
2.19.1
#3 lore raw
In reply to Martin Wilck

Merged.
Thanks.

Quoted 18 lines · Martin Wilck

Hi Christophe,

Two small fixes, based on my prior submissions which have been acked by Ben.

Martin

Martin Wilck (2):
multipathd: fix irritating "minor number mismatch" message
multipathd: reset delay_wait_checks counter on failure

 multipathd/main.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--
2.19.1