diff mbox series

[238/622] lnet: libcfs: do not calculate debug_mb if it is set

Message ID 1582838290-17243-239-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync closely to 2.13.52 | expand

Commit Message

James Simmons Feb. 27, 2020, 9:11 p.m. UTC
From: Vladimir Saveliev <c17830@cray.com>

debug_mb is libcfs module parameter. It should be possible to set it

modprobe libcfs libcfs_debug_mb=800

or via adding

options libcfs libcfs_debug_mb=800

to modules configuration.

Fixes: 0871d551af ("staging/lustre/libcfs: move /proc/sys/lnet to debugfs")
WC-bug-id: https://jira.whamcloud.com/browse/LU-11898
Lustre-commit: adeb29400a4a ("LU-11898 libcfs: do not calculate debug_mb if it is set")
Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Cray-bug-id: LUS-6936
Reviewed-on: https://review.whamcloud.com/34128
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
 net/lnet/libcfs/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/net/lnet/libcfs/debug.c b/net/lnet/libcfs/debug.c
index 88c4c36..c6b92df 100644
--- a/net/lnet/libcfs/debug.c
+++ b/net/lnet/libcfs/debug.c
@@ -553,7 +553,8 @@  int libcfs_debug_init(unsigned long bufsize)
-	libcfs_debug_mb = cfs_trace_get_debug_mb();
+	if (libcfs_debug_mb == 0)
+		libcfs_debug_mb = cfs_trace_get_debug_mb();
 	return rc;