device-mapper-multipath/0113-libmultipath-pad-dev_loss_tmo-to-avoid-race-with-no_.patch
Benjamin Marzinski 9ae3e98286 device-mapper-multipath-0.8.7-29
Add 0110-libmultipath-keep-track-of-queueing-state-in-feature.patch
Add 0111-libmultipath-export-partmap_in_use.patch
Add 0112-libmultipath-change-flush_on_last_del-to-fix-a-multi.patch
Add 0113-libmultipath-pad-dev_loss_tmo-to-avoid-race-with-no_.patch
  * Fixes RHEL-30272
Add 0114-libmultipath-remove-pathgroup-wildcard-options.patch
Add 0115-libmultipath-print-all-values-in-snprint_failback.patch
Add 0116-multipathd-Stop-double-counting-map-failures-for-no_.patch
Add 0117-multipath-tools-man-pages-add-missing-multipathd-com.patch
Add 0118-libmultipath-change-the-vend-prod-rev-printing.patch
Add 0119-multipath-tools-man-pages-Add-format-wildcard-descri.patch
  * Fixes RHEL-8304
Resolves: RHEL-8304
Resolves: RHEL-30272
2024-05-22 00:09:52 -04:00

41 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Thu, 25 Apr 2024 19:35:16 -0400
Subject: [PATCH] libmultipath: pad dev_loss_tmo to avoid race with
no_path_retry
Currently multipath makes sure that dev_loss_tmo is at least as long as
the configured no path queueing time. The goal is to make sure that path
devices aren't removed while the multipath device is still queueing in
hopes that they will become usable again.
This is racy. Multipathd may take longer to check the paths than
configured. If strict_timing isn't set, it will definitely take longer.
To account for this, pad the minimum dev_loss_tmo value by five seconds
(one default checker interval) plus one second per minute of no path
queueing time.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/discovery.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index ae7eb7e6..b24594cd 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -884,6 +884,11 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp)
uint64_t no_path_retry_tmo =
(uint64_t)mpp->no_path_retry * conf->checkint;
+ /* pad no_path_retry_tmo by one standard check interval
+ * plus one second per minute to account for timing
+ * issues with the rechecks */
+ no_path_retry_tmo += no_path_retry_tmo / 60 + DEFAULT_CHECKINT;
+
if (no_path_retry_tmo > MAX_DEV_LOSS_TMO)
min_dev_loss = MAX_DEV_LOSS_TMO;
else