ceaf51092f
- Add 0045-multipath-tools-update-mpp-force_readonly-in-ev_add_.patch * Fixes bz #2084356 - Add 0046-multipath-return-failure-on-an-invalid-remove-comman.patch * Fixes bz #2084358 - Add 0047-libmultipath-steal-the-src-string-pointer-in-merge_s.patch - Add 0048-libmultipath-enable-linear-ordering-of-bus-proto-tup.patch - Add 0049-libmultipath-use-bus_protocol_id-in-snprint_path_pro.patch - Add 0050-libmultipath-make-protocol_name-global.patch - Add 0051-libmultipath-add-a-protocol-subsection-to-multipath..patch - Add 0052-libmultipath-Set-the-scsi-timeout-parameters-by-path.patch - Add 0053-libmultipath-check-the-overrides-pctable-for-path-va.patch - Add 0054-libmultipath-fix-eh_deadline-documentation.patch - Add 0055-libmultipath-Add-documentation-for-the-protocol-subs.patch - Add 0056-libmultipath-use-symbolic-value-for-invalid-pcentry.patch * The above 10 patches implement the feature from bz #2084365 - Add 0057-updated-HPE-MSA-builtin-config.patch * Fixes bz #2084357 Resolves: bz #2084365, #2084357, #2084358, #2084365
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Thu, 14 Apr 2022 16:11:10 -0500
|
|
Subject: [PATCH] libmultipath: use symbolic value for invalid pcentry
|
|
|
|
Suggested-by: Martin Wilck <mwilck@suse.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
|
---
|
|
libmultipath/config.c | 4 ++--
|
|
libmultipath/config.h | 1 +
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
|
index 8b0e1f72..61b0dd51 100644
|
|
--- a/libmultipath/config.c
|
|
+++ b/libmultipath/config.c
|
|
@@ -384,7 +384,7 @@ alloc_pce (void)
|
|
{
|
|
struct pcentry *pce = (struct pcentry *)
|
|
calloc(1, sizeof(struct pcentry));
|
|
- pce->type = -1;
|
|
+ pce->type = PCE_INVALID;
|
|
return pce;
|
|
}
|
|
|
|
@@ -643,7 +643,7 @@ validate_pctable(struct hwentry *ovr, int idx, const char *table_desc)
|
|
return;
|
|
|
|
vector_foreach_slot_after(ovr->pctable, pce, idx) {
|
|
- if (pce->type < 0) {
|
|
+ if (pce->type == PCE_INVALID) {
|
|
condlog(0, "protocol section in %s missing type",
|
|
table_desc);
|
|
vector_del_slot(ovr->pctable, idx--);
|
|
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
|
index 57992604..c1e18363 100644
|
|
--- a/libmultipath/config.h
|
|
+++ b/libmultipath/config.h
|
|
@@ -41,6 +41,7 @@ enum force_reload_types {
|
|
FORCE_RELOAD_WEAK,
|
|
};
|
|
|
|
+#define PCE_INVALID -1
|
|
struct pcentry {
|
|
int type;
|
|
int fast_io_fail;
|