Whamcloud - gitweb
LU-11898 libcfs: do not calculate debug_mb if it is set 28/34128/2
authorVladimir Saveliev <c17830@cray.com>
Tue, 29 Jan 2019 03:30:28 +0000 (06:30 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Mar 2019 03:43:34 +0000 (03:43 +0000)
debug_mb is libcfs module parameter. It should be possible to set it
via

modprobe libcfs libcfs_debug_mb=800

or via adding

options libcfs libcfs_debug_mb=800

to modules configuration.

Fixes: 7092309f32 ("LU-8066 libcfs: migrate to debugfs")
Test-Parameters: trivial
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-6936
Change-Id: I9da51e44a938a312e43b8a0781b49efc197f7ca9
Reviewed-on: https://review.whamcloud.com/34128
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
libcfs/libcfs/debug.c

index 17b3a3b..3a0c289 100644 (file)
@@ -479,7 +479,8 @@ int libcfs_debug_init(unsigned long bufsize)
 
        libcfs_register_panic_notifier();
        kernel_param_lock(THIS_MODULE);
-       libcfs_debug_mb = cfs_trace_get_debug_mb();
+       if (libcfs_debug_mb == 0)
+               libcfs_debug_mb = cfs_trace_get_debug_mb();
        kernel_param_unlock(THIS_MODULE);
        return rc;
 }