[dm-devel] [PATCH 25/35] libmultipath: pathinfo(): don't filter emtpy devnode names

mwilck at suse.com mwilck at suse.com
Thu Jul 9 10:16:10 UTC 2020


From: Martin Wilck <mwilck at suse.com>

In the update_multipath_strings() code path (disassemble_map()),
we set an empty devname if we find devices in maps that are not
in pathvec and not in sysfs. We shouldn't filter these devices
by devnode, because failure in pathinfo() causes e.g. adopt_paths()
to bail out, and this may cause a map removal even if the map
contains other, perfectly valid paths.

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 libmultipath/discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 2e559d8..10b5a28 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -2069,7 +2069,7 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
 			return PATHINFO_SKIPPED;
 	}
 
-	if (filter_devnode(conf->blist_devnode,
+	if (strlen(pp->dev) != 0 && filter_devnode(conf->blist_devnode,
 			   conf->elist_devnode,
 			   pp->dev) > 0)
 		return PATHINFO_SKIPPED;
-- 
2.26.2





More information about the dm-devel mailing list