Change patch format to remove Git version * Patches 0001-0122 only have the patch format modified Update to the head of the upstream staging branch plus redhat patches * Patches 0123-0134 & 1036-0142 are from the upstream staging branch * Patches 0143-1046 have been submitted upstream * Patch 0156 is a Red Hat only patch. Red Hat udev rules set ID_SERIAL from 60-persistent-storage.rules instead of 55-scsi-sg3_id.rules. Multipath's parse_vpd_pg83() function needs to match the ID_SERIAL value from udev. Rename files * Previous patches 0123-0132 are now patches 1035 & 0147-0155
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Fri, 18 Dec 2020 17:06:40 -0600
|
|
Subject: [PATCH] libmultipath: ignore multipaths sections without wwid option
|
|
|
|
"multipathd show config local" was crashing in find_mp_by_wwid() if
|
|
the multipath configuration included a multipaths section that did
|
|
not set a wwid option. There is no reason to keep a mpentry that
|
|
didn't set its wwid. Remove it in merge_mptable().
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
---
|
|
libmultipath/config.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
|
index 9f3cb38d..a643703e 100644
|
|
--- a/libmultipath/config.c
|
|
+++ b/libmultipath/config.c
|
|
@@ -509,6 +509,13 @@ void merge_mptable(vector mptable)
|
|
int i, j;
|
|
|
|
vector_foreach_slot(mptable, mp1, i) {
|
|
+ /* drop invalid multipath configs */
|
|
+ if (!mp1->wwid) {
|
|
+ condlog(0, "multipaths config section missing wwid");
|
|
+ vector_del_slot(mptable, i--);
|
|
+ free_mpe(mp1);
|
|
+ continue;
|
|
+ }
|
|
j = i + 1;
|
|
vector_foreach_slot_after(mptable, mp2, j) {
|
|
if (strcmp(mp1->wwid, mp2->wwid))
|