35f5570500
Update Source to upstream version 0.8.0 * Previous patches 0006 & 0007 are included in this commit Rename files * Previous patches 0008-0016 & 0100 are now patches 0018-0027 Add 0006-multipathd-Fix-miscounting-active-paths.patch Add 0007-multipathd-ignore-failed-wwid-recheck.patch * multipathd will no longer disable paths if it is unable to get their wwid on a change event Add 0008-libmutipath-continue-to-use-old-state-on-PATH_PENDIN.patch Add 0009-multipathd-use-update_path_groups-instead-of-reload_.patch Add 0010-multipath.conf-add-missing-options-to-man-page.patch Add 0011-libmultipath-add-get_uid-fallback-code-for-NVMe-devi.patch Add 0012-libmulitpath-cleanup-uid_fallback-code.patch Add 0013-multipathd-handle-changed-wwids-by-removal-and-addit.patch * if a path device changes wwid, it will now be removed and re-added to the correct multipath device. Add 0014-multipathd-remove-wwid_changed-path-attribute.patch Add 0015-multipathd-ignore-disable_changed_wwids.patch Add 0016-multipathd-Don-t-use-fallback-code-after-getting-wwi.patch Add 0017-libmultipath-silence-dm_is_mpath-error-messages.patch * The above 12 patches have been submitted upstream
48 lines
2.0 KiB
Diff
48 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Thu, 21 Feb 2019 13:05:43 -0600
|
|
Subject: [PATCH] libmutipath: continue to use old state on PATH_PENDING
|
|
|
|
When pathinfo() sets pp->state to PATH_PENDING, it can cause problems
|
|
with path checking. It should act more like check_path(). When
|
|
check_path() sees a new state of PATH_PENDING, it doesn't update the
|
|
path state at all, so a path's old state is normally never PATH_PENDING.
|
|
|
|
As and example of the problems of setting a path to PATH_PENDING, If
|
|
check_path() sets a path's state to PATH_UP, then a call to pathinfo()
|
|
sets the state to PATH_PENDING, and then another call the check_path()
|
|
sets the state to PATH_DOWN, multipathd won't fail the path in the
|
|
kernel. Also, if a path's state is PATH_PENDING, and nr_active is
|
|
recalculated, that path will count as down, even if the state was
|
|
previously PATH_UP. If a path already has a state of PATH_WILD or
|
|
PATH_UNCHECKED, changing it to PATH_PENDING won't hurt anything, and it
|
|
will help anyone who sees it know what's actually happening. But
|
|
otherwise, pathinfo() should leave the previous state alone.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmultipath/discovery.c | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
index b08cb2d..28c00e5 100644
|
|
--- a/libmultipath/discovery.c
|
|
+++ b/libmultipath/discovery.c
|
|
@@ -1946,8 +1946,11 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
|
|
|
|
if (mask & DI_CHECKER) {
|
|
if (path_state == PATH_UP) {
|
|
- pp->chkrstate = pp->state = get_state(pp, conf, 0,
|
|
- path_state);
|
|
+ int newstate = get_state(pp, conf, 0, path_state);
|
|
+ if (newstate != PATH_PENDING ||
|
|
+ pp->state == PATH_UNCHECKED ||
|
|
+ pp->state == PATH_WILD)
|
|
+ pp->chkrstate = pp->state = newstate;
|
|
if (pp->state == PATH_TIMEOUT)
|
|
pp->state = PATH_DOWN;
|
|
if (pp->state == PATH_UP && !pp->size) {
|
|
--
|
|
2.17.2
|
|
|