@@ -2026,26 +2026,17 @@ missing_uev_wait_tick(struct multipath *mpp, bool *timed_out)
return false;
}
-static void
-ghost_delay_tick(struct vectors *vecs)
+static bool
+ghost_delay_tick(struct multipath * mpp)
{
- struct multipath * mpp;
- int i;
-
- vector_foreach_slot (vecs->mpvec, mpp, i) {
- if (mpp->ghost_delay_tick <= 0)
- continue;
- if (--mpp->ghost_delay_tick <= 0) {
- condlog(0, "%s: timed out waiting for active path",
- mpp->alias);
- mpp->force_udev_reload = 1;
- if (update_map(mpp, vecs, 0) != 0) {
- /* update_map removed map */
- i--;
- continue;
- }
- }
+ if (mpp->ghost_delay_tick <= 0)
+ return false;
+ if (--mpp->ghost_delay_tick <= 0) {
+ condlog(0, "%s: timed out waiting for active path", mpp->alias);
+ mpp->force_udev_reload = 1;
+ return true;
}
+ return false;
}
static bool deferred_failback_tick(struct multipath *mpp)
@@ -2941,7 +2932,8 @@ 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) &&
+ if ((missing_uev_wait_tick(mpp, &uev_timed_out) ||
+ ghost_delay_tick(mpp)) &&
update_map(mpp, vecs, 0)) {
/* multipath device deleted */
i--;
@@ -2958,7 +2950,6 @@ static void checker_finished(struct vectors *vecs)
}
if (uev_timed_out && !need_to_delay_reconfig(vecs))
unblock_reconfigure();
- ghost_delay_tick(vecs);
partial_retrigger_tick(vecs->pathvec);
}
Instead, move the call into the existing mpvec loop and call update_map() from checker_finished(). Signed-off-by: Martin Wilck <mwilck@suse.com> --- multipathd/main.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-)