device-mapper-multipath/0002-libmultipath-handle-existing-paths-in-marginal_path-.patch
Benjamin Marzinski 719f475042 device-mapper-multipath-0.7.9-4.git2df6110
Update Source to latest upstream commit
  * previous patch 0001-libmultipath-dm_is_mpath-cleanup.patch is
    included in this commit
Rename files
  * Previous patches 0002-0009 are now patches 0006-0013
Add 0001-BZ-1668693-disable-user_friendly_names-for-NetApp.patch
Add 0002-libmultipath-handle-existing-paths-in-marginal_path-.patch
Add 0003-multipathd-cleanup-marginal-paths-checking-timers.patch
Add 0004-libmultipath-fix-marginal-paths-queueing-errors.patch
Add 0005-libmultipath-fix-marginal_paths-nr_active-check.patch
  * The above 5 patches have been submitted upstream
Add 0014-RH-Fix-nvme-compilation-warning.patch
  * This change is only necessary because of Red Hat compilation
    differences.
2019-01-31 17:04:52 -06:00

50 lines
1.5 KiB
Diff

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