Skip to contentSkip to conversation

libmultipath: fix find_multipaths_timeout for unknown hardware

PATCH In review Benjamin Marzinski 2 participants 2 messages Jul 12, 2022 – Jul 13, 2022 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 libmultipath/propsel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/propsel.c +1 -1
index 50d0b5c8..f782f251 100644
@@ -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)";
Signature · 6 lines
2.17.2

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Benjamin Marzinski

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.

Quoted 12 lines

---
 libmultipath/propsel.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
libmultipath/propsel.c +0 -0
index 50d0b5c8..f782f251 100644
@@ -1293,7 +1293,7 @@ out:
          */
         if (pp->find_multipaths_timeout < 0) {

                pp->find_multipaths_timeout = -pp-

Quoted 7 lines
Quoted 1 line

find_multipaths_timeout;

-               if (!pp->hwe) {
+               if (VECTOR_SIZE(pp->hwe) == 0) { pp->find_multipaths_timeout = DEFAULT_UNKNOWN_FIND_MULTIPATHS_TIMEO UT;
                        origin = "(default for unknown hardware)";

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