libmultipath: add condition for enqueueing path to io error check
PATCH 1/1 libmultipath: add condition for enqueueing path to io error check
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.
--- libmultipath/io_err_stat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
libmultipath/io_err_stat.c +2 -1
@@ -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);
Signature · 1 line
2.45.1.windows.1
Quoted 8 lines · chenrenhui
In function
io_err_stat_handle_pathfail(),path->io_err_dis_reinstate_timeis set to 0 to enqueue path to io error check as soon as possible. But multipathd can not do it withinmarginal_path_err_recheck_gap_timeseconds after power-on, becausecurr_timeis less thanmarginal_path_err_recheck_gap_time.To handle the early marginal path, we can enqueue path when
io_err_dis_reinstate_timeis 0.
Quoted 23 lines
Signed-off-by chenrenhui <[email protected]>--- libmultipath/io_err_stat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)libmultipath/io_err_stat.c +2
-1@@ -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);Signature · 1 line
2.45.1.windows.1
Quoted 9 lines · chenrenhui
In function
io_err_stat_handle_pathfail(), path-Quoted 1 line
io_err_dis_reinstate_timeis set to 0 to enqueue path to io error check as soon as possible. But
multipathd can not do it withinmarginal_path_err_recheck_gap_timeseconds
after power-on, becausecurr_timeis less thanmarginal_path_err_recheck_gap_time.
Quoted 4 lines
To handle the early marginal path, we can enqueue path when
io_err_dis_reinstate_timeis 0.Signed-off-by chenrenhui <[email protected]>