diff mbox series

[10/22] multipathd: return 0 from path_check() if that path wasn't checked

Message ID 20240713060506.2015463-11-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series path checker refactor and misc fixes | expand

Commit Message

Benjamin Marzinski July 13, 2024, 6:04 a.m. UTC
If check_path_state() returns PATH_WILD or PATH_UNCHECKED, then the
path wasn't correctly checked, and path_check() should return 0.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 multipathd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Wilck July 15, 2024, 4:05 p.m. UTC | #1
On Sat, 2024-07-13 at 02:04 -0400, Benjamin Marzinski wrote:
> If check_path_state() returns PATH_WILD or PATH_UNCHECKED, then the
> path wasn't correctly checked, and path_check() should return 0.

You mean check_path(). Other than that,

> 
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>

Reviewed_by: Martin Wilck <mwilck@suse.com>
Benjamin Marzinski July 16, 2024, 2:52 p.m. UTC | #2
On Mon, Jul 15, 2024 at 06:05:28PM +0200, Martin Wilck wrote:
> On Sat, 2024-07-13 at 02:04 -0400, Benjamin Marzinski wrote:
> > If check_path_state() returns PATH_WILD or PATH_UNCHECKED, then the
> > path wasn't correctly checked, and path_check() should return 0.
> 
> You mean check_path(). Other than that,

I'll fix that in the next version.

-Ben

> 
> > 
> > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> 
> Reviewed_by: Martin Wilck <mwilck@suse.com>
diff mbox series

Patch

diff --git a/multipathd/main.c b/multipathd/main.c
index 5e89fae5..43bd5936 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2386,7 +2386,7 @@  check_path (struct vectors * vecs, struct path * pp, unsigned int ticks)
 
 	newstate = check_path_state(pp);
 	if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
-		return 1;
+		return 0;
 	} else if ((newstate != PATH_UP && newstate != PATH_GHOST &&
 		    newstate != PATH_PENDING) && (pp->state == PATH_DELAYED)) {
 		/* If path state become failed again cancel path delay state */