@@ -1250,6 +1250,7 @@ pathinfo (struct path *pp, vector hwtable, int mask)
}
}
+ pp->initialized = 1;
return 0;
blank:
@@ -1258,6 +1259,7 @@ blank:
*/
memset(pp->wwid, 0, WWID_SIZE);
pp->chkrstate = pp->state = PATH_DOWN;
+ pp->initialized = 0;
return 0;
}
@@ -186,6 +186,7 @@ struct path {
struct checker checker;
struct multipath * mpp;
int fd;
+ int initialized;
/* configlet pointers */
struct hwentry * hwe;
@@ -1124,6 +1124,9 @@ check_path (struct vectors * vecs, struct path * pp)
int chkr_new_path_up = 0;
int oldchkrstate = pp->chkrstate;
+ if (pp->initialized && !pp->mpp)
+ return 0;
+
if (pp->tick && --pp->tick)
return 0; /* don't check this path yet */
With find_multipaths enabled, there can be non-blacklisted paths that are not supposed to be part of any multipath device. To make sure that check_path doesn't keep checking them, this patch marks paths which are fully initialized. Only uninitialized paths are checked, if they don't belong to a multipath device. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- libmultipath/discovery.c | 2 ++ libmultipath/structs.h | 1 + multipathd/main.c | 3 +++ 3 files changed, 6 insertions(+)