[PATCH 1/3] libmultipath: fix DI_NOIO pathinfo PATH_PENDING handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



pp->state should only be set to PATH_PENDING if it is currently in
the PATH_UNCHECKED or PATH_WILD states. Otherwise, it should retain
its current state.  Fix this in pathinfo() calls with DI_NOIO, to
match with the rest of the code.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/discovery.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 7d939ae0..6e5d1005 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -2345,7 +2345,10 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
 			 * Avoid any IO on the device itself.
 			 * simply use the path_offline() return as its state
 			 */
-			pp->chkrstate = pp->state = path_state;
+			if (path_state != PATH_PENDING ||
+			    pp->state == PATH_UNCHECKED ||
+			    pp->state == PATH_WILD)
+				pp->chkrstate = pp->state = path_state;
 		return PATHINFO_OK;
 	}
 
-- 
2.17.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux