diff --git a/0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch b/0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch new file mode 100644 index 0000000000000000000000000000000000000000..fe311c726d8102545858a9daeaa5ae8e353dd410 --- /dev/null +++ b/0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch @@ -0,0 +1,53 @@ +From cc63b6025b423e1d89388c0b3dbae3e67cb0436b Mon Sep 17 00:00:00 2001 +From: Martin Wilck +Date: Tue, 22 Aug 2023 16:21:43 +0200 +Subject: [PATCH] libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN + +"multipath -d" might change sysfs timeouts of SCSI devices. +Make sure it doesn't. + +Signed-off-by: Martin Wilck +Cc: Jehan Singh +Reviewed-by: Benjamin Marzinski +--- + libmultipath/configure.c | 4 ++-- + libmultipath/discovery.c | 3 +++ + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/libmultipath/configure.c b/libmultipath/configure.c +index 9513baae..029fbbd2 100644 +--- a/libmultipath/configure.c ++++ b/libmultipath/configure.c +@@ -1193,13 +1193,13 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid, + + if (cmpp) + mpp->queue_mode = cmpp->queue_mode; ++ if (cmd == CMD_DRY_RUN && mpp->action == ACT_UNDEF) ++ mpp->action = ACT_DRY_RUN; + if (setup_map(mpp, ¶ms, vecs)) { + remove_map(mpp, vecs->pathvec, NULL); + continue; + } + +- if (cmd == CMD_DRY_RUN) +- mpp->action = ACT_DRY_RUN; + if (mpp->action == ACT_UNDEF) + select_action(mpp, curmp, + force_reload == FORCE_RELOAD_YES ? 1 : 0); +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index e4de48e7..84ce5fe7 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -857,6 +857,9 @@ sysfs_set_scsi_tmo (struct config *conf, struct multipath *mpp) + bool warn_dev_loss = false; + bool warn_fast_io_fail = false; + ++ if (mpp->action == ACT_DRY_RUN || mpp->action == ACT_REJECT) ++ return 0; ++ + if (mpp->no_path_retry > 0) { + uint64_t no_path_retry_tmo = + (uint64_t)mpp->no_path_retry * conf->checkint; +-- +2.23.0 + diff --git a/multipath-tools.spec b/multipath-tools.spec index d24f1b4f3b50970ff640589f364b6e066f905ccc..8479baf922e7154acafa3f8007750ea3c091deb8 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ #needsrootforbuild Name: multipath-tools Version: 0.9.5 -Release: 1 +Release: 2 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -27,6 +27,7 @@ Patch15: 0015-clear-mpp-path-reference-when-path-is-freed-otherwis.patch Patch16: 0016-multipathd-Fixed-multipathd-parameter-invoking-seque.patch Patch17: 0017-libmultipath-io_err_stat-don-t-free-aio-memory-befor.patch Patch18: 0018-libmultipath-io_err_stat-call-io_destroy-inside-free.patch +Patch19: 0019-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch BuildRequires: multipath-tools, libcmocka, libcmocka-devel BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 @@ -180,6 +181,9 @@ fi %changelog +* Mon May 27 2024 kouwenqi - 0.9.5-2 +- libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN + * Mon Feb 5 2024 wangzhiqiang - 0.9.5-1 - upgrade version to 0.9.5: - add requires libmount and libmount-devel