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. (cherry picked from commit 7a9bf7333900467f4ce59a9baf8578b73a74a89e)
This commit is contained in:
parent
9d3ca73c5e
commit
81e889090d
@ -0,0 +1,53 @@
|
||||
From cc63b6025b423e1d89388c0b3dbae3e67cb0436b Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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 <mwilck@suse.com>
|
||||
Cc: Jehan Singh <jehan.singh@suse.com>
|
||||
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
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 84a246b..97b7cb5 100644
|
||||
--- a/libmultipath/configure.c
|
||||
+++ b/libmultipath/configure.c
|
||||
@@ -1246,13 +1246,13 @@ int coalesce_paths (struct vectors *vecs, vector mpvec, char *refwwid,
|
||||
}
|
||||
verify_paths(mpp);
|
||||
|
||||
+ 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 d9cc4e0..fb20308 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -963,6 +963,9 @@ sysfs_set_scsi_tmo (struct multipath *mpp, unsigned int checkint)
|
||||
unsigned int dev_loss_tmo = mpp->dev_loss;
|
||||
struct path *err_path = NULL;
|
||||
|
||||
+ 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 * checkint;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#needsrootforbuild
|
||||
Name: multipath-tools
|
||||
Version: 0.8.7
|
||||
Release: 11
|
||||
Release: 12
|
||||
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/
|
||||
@ -37,6 +37,7 @@ Patch25: 0025-multipathd-make-pr-registration-consistent.patch
|
||||
Patch26: 0026-libmultipath-io_err_stat-don-t-free-aio-memory-befor.patch
|
||||
Patch27: 0027-libmultipath-io_err_stat-call-io_destroy-inside-free.patch
|
||||
Patch28: 0028-multipathd.socket-add-missing-conditions-from-servic.patch
|
||||
Patch29: 0029-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
|
||||
@ -184,6 +185,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 5 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.7-12
|
||||
- libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN
|
||||
|
||||
* Tue Apr 2 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.7-11
|
||||
- multipathd.socket: add missing conditions from service unit
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user