Fix max path checker timing
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 3 May 2013 17:59:49 +0000 (12:59 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 6 May 2013 19:42:06 +0000 (21:42 +0200)
Due to some code being placed inside the wrong block, the number of
seconds to wait between path checks (pp->tick), was only getting set to
the path's individual check interval if that wasn't equal to the max
check interval.  Otherwise it was using the default for a failed path.
This patch makes sure that pp->ticks always always gets set correctly
for active paths.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipathd/main.c

index 0997b1f..e5db3e8 100644 (file)
@@ -1220,10 +1220,10 @@ check_path (struct vectors * vecs, struct path * pp)
                                else
                                        pp->checkint = conf->max_checkint;
 
-                               pp->tick = pp->checkint;
                                condlog(4, "%s: delay next check %is",
-                                       pp->dev_t, pp->tick);
+                                       pp->dev_t, pp->checkint);
                        }
+                       pp->tick = pp->checkint;
                }
        }
        else if (newstate == PATH_DOWN) {