device-mapper-multipath/0019-libmultipath-Don-t-blank-intialized-paths.patch
Benjamin Marzinski 996407fc5f device-mapper-multipath-0.7.7-7.gitb80318b
Update Source to latest upstream commit
Rename files
  * Previous patches 0001-0020 are now patches 0002-0021
  * Previous patches 0021-0028 are now patches 0026-0033
Add 0001-kpartx-Use-absolute-paths-to-create-mappings.patch
Add 0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch
Add 0023-libmultipath-remove-max_fds-code-duplication.patch
Add 0024-multipathd-set-return-code-for-multipathd-commands.patch
Add 0025-mpathpersist-fix-registration-rollback-issue.patch
  * The above 5 patches have been submitted upstream
2018-10-10 00:16:58 -05:00

36 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Fri, 21 Sep 2018 16:03:35 -0500
Subject: [PATCH] libmultipath: Don't blank intialized paths
When pathinfo fails for some likely transient reason, it clears the path
wwid, but otherwise returns successfully, to keep the path around but
not usable until it gets fully initialized. However, if the path has
already been initialized, and pathinfo hits a transient error, it
shouldn't clear the wwid.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/discovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 301093f..b267f07 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -2004,9 +2004,9 @@ blank:
/*
* Recoverable error, for example faulty or offline path
*/
- memset(pp->wwid, 0, WWID_SIZE);
pp->chkrstate = pp->state = PATH_DOWN;
- pp->initialized = INIT_FAILED;
+ if (pp->initialized == INIT_FAILED)
+ memset(pp->wwid, 0, WWID_SIZE);
return PATHINFO_OK;
}
--
2.7.4