+ CDEBUG(D_INFO, "set liblustre console ratelimit to %u\n",
+ libcfs_console_ratelimit);
+ }
+ debug_max_delay = getenv("LIBLUSTRE_DEBUG_CONSOLE_MAX_DELAY");
+ if (debug_max_delay != NULL)
+ libcfs_console_max_delay =
+ cfs_time_seconds(strtoul(debug_max_delay, NULL, 0));
+ debug_min_delay = getenv("LIBLUSTRE_DEBUG_CONSOLE_MIN_DELAY");
+ if (debug_min_delay != NULL)
+ libcfs_console_min_delay =
+ cfs_time_seconds(strtoul(debug_min_delay, NULL, 0));
+ if (debug_min_delay || debug_max_delay) {
+ if (!libcfs_console_max_delay || !libcfs_console_min_delay ||
+ libcfs_console_max_delay < libcfs_console_min_delay) {
+ libcfs_console_max_delay = CDEBUG_DEFAULT_MAX_DELAY;
+ libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY;
+ CDEBUG(D_INFO, "LIBLUSTRE_DEBUG_CONSOLE_MAX_DELAY "
+ "should be greater than "
+ "LIBLUSTRE_DEBUG_CONSOLE_MIN_DELAY "
+ "and both parameters should be non-null"
+ ": restore default values\n");
+ } else {
+ CDEBUG(D_INFO, "set liblustre console max delay to %lus"
+ " and min delay to %lus\n",
+ (cfs_duration_t)
+ cfs_duration_sec(libcfs_console_max_delay),
+ (cfs_duration_t)
+ cfs_duration_sec(libcfs_console_min_delay));
+ }
+ }
+ debug_backoff = getenv("LIBLUSTRE_DEBUG_CONSOLE_BACKOFF");
+ if (debug_backoff != NULL) {
+ libcfs_console_backoff = strtoul(debug_backoff, NULL, 0);
+ if (libcfs_console_backoff <= 0) {
+ libcfs_console_backoff = CDEBUG_DEFAULT_BACKOFF;
+ CDEBUG(D_INFO, "LIBLUSTRE_DEBUG_CONSOLE_BACKOFF <= 0: "
+ "restore default value\n");
+ } else {
+ CDEBUG(D_INFO, "set liblustre console backoff to %u\n",
+ libcfs_console_backoff);
+ }