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