From 74fd75ab33caa21b4ef7fa35556665c84c2187e5 Mon Sep 17 00:00:00 2001 From: Christophe Varoqui Date: Sun, 22 Nov 2009 01:16:00 +0100 Subject: [PATCH] [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. --- multipathd/main.c | 19 ++++++++++++------- 1 file 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); -- 2.7.4