Fixup "libmultipath: fix dev_loss_tmo even if not set in configuration"
PATCH 1/1 Fixup "libmultipath: fix dev_loss_tmo even if not set in configuration"
From: Martin Wilck <[email protected]>
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 <[email protected]>
---
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(-)
libmultipath/discovery.c +4 -2
@@ -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 &&
Signature · 6 lines
2.41.0 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel