Skip to contentSkip to conversation

multipath cleanup patches

PATCH In review Benjamin Marzinski 2 participants 4 messages Jan 5, 2021 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

cover multipath cleanup patches

These patches are cleanups that Martin mentioned for my last patchset. The first is some code that should have been in patch 4/6 (libmultipath:
ignore multipaths sections without wwid option). The second is V2 of patch 6/6 (multipath.conf.5: Improve checker_timeout description), which was updated based on Martin's comments.

Benjamin Marzinski (2):
libmultipath: check for null wwid before strcmp multipath.conf.5: Improve checker_timeout description

 libmultipath/config.c      |  2 +-
 multipath/multipath.conf.5 | 20 ++++++++++++--------
 2 files changed, 13 insertions(+), 9 deletions(-)
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
author maintainer
#1 lore raw

PATCH 1/2 libmultipath: check for null wwid before strcmp

Commit 749aabd0 (libmultipath: ignore multipaths sections without wwid option) removed all mpentries with a NULL wwid, but didn't stop strcmp() from being run on them in merge_mptable(). The result of strcmp() with a NULL parameter is undefined, so fix that.

---
 libmultipath/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/config.c +1 -1
index a643703e..be310159 100644
@@ -518,7 +518,7 @@ void merge_mptable(vector mptable)
 		}
 		j = i + 1;
 		vector_foreach_slot_after(mptable, mp2, j) {
-			if (strcmp(mp1->wwid, mp2->wwid))
+			if (!mp2->wwid || strcmp(mp1->wwid, mp2->wwid))
 				continue;
 			condlog(1, "%s: duplicate multipath config section for %s",
 				__func__, mp1->wwid);
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
author maintainer
#2 lore raw

PATCH 2/2 multipath.conf.5: Improve checker_timeout description

In reply to Benjamin Marzinski

I was asked to explain how checker_timeout works for checkers like directio, that don't issue scsi commands with an explicit timeout. Also, undeprecate the directio checker.

---
 multipath/multipath.conf.5 | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
multipath/multipath.conf.5 +12 -8
index ea66a01e..8ef3a747 100644
@@ -472,8 +472,12 @@ The default is: \fB<unset>\fR
 .
 .TP
 .B path_checker
-The default method used to determine the paths state. Possible values
-are:
+The default method used to determine the path's state. The synchronous
+checkers (all except \fItur\fR and \fIdirectio\fR) will cause multipathd to
+pause most activity, waiting up to \fIchecker_timeout\fR seconds for the path
+to respond. The asynchronous checkers (\fItur\fR and \fIdirectio\fR) will not
+pause multipathd. Instead, multipathd will check for a response once per
+second, until \fIchecker_timeout\fR seconds have elapsed. Possible values are:
 .RS
 .TP 12
 .I readsector0
@@ -499,10 +503,8 @@ Check the path state for LSI/Engenio/NetApp RDAC class as NetApp SANtricity E/EF
 Series, and OEM arrays from IBM DELL SGI STK and SUN.
 .TP
 .I directio
-(Deprecated) Read the first sector with direct I/O. If you have a large number
-of paths, or many AIO users on a system, you may need to use sysctl to
-increase fs.aio-max-nr. This checker is being deprecated, it could cause
-spurious path failures under high load. Please use \fItur\fR instead.
+Read the first sector with direct I/O. This checker could cause spurious path
+failures under high load. Increasing \fIchecker_timeout\fR can help with this.
 .TP
 .I cciss_tur
 (Hardware-dependent)
@@ -639,8 +641,10 @@ The default is: \fBno\fR
 .
 .TP
 .B checker_timeout
-Specify the timeout to use for path checkers and prioritizers that issue SCSI
-commands with an explicit timeout, in seconds.
+Specify the timeout to use for path checkers and prioritizers, in seconds.
+Only prioritizers that issue scsi commands use checker_timeout.  If a path
+does not respond to the checker command after \fIchecker_timeout\fR
+seconds have elapsed, it is considered down.
 .RS
 .TP
 The default is: in \fB/sys/block/sd<x>/device/timeout\fR
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Reviewed-by on the v1 series
#3 lore raw
In reply to Benjamin Marzinski
Quoted 9 lines · Benjamin Marzinski

These patches are cleanups that Martin mentioned for my last patchset.
The first is some code that should have been in patch 4/6 (libmultipath:
ignore multipaths sections without wwid option). The second is V2 of patch 6/6 (multipath.conf.5: Improve checker_timeout description), which
was updated based on Martin's comments.

Quoted 8 lines

Benjamin Marzinski (2):
  libmultipath: check for null wwid before strcmp multipath.conf.5: Improve checker_timeout description

 libmultipath/config.c      |  2 +- multipath/multipath.conf.5 | 20 ++++++++++++--------

 2 files changed, 13 insertions(+), 9 deletions(-)

For the set:

Signature · 10 lines
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107
SUSE Software Solutions Germany GmbH
HRB 36809, AG Nürnberg GF: Felix Imendörffer



--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel