[PATCH 05/10] mpath: don't wait for udev if all paths are down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Normally multipath waits for udev to create a device before adding
more paths, which could trigger a reload. But, if the first path
discovered is not usable, you should add the next path right away.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 multipathd/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index dbcaa03..15c957a 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -715,7 +715,10 @@ ev_add_path (struct path * pp, struct vectors * vecs)
 		goto fail; /* leave path added to pathvec */
 	}
 	mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
-	if (mpp && mpp->wait_for_udev) {
+	if (mpp && mpp->wait_for_udev &&
+	    (pathcount(mpp, PATH_UP) > 0 ||
+	     (pathcount(mpp, PATH_GHOST) > 0 && pp->tpgs != TPGS_IMPLICIT))) {
+		/* if wait_for_udev is set and valid paths exist */
 		mpp->wait_for_udev = 2;
 		orphan_path(pp, "waiting for create to complete");
 		return 0;
-- 
1.8.3.1

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux