[PATCH] libmultipath: add condition for enqueueing path to io error check

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

 



In function io_err_stat_handle_pathfail(), path->io_err_dis_reinstate_time
is set to 0 to enqueue path to io error check as soon as possible. But
multipathd can not do it within marginal_path_err_recheck_gap_time seconds
after power-on, because curr_time is less than
marginal_path_err_recheck_gap_time.

To handle the early marginal path, we can enqueue path when
io_err_dis_reinstate_time is 0.

Signed-off-by: chenrenhui <chenrenhui1@xxxxxxxxxx>
---
 libmultipath/io_err_stat.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
index 4996c0b0..879c310a 100644
--- a/libmultipath/io_err_stat.c
+++ b/libmultipath/io_err_stat.c
@@ -367,7 +367,8 @@ int need_io_err_check(struct path *pp)
 		return 1;
 	get_monotonic_time(&curr_time);
 	if ((curr_time.tv_sec - pp->io_err_dis_reinstate_time) >
-	    pp->mpp->marginal_path_err_recheck_gap_time) {
+	    pp->mpp->marginal_path_err_recheck_gap_time ||
+            pp->io_err_dis_reinstate_time == 0) {
 		io_err_stat_log(4, "%s: reschedule checking after %d seconds",
 				pp->dev,
 				pp->mpp->marginal_path_err_recheck_gap_time);
-- 
2.45.1.windows.1





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

  Powered by Linux