[PATCH 3/3] libmultipath: don't enter recovery mode with pending paths

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

 



set_no_path_retry() could make a multipath device enter recovery mode
simply because its paths were still in the PATH_PENDING state.  This is
possible when a multipath device is first created. After commit 2e61b8fb
[libmultipath (coverity): Revert "setup_map: wait for pending path
checkers to finish"] it has become much more likely.

To avoid this, don't enter recovery mode as long as there are some paths
in PATH_PENDING.  Since path's can only be in this state if they've
never had their state checker finish, this change will only effect
recently created devices, whose checker hasn't completed yet.

Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
 libmultipath/structs_vec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index f1031f61..6c23df86 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -616,7 +616,7 @@ void set_no_path_retry(struct multipath *mpp)
 			    !mpp->in_recovery)
 				dm_queue_if_no_path(mpp->alias, 1);
 			leave_recovery_mode(mpp);
-		} else
+		} else if (pathcount(mpp, PATH_PENDING) == 0)
 			enter_recovery_mode(mpp);
 		break;
 	}
-- 
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