Blame SOURCES/0002-libmultipath-handle-existing-paths-in-marginal_path-.patch

b7ef27
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
b7ef27
From: Benjamin Marzinski <bmarzins@redhat.com>
b7ef27
Date: Fri, 25 Jan 2019 16:45:26 -0600
b7ef27
Subject: [PATCH] libmultipath: handle existing paths in marginal_path enqueue
b7ef27
b7ef27
If the path that enqueue_io_err_stat_by_path() is trying to add
b7ef27
is already on the list, just return success. There's no reason
b7ef27
to fail in this case.
b7ef27
b7ef27
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
b7ef27
---
b7ef27
 libmultipath/io_err_stat.c | 6 ++----
b7ef27
 1 file changed, 2 insertions(+), 4 deletions(-)
b7ef27
b7ef27
diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
b7ef27
index 02b1453..1cb3ffe 100644
b7ef27
--- a/libmultipath/io_err_stat.c
b7ef27
+++ b/libmultipath/io_err_stat.c
b7ef27
@@ -254,7 +254,6 @@ static void free_io_err_pathvec(struct io_err_stat_pathvec *p)
b7ef27
  * return value
b7ef27
  * 0: enqueue OK
b7ef27
  * 1: fails because of internal error
b7ef27
- * 2: fails because of existing already
b7ef27
  */
b7ef27
 static int enqueue_io_err_stat_by_path(struct path *path)
b7ef27
 {
b7ef27
@@ -264,7 +263,7 @@ static int enqueue_io_err_stat_by_path(struct path *path)
b7ef27
 	p = find_err_path_by_dev(paths->pathvec, path->dev);
b7ef27
 	if (p) {
b7ef27
 		pthread_mutex_unlock(&paths->mutex);
b7ef27
-		return 2;
b7ef27
+		return 0;
b7ef27
 	}
b7ef27
 	pthread_mutex_unlock(&paths->mutex);
b7ef27
 
b7ef27
@@ -418,9 +417,8 @@ int hit_io_err_recheck_time(struct path *pp)
b7ef27
 			io_err_stat_log(3, "%s: enqueue fails, to recover",
b7ef27
 					pp->dev);
b7ef27
 			goto recover;
b7ef27
-		} else if (!r) {
b7ef27
+		} else
b7ef27
 			pp->io_err_pathfail_cnt = PATH_IO_ERR_IN_CHECKING;
b7ef27
-		}
b7ef27
 	}
b7ef27
 
b7ef27
 	return 1;
b7ef27
-- 
b7ef27
2.17.2
b7ef27