multipathd: always reset checker interval for failed paths
Benjamin Marzinski
maintainerPATCH 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
@@ -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
Quoted 9 lines · Benjamin Marzinski
The are multiple places in the code that can set
pp->statetoPATH_DOWNwithout resettingpp->checkint, most obviously when a path is failed byupdate_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back toconf->checkint. Fix these cases by always resetting thepp->checkinttoconf->checkintwhen updating the state of a failed path.Signed-off-by Benjamin Marzinski <[email protected]>
Quoted 17 lines
---
multipathd/main.c | 1 +1 file changed, 1 insertion(+)multipathd/main.c +0
-0@@ -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))
Quoted 11 lines · Martin Wilck
Quoted 9 lines · Benjamin Marzinski
The are multiple places in the code that can set
pp->statetoPATH_DOWNwithout resettingpp->checkint, most obviously when a path is failed byupdate_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back toconf->checkint. Fix these cases by always resetting thepp->checkinttoconf->checkintwhen updating the state of a failed path.Signed-off-by Benjamin Marzinski <[email protected]>Reviewed-by Martin Wilck <[email protected]>
Although this patch has no fixes: tag, I'll consider it for the stable branches. Objections?
Martin
Benjamin Marzinski
maintainerQuoted 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->statetoPATH_DOWNwithout resettingpp->checkint, most obviously when a path is failed byupdate_multipath(). When this happens the path will continue to be checked at its previous interval, instead of switching back toconf->checkint. Fix these cases by always resetting thepp->checkinttoconf->checkintwhen updating the state of a failed path.
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Benjamin Marzinski <[email protected]>Reviewed-by Martin Wilck <[email protected]>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