Blame SOURCES/0183-multipathd-Don-t-call-repair-on-blacklisted-path.patch

f20720
From 2926316c8492a1d18c7bbdac0fac75c38ce16152 Mon Sep 17 00:00:00 2001
f20720
From: Mike Christie <mchristi@redhat.com>
f20720
Date: Tue, 16 Aug 2016 11:47:16 -0500
f20720
Subject: [PATCH 07/11] multipathd: Don't call repair on blacklisted path
f20720
f20720
For BZ 1348372 from upstream commit:
f20720
f20720
Author: Mike Christie <mchristi@redhat.com>
f20720
Date:   Mon Aug 15 12:13:46 2016 -0500
f20720
f20720
    multipathd: Don't call repair on blacklisted paths
f20720
f20720
    This fixes a regression added in
f20720
    015f87b16a7797a17afd514aec46e65c2a1a2f73
f20720
f20720
    If a path is blacklisted the checkerloop will free the path so
f20720
    don't call repair on it.
f20720
f20720
    This moves the repair call down into check_path, because I think
f20720
    we also do not need to call it for other cases where we cannot get
f20720
    the uuid info or being orphaned.
f20720
f20720
Signed-off-by: Mike Christie <mchristi@redhat.com>
f20720
---
f20720
 multipathd/main.c | 22 ++++++++++++----------
f20720
 1 file changed, 12 insertions(+), 10 deletions(-)
f20720
f20720
diff --git a/multipathd/main.c b/multipathd/main.c
f20720
index d26fd22..4638c8b 100644
f20720
--- a/multipathd/main.c
f20720
+++ b/multipathd/main.c
f20720
@@ -1238,6 +1238,16 @@ int update_path_groups(struct multipath *mpp, struct vectors *vecs, int refresh)
f20720
 	return 0;
f20720
 }
f20720
 
f20720
+void repair_path(struct path * pp)
f20720
+{
f20720
+	if (pp->state != PATH_DOWN)
f20720
+		return;
f20720
+
f20720
+	checker_repair(&pp->checker);
f20720
+	if (strlen(checker_message(&pp->checker)))
f20720
+		LOG_MSG(1, checker_message(&pp->checker));
f20720
+}
f20720
+
f20720
 void
f20720
 check_path (struct vectors * vecs, struct path * pp)
f20720
 {
f20720
@@ -1352,6 +1362,7 @@ check_path (struct vectors * vecs, struct path * pp)
f20720
 			pp->mpp->failback_tick = 0;
f20720
 
f20720
 			pp->mpp->stat_path_failures++;
f20720
+			repair_path(pp);
f20720
 			return;
f20720
 		}
f20720
 
f20720
@@ -1431,7 +1442,7 @@ check_path (struct vectors * vecs, struct path * pp)
f20720
 	}
f20720
 
f20720
 	pp->state = newstate;
f20720
-
f20720
+	repair_path(pp);
f20720
 
f20720
 	if (pp->mpp->wait_for_udev)
f20720
 		return;
f20720
@@ -1455,14 +1466,6 @@ check_path (struct vectors * vecs, struct path * pp)
f20720
 	}
f20720
 }
f20720
 
f20720
-void repair_path(struct vectors * vecs, struct path * pp)
f20720
-{
f20720
-	if (pp->state != PATH_DOWN)
f20720
-		return;
f20720
-
f20720
-	checker_repair(&pp->checker);
f20720
-}
f20720
-
f20720
 static void *
f20720
 checkerloop (void *ap)
f20720
 {
f20720
@@ -1491,7 +1494,6 @@ checkerloop (void *ap)
f20720
 		if (vecs->pathvec) {
f20720
 			vector_foreach_slot (vecs->pathvec, pp, i) {
f20720
 				check_path(vecs, pp);
f20720
-				repair_path(vecs, pp);
f20720
 			}
f20720
 		}
f20720
 		if (vecs->mpvec) {
f20720
-- 
f20720
1.8.3.1
f20720