-#ifdef HAVE_CATAMOUNT_DATA_H
- char *debug_console = NULL;
- char *debug_ratelimit = NULL;
- char *debug_max_delay = NULL;
- char *debug_min_delay = NULL;
- char *debug_backoff = NULL;
-
- libcfs_console_max_delay = CDEBUG_DEFAULT_MAX_DELAY;
- libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY;
-
- snprintf(source_nid, sizeof(source_nid) - 1, "%u", _my_pnid);
- source_pid = _my_pid;
-
- debug_console = getenv("LIBLUSTRE_DEBUG_CONSOLE");
- if (debug_console != NULL) {
- toconsole = strtoul(debug_console, NULL, 0);
- CDEBUG(D_INFO, "set liblustre toconsole to %u\n", toconsole);
- }
- debug_ratelimit = getenv("LIBLUSTRE_DEBUG_CONSOLE_RATELIMIT");
- if (debug_ratelimit != NULL) {
- libcfs_console_ratelimit = strtoul(debug_ratelimit, NULL, 0);
- 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);
- }
- }
-#else