From: isaac Date: Thu, 15 Oct 2009 04:17:03 +0000 (+0000) Subject: b=20818,i=rread,i=liang: X-Git-Tag: v1_8_2_01~1^5~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1b63eba7b7ffa740b68f82548111990400d20a3c;p=fs%2Flustre-release.git b=20818,i=rread,i=liang: - user options libcfs_console_(max|min)_delay ignored by libcfs. --- diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index 872aa2a..e52f614 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -489,8 +489,14 @@ int libcfs_debug_init(unsigned long bufsize) int max = libcfs_debug_mb; cfs_waitq_init(&debug_ctlwq); - libcfs_console_max_delay = CDEBUG_DEFAULT_MAX_DELAY; - libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY; + + if (libcfs_console_max_delay <= 0 || /* not set by user or */ + libcfs_console_min_delay <= 0 || /* set to invalid values */ + libcfs_console_min_delay >= libcfs_console_max_delay) { + libcfs_console_max_delay = CDEBUG_DEFAULT_MAX_DELAY; + libcfs_console_min_delay = CDEBUG_DEFAULT_MIN_DELAY; + } + /* If libcfs_debug_mb is set to an invalid value or uninitialized * then just make the total buffers smp_num_cpus * TCD_MAX_PAGES */ if (max > trace_max_debug_mb() || max < num_possible_cpus()) {