multipathd: log message when check interval has changed
authorHannes Reinecke <hare@suse.de>
Thu, 17 Jan 2013 14:59:30 +0000 (15:59 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 18 Jan 2013 19:06:39 +0000 (20:06 +0100)
We should only log the message if the check interval has
indeed changed.

Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/main.c

index 8c0866d..7f83a7a 100644 (file)
@@ -1209,18 +1209,20 @@ check_path (struct vectors * vecs, struct path * pp)
                        reinstate_path(pp, 0);
                } else {
                        LOG_MSG(4, checker_message(&pp->checker));
-                       /*
-                        * double the next check delay.
-                        * max at conf->max_checkint
-                        */
-                       if (pp->checkint < (conf->max_checkint / 2))
-                               pp->checkint = 2 * pp->checkint;
-                       else
-                               pp->checkint = conf->max_checkint;
-
-                       pp->tick = pp->checkint;
-                       condlog(4, "%s: delay next check %is",
-                               pp->dev_t, pp->tick);
+                       if (pp->checkint != conf->max_checkint) {
+                               /*
+                                * double the next check delay.
+                                * max at conf->max_checkint
+                                */
+                               if (pp->checkint < (conf->max_checkint / 2))
+                                       pp->checkint = 2 * pp->checkint;
+                               else
+                                       pp->checkint = conf->max_checkint;
+
+                               pp->tick = pp->checkint;
+                               condlog(4, "%s: delay next check %is",
+                                       pp->dev_t, pp->tick);
+                       }
                }
        }
        else if (newstate == PATH_DOWN) {