!172 libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN
From: @kouwq Reviewed-by: @swf504 Signed-off-by: @swf504
This commit is contained in:
commit
930dc6f436
@ -0,0 +1,62 @@
|
|||||||
|
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 | 4 ++++
|
||||||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
||||||
|
index 7f49d32..109d899 100644
|
||||||
|
--- a/libmultipath/configure.c
|
||||||
|
+++ b/libmultipath/configure.c
|
||||||
|
@@ -1215,14 +1215,14 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid,
|
||||||
|
}
|
||||||
|
verify_paths(mpp, vecs);
|
||||||
|
|
||||||
|
+ if (cmd == CMD_DRY_RUN && mpp->action == ACT_UNDEF)
|
||||||
|
+ mpp->action = ACT_DRY_RUN;
|
||||||
|
params[0] = '\0';
|
||||||
|
if (setup_map(mpp, params, PARAMS_SIZE, vecs)) {
|
||||||
|
remove_map(mpp, vecs, 0);
|
||||||
|
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 5016aae..f1de837 100644
|
||||||
|
--- a/libmultipath/discovery.c
|
||||||
|
+++ b/libmultipath/discovery.c
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
#include "unaligned.h"
|
||||||
|
#include "prioritizers/alua_rtpg.h"
|
||||||
|
#include "foreign.h"
|
||||||
|
+#include "configure.h"
|
||||||
|
|
||||||
|
const char *conf_file = "/etc/multipath_private.conf";
|
||||||
|
static int conf_file_parsed = 0;
|
||||||
|
@@ -884,6 +885,9 @@ sysfs_set_scsi_tmo (struct multipath *mpp, unsigned int checkint)
|
||||||
|
int i;
|
||||||
|
unsigned int dev_loss_tmo = mpp->dev_loss;
|
||||||
|
|
||||||
|
+ 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
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: multipath-tools
|
Name: multipath-tools
|
||||||
Version: 0.8.4
|
Version: 0.8.4
|
||||||
Release: 22
|
Release: 23
|
||||||
Summary: Tools to manage multipath devices with the device-mapper
|
Summary: Tools to manage multipath devices with the device-mapper
|
||||||
License: GPL-2.0-or-later and LGPL-2.0-only
|
License: GPL-2.0-or-later and LGPL-2.0-only
|
||||||
URL: http://christophe.varoqui.free.fr/
|
URL: http://christophe.varoqui.free.fr/
|
||||||
@ -56,6 +56,7 @@ Patch43: 0043-libmultipath-dm_map_present_by_uuid-fix-dm_task_crea.patch
|
|||||||
Patch44: 0044-multipathd.socket-add-missing-conditions-from-servic.patch
|
Patch44: 0044-multipathd.socket-add-missing-conditions-from-servic.patch
|
||||||
Patch45: 0045-libmultipath-ignore-multipaths-sections-without-wwid.patch
|
Patch45: 0045-libmultipath-ignore-multipaths-sections-without-wwid.patch
|
||||||
Patch46: 0046-libmultipath-check-for-null-wwid-before-strcmp.patch
|
Patch46: 0046-libmultipath-check-for-null-wwid-before-strcmp.patch
|
||||||
|
Patch47: 0047-libmultipath-sysfs_set_scsi_tmo-do-nothing-for-ACT_D.patch
|
||||||
|
|
||||||
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
|
BuildRequires: multipath-tools, libcmocka, libcmocka-devel
|
||||||
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
|
BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89
|
||||||
@ -203,6 +204,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 5 2024 kouwenqi <kouwenqi@kylinos.cn> - 0.8.4-23
|
||||||
|
- libmultipath: sysfs_set_scsi_tmo: do nothing for ACT_DRY_RUN
|
||||||
|
|
||||||
* Wed May 29 2024 jinzhiguang <jinzhiguang@kylinos.cn> - -0.8.4-22
|
* Wed May 29 2024 jinzhiguang <jinzhiguang@kylinos.cn> - -0.8.4-22
|
||||||
- fix multipathd service coredump caused by empty item in multipath.conf
|
- fix multipathd service coredump caused by empty item in multipath.conf
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user