summaryrefslogtreecommitdiff
path: root/multipathd
diff options
context:
space:
mode:
authorChristophe Varoqui <christophe.varoqui@free.fr>2009-11-22 01:16:00 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2009-11-22 01:16:00 +0100
commit74fd75ab33caa21b4ef7fa35556665c84c2187e5 (patch)
treea862f082ab79b76b479583ca5c6327de946f8192 /multipathd
parent8786ce4fa75011af16b86c3cd7c7301d09ad443d (diff)
downloadmultipath-tools-74fd75ab33caa21b4ef7fa35556665c84c2187e5.tar.gz
multipath-tools-74fd75ab33caa21b4ef7fa35556665c84c2187e5.tar.bz2
multipath-tools-74fd75ab33caa21b4ef7fa35556665c84c2187e5.zip
[multipathd] give ev_add_path() separated failure messages
when the multipath already exists and 1/ new path size is 0 2/ new path size is different than the multipath known size as per Chandra Seetharaman recommendation.
Diffstat (limited to 'multipathd')
-rw-r--r--multipathd/main.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index ca26ae8..73b06cb 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -398,16 +398,21 @@ ev_add_path (char * devname, struct vectors * vecs)
mpp = pp->mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
rescan:
if (mpp) {
- if ((!pp->size) || (mpp->size != pp->size)) {
+ if ((!pp->size) || (mpp->size != pp->size)) {
+ if (!pp->size)
+ condlog(0, "%s: failed to add new path %s, "
+ "device size is 0",
+ devname, pp->dev);
+ else
condlog(0, "%s: failed to add new path %s, "
"device size mismatch",
devname, pp->dev);
- int i = find_slot(vecs->pathvec, (void *)pp);
- if (i != -1)
- vector_del_slot(vecs->pathvec, i);
- free_path(pp);
- return 1;
- }
+ int i = find_slot(vecs->pathvec, (void *)pp);
+ if (i != -1)
+ vector_del_slot(vecs->pathvec, i);
+ free_path(pp);
+ return 1;
+ }
condlog(4,"%s: adopting all paths for path %s",
mpp->alias, pp->dev);