Skip to contentSkip to conversation

multipathd: always reset checker interval for failed paths

PATCH In review Benjamin Marzinski 2 participants 4 messages May 22, 2025 – May 28, 2025 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 multipathd: always reset checker interval for failed paths

The are multiple places in the code that can set pp->state to PATH_DOWN without resetting pp->checkint, most obviously when a path is failed by update_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back to conf->checkint. Fix these cases by always resetting the pp->checkint to conf->checkint when updating the state of a failed path.

---
 multipathd/main.c | 1 +
 1 file changed, 1 insertion(+)
multipathd/main.c +1 -0
index d4928d80..2d5c146d 100644
@@ -2711,6 +2711,7 @@ update_path_state (struct vectors * vecs, struct path * pp)
 			else
 				LOG_MSG(2, pp);
 		}
+		pp->checkint = checkint;
 	}
 	if (pp->mpp->prio_update == PRIO_UPDATE_NONE &&
 	    (newstate == PATH_UP || newstate == PATH_GHOST))
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Benjamin Marzinski

The are multiple places in the code that can set pp->state to PATH_DOWN without resetting pp->checkint, most obviously when a path is failed by update_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back to conf->checkint. Fix these cases by always resetting the pp->checkint to conf->checkint when updating the state of a failed path.

Quoted 17 lines

---
 multipathd/main.c | 1 +

 1 file changed, 1 insertion(+)
multipathd/main.c +0 -0
index d4928d80..2d5c146d 100644
@@ -2711,6 +2711,7 @@ update_path_state (struct vectors * vecs,
 struct path * pp)

  else
  LOG_MSG(2, pp);
  }

multipathd/main.c +1 -0
+		pp->checkint = checkint;

  }
  if (pp->mpp->prio_update == PRIO_UPDATE_NONE && (newstate == PATH_UP || newstate == PATH_GHOST))

#2 lore raw
Quoted 11 lines · Martin Wilck
Quoted 9 lines · Benjamin Marzinski

The are multiple places in the code that can set pp->state to PATH_DOWN without resetting pp->checkint, most obviously when a path is failed by update_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back to conf->checkint. Fix these cases by always resetting the pp->checkint to conf->checkint when updating the state of a failed path.

Although this patch has no fixes: tag, I'll consider it for the stable branches. Objections?

Martin

author maintainer
#3 lore raw
Quoted 10 lines · Martin Wilck
Quoted 9 lines · Martin Wilck
Quoted 8 lines · Benjamin Marzinski

The are multiple places in the code that can set pp->state to PATH_DOWN without resetting pp->checkint, most obviously when a path is failed by update_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back to conf->checkint. Fix these cases by always resetting the pp->checkint to conf->checkint when updating the state of a failed path.

Quoted 5 lines
Quoted 2 lines
Quoted 1 line

Although this patch has no fixes: tag, I'll consider it for the stable branches. Objections?

Yeah. It makes sense for the stable branches.

-Ben

Quoted 2 lines

Martin