@@ -213,7 +213,7 @@ void checker_put (struct checker * dst)
void checker_repair (struct checker * c)
{
- if (!c)
+ if (!c || !checker_selected(c))
return;
c->message[0] = '\0';
@@ -1442,6 +1442,16 @@ int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh)
return 0;
}
+void repair_path(struct path * pp)
+{
+ if (pp->state != PATH_DOWN)
+ return;
+
+ checker_repair(&pp->checker);
+ if (strlen(checker_message(&pp->checker)))
+ LOG_MSG(1, checker_message(&pp->checker));
+}
+
/*
* Returns '1' if the path has been checked, '-1' if it was blacklisted
* and '0' otherwise
@@ -1606,6 +1616,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
pp->mpp->failback_tick = 0;
pp->mpp->stat_path_failures++;
+ repair_path(pp);
return 1;
}
@@ -1700,7 +1711,7 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
}
pp->state = newstate;
-
+ repair_path(pp);
if (pp->mpp->wait_for_udev)
return 1;
@@ -1725,14 +1736,6 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
return 1;
}
-void repair_path(struct vectors * vecs, struct path * pp)
-{
- if (pp->state != PATH_DOWN)
- return;
-
- checker_repair(&pp->checker);
-}
-
static void *
checkerloop (void *ap)
{
@@ -1804,7 +1807,6 @@ checkerloop (void *ap)
i--;
} else
num_paths += rc;
- repair_path(vecs, pp);
}
lock_cleanup_pop(vecs->lock);
}