device-mapper-multipath/0100-libmultipath-avoid-temporarily-enabling-queueing-on-.patch
Benjamin Marzinski dbdf7ab1ce device-mapper-multipath-0.8.7-26
Add 0100-libmultipath-avoid-temporarily-enabling-queueing-on-.patch
Add 0101-multipathd-Make-sure-to-disable-queueing-if-recovery.patch
  * Fixes RHEL-17234 ("RHEL9 dm-multipath no_path_retry [retry number]
    is
    undone if paths are later lost for an open map.")
Add 0102-multipathd-remove-nopath-flushing-code-from-flush_ma.patch
Add 0103-multipathd-make-flush_map-delete-maps-like-the-multi.patch
Add 0104-multipathd-disable-queueing-when-removing-unknown-ma.patch
  * Fixes RHEL-4998 ("When remove external lun from host, rescan lun
    status
    will cause the OS hang and no response")
Resolves: RHEL-4998
Resolves: RHEL-17234
2024-01-05 10:35:33 -05:00

43 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Mon, 18 Dec 2023 16:30:42 -0500
Subject: [PATCH] libmultipath: avoid temporarily enabling queueing on reload
Instead of always enabling queueing when a map is reloaded with
no_path_retry set to a positive number, check if the map has timed out
in recovery mode, and only enable queueing if it has not. This saves
multipathd from having to disable queueing on the map immediately after
the reload.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/dmparser.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 16377c54..1ea2d619 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -61,9 +61,19 @@ int assemble_map(struct multipath *mp, char **params)
nr_priority_groups = VECTOR_SIZE(mp->pg);
initial_pg_nr = (nr_priority_groups ? mp->bestpg : 0);
- if (mp->no_path_retry != NO_PATH_RETRY_UNDEF &&
- mp->no_path_retry != NO_PATH_RETRY_FAIL) {
+ switch (mp->no_path_retry) {
+ case NO_PATH_RETRY_UNDEF:
+ case NO_PATH_RETRY_FAIL:
+ break;
+ default:
+ /* don't enable queueing if no_path_retry has timed out */
+ if (mp->in_recovery && mp->retry_tick == 0 &&
+ count_active_paths(mp) == 0)
+ break;
+ /* fallthrough */
+ case NO_PATH_RETRY_QUEUE:
add_feature(&mp->features, no_path_retry);
+ break;
}
if (mp->retain_hwhandler == RETAIN_HWHANDLER_ON &&
get_linux_version_code() < KERNEL_VERSION(4, 3, 0))