[dm-devel] [PATCH] dm-multipath: Keep multipath from silently failing in path discovery
Benjamin Marzinski
bmarzins at redhat.com
Wed May 2 00:26:10 UTC 2007
This patch just makes sure that multipath doesn't silently not add a path or
fail.
-Ben
-------------- next part --------------
diff -urpN a/libmultipath/discovery.c b/libmultipath/discovery.c
--- a/libmultipath/discovery.c 2007-04-06 12:54:05.000000000 -0500
+++ b/libmultipath/discovery.c 2007-05-01 19:19:24.000000000 -0500
@@ -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);
diff -urpN a/libmultipath/structs.c b/libmultipath/structs.c
--- a/libmultipath/structs.c 2006-11-27 17:16:41.000000000 -0600
+++ b/libmultipath/structs.c 2007-05-01 19:20:24.000000000 -0500
@@ -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);
More information about the dm-devel
mailing list