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@xxxxxxxxxx> --- libmultipath/discovery.c | 2 ++ libmultipath/structs.h | 1 + multipathd/main.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index af2aa20..91eab74 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -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; } diff --git a/libmultipath/structs.h b/libmultipath/structs.h index c02c76d..c1fce04 100644 --- a/libmultipath/structs.h +++ b/libmultipath/structs.h @@ -200,6 +200,7 @@ struct path { struct checker checker; struct multipath * mpp; int fd; + int initialized; /* configlet pointers */ struct hwentry * hwe; diff --git a/multipathd/main.c b/multipathd/main.c index 3aedaaa..a160d75 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1140,6 +1140,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 */ -- 1.8.3.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel