device-mapper-multipath/0006-libmultipath-fix-find_multipaths_timeout-for-unknown.patch
Benjamin Marzinski 652daa1a21 device-mapper-multipath-0.9.0-1
Update source to upstream version 0.9.0
  * Previous patches 0001-0005 are included in the commit.
  * This version deprecates multiple options: mutlipath_dir, config_dir,
    and
    getuid_callout, along with the "default_" prefixed alternate names
for the      default section parameters.
Add patches from upstream staging branch
  * Patches 0001-0006 are from the upstream staging branch
Rename redhat patches
  * Previous patches 0006-0016 are now patches 0007-0017
2022-07-13 16:51:42 -05:00

28 lines
981 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Benjamin Marzinski <bmarzins@redhat.com>
Date: Tue, 28 Jun 2022 15:38:28 -0500
Subject: [PATCH] libmultipath: fix find_multipaths_timeout for unknown
hardware
pp->hwe is now a vector that will always be allocated for all path
devices. Instead of checking if it is NULL, check if it is empty.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/propsel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index 50d0b5c8..f782f251 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -1293,7 +1293,7 @@ out:
*/
if (pp->find_multipaths_timeout < 0) {
pp->find_multipaths_timeout = -pp->find_multipaths_timeout;
- if (!pp->hwe) {
+ if (VECTOR_SIZE(pp->hwe) == 0) {
pp->find_multipaths_timeout =
DEFAULT_UNKNOWN_FIND_MULTIPATHS_TIMEOUT;
origin = "(default for unknown hardware)";