From: Martin Wilck <mwilck@xxxxxxxx> My previous patch "libmultipath: fix dev_loss_tmo even if not set in configuration" implicitly assumed that DEV_LOSS_TMO is 0, which is true but unclean. Make the intention of the code more explicit. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- Ben: If you ack this, I'll squash it into the previous patch. Also, please have a look at https://listman.redhat.com/archives/dm-devel/2023-June/055113.html (I know the commit message is truncated, will fix). If this passes, I'd like to submit to Christophe this week. --- libmultipath/discovery.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 285cbd6..5626d48 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -895,9 +895,11 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp) continue; } - if (pp->dev_loss < min_dev_loss) { - warn_dev_loss = (pp->dev_loss != DEV_LOSS_TMO_UNSET); + 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 && -- 2.41.0 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel