Skip to contentSkip to conversation

dm-multipath: Keep multipath from silently failing in path discovery

PATCH New Benjamin Marzinski 1 participant 1 message May 2, 2007 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 dm-multipath: Keep multipath from silently failing in path discovery

This patch just makes sure that multipath doesn't silently not add a path or fail.

-Ben

libmultipath/discovery.c +3 -1
diff -urpN a/libmultipath/discovery.c b/libmultipath/discovery.c
@@ -71,8 +71,10 @@ path_discover (vector pathvec, struct co
 		return 1;
 	}
 			
-	if (!filepresent(path))
+	if (!filepresent(path)){
+		condlog(3, "%s doesn't exit, not adding %s", path, devname);
 		return 0;
+	}
 
 	pp = find_path_by_dev(pathvec, devname);
 
libmultipath/structs.c +3 -1
diff -urpN a/libmultipath/structs.c b/libmultipath/structs.c
@@ -221,8 +221,10 @@ free_multipathvec (vector mpvec, int fre
 int
 store_path (vector pathvec, struct path * pp)
 {
-	if (!vector_alloc_slot(pathvec))
+	if (!vector_alloc_slot(pathvec)){
+		condlog(0, "unable to allocate space for path");
 		return 1;
+	}
 
 	vector_set_slot(pathvec, pp);