From: Hannes Reinecke Date: Thu, 17 Jan 2013 14:59:30 +0000 (+0100) Subject: multipathd: log message when check interval has changed X-Git-Tag: 0.5.0~126 X-Git-Url: https://git.opensvc.com/gitweb.cgi?p=multipath-tools%2F.git;a=commitdiff_plain;h=024880a13daee2c3d06b91718aa80be93b77c6a3 multipathd: log message when check interval has changed We should only log the message if the check interval has indeed changed. Signed-off-by: Hannes Reinecke --- diff --git a/multipathd/main.c b/multipathd/main.c index 8c0866d2..7f83a7a5 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -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) {