diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 2dcafe5d2..5626d48de 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -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 &&