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