Skip to content

Commit

Permalink
libmultipath: don't set dev_loss_tmo to 0 for NO_PATH_RETRY_FAIL
Browse files Browse the repository at this point in the history
If pp->dev_loss is DEV_LOSS_TMO_UNSET and min_dev_loss is 0 (which is
the case if no_path_retry is NO_PATH_RETRY_FAIL or NO_PATH_RETRY_UNDEF),
we will set pp->dev_loss to 0, which is wrong. Fix it.

Fixes: 058b5f5 ("libmultipath: fix dev_loss_tmo even if not set in configuration")
Signed-off-by: Martin Wilck <[email protected]>
  • Loading branch information
mwilck committed Nov 12, 2024
1 parent 8904ab8 commit 48cc087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmultipath/discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
continue;
}

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

0 comments on commit 48cc087

Please sign in to comment.