[dm-devel] [PATCH v2 61/74] libmultipath: adopt_paths(): skip removed paths

mwilck at suse.com mwilck at suse.com
Wed Aug 12 11:35:06 UTC 2020


From: Martin Wilck <mwilck at suse.com>

If we don't do this, pathinfo() will fail on these paths, causing
adopt_paths() to fail.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 libmultipath/structs_vec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index f139fc0..ba3165a 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -79,9 +79,11 @@ int adopt_paths(vector pathvec, struct multipath *mpp)
 					pp->dev, mpp->alias);
 				continue;
 			}
+			pp->mpp = mpp;
+			if (pp->initialized == INIT_REMOVED)
+				continue;
 			condlog(3, "%s: ownership set to %s",
 				pp->dev, mpp->alias);
-			pp->mpp = mpp;
 
 			if (!mpp->paths && !(mpp->paths = vector_alloc()))
 				return 1;
-- 
2.28.0





More information about the dm-devel mailing list