Skip to content

Commit

Permalink
libmultipath: fix dev_loss_tmo even if not set in configuration
Browse files Browse the repository at this point in the history
If pp->dev_loss_tmo == DEV_LOSS_TMO_UNSET, sysfs_set_scsi_tmo() would
not set it to min_dev_loss_tmo, causing the system dev_loss_tmo value
(by default, 30s) to remain unchanged. Fix it.

Fixes: 6ad77db ("libmultipath: Set the scsi timeout parameters by path")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
  • Loading branch information
mwilck committed Aug 29, 2023
1 parent 44f1f08 commit 058b5f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libmultipath/discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,11 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
continue;
}

if (pp->dev_loss != DEV_LOSS_TMO_UNSET &&
pp->dev_loss < min_dev_loss) {
warn_dev_loss = true;
if (pp->dev_loss == DEV_LOSS_TMO_UNSET)
pp->dev_loss = min_dev_loss;
else if (pp->dev_loss < min_dev_loss) {
pp->dev_loss = min_dev_loss;
warn_dev_loss = true;
}
if (pp->dev_loss != DEV_LOSS_TMO_UNSET &&
pp->fast_io_fail > 0 &&
Expand Down

0 comments on commit 058b5f5

Please sign in to comment.