}
static int
+max_polling_interval_handler(vector strvec)
+{
+ char *buff;
+
+ buff = VECTOR_SLOT(strvec, 1);
+ conf->max_checkint = atoi(buff);
+
+ return 0;
+}
+
+static int
udev_dir_handler(vector strvec)
{
conf->udev_dir = set_value(strvec);
}
static int
+snprint_def_max_polling_interval (char * buff, int len, void * data)
+{
+ if (conf->max_checkint == MAX_CHECKINT(conf->checkint))
+ return 0;
+ return snprintf(buff, len, "%i", conf->max_checkint);
+}
+
+static int
snprint_def_udev_dir (char * buff, int len, void * data)
{
if (!conf->udev_dir)
install_keyword_root("defaults", NULL);
install_keyword("verbosity", &verbosity_handler, &snprint_def_verbosity);
install_keyword("polling_interval", &polling_interval_handler, &snprint_def_polling_interval);
+ install_keyword("max_polling_interval", &max_polling_interval_handler, &snprint_def_max_polling_interval);
install_keyword("udev_dir", &udev_dir_handler, &snprint_def_udev_dir);
install_keyword("multipath_dir", &multipath_dir_handler, &snprint_def_multipath_dir);
install_keyword("path_selector", &def_selector_handler, &snprint_def_selector);
section recognizes the following keywords:
.TP 17
.B polling_interval
-interval between two path checks in seconds For properly functioning paths,
-the interval between checks will gradually increase to (4 * polling_interval);
+interval between two path checks in seconds. For properly functioning paths,
+the interval between checks will gradually increase to
+.B max_polling_interval;
default is
.I 5
.TP
+.B max_polling_interval
+maximal interval between two path checks in seconds; default is
+.I 4 * polling_interval
+.TP
.B udev_dir
directory where udev creates its device nodes; default is
.I /dev
}
else if (newstate == PATH_UP || newstate == PATH_GHOST) {
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;
+ 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->tick = pp->checkint;
+ condlog(4, "%s: delay next check %is",
pp->dev_t, pp->tick);
+ }
}
else if (newstate == PATH_DOWN)
LOG_MSG(2, checker_message(&pp->checker));