Skip to content

Commit

Permalink
libmultipath: add condition for enqueueing path to io error check
Browse files Browse the repository at this point in the history
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@huawei.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>

>

(cherry picked from commit a1e3cf2)
  • Loading branch information
chenrenhui-hw authored and mwilck committed Jan 17, 2025
1 parent 3dc6a89 commit b3d82d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libmultipath/io_err_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b3d82d8

Please sign in to comment.