[dm-devel] [PATCH 1/3] libmultipath: fix DI_NOIO pathinfo PATH_PENDING handling
Benjamin Marzinski
bmarzins at redhat.com
Thu Dec 23 01:32:33 UTC 2021
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 at redhat.com>
---
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
More information about the dm-devel
mailing list