scoutfs: turn off tracing in dlmglue.c

Put this behind a #define. Leave the asserts (mlog_bug_on_msg) though
and redefine their macro to printk instead of going to the trace
buffer.

Signed-off-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
Mark Fasheh
2017-09-28 13:59:49 -07:00
committed by Mark Fasheh
parent 3430edb60b
commit e67e500940
+7 -3
View File
@@ -38,6 +38,7 @@
#include "dlmglue.h"
#ifdef TRACE_DLMGLUE
#define mlog(mask, fmt, args...) trace_printk(fmt , ##args)
#define mlog_errno(st) do { \
int _st = (st); \
@@ -45,11 +46,14 @@
_st != AOP_TRUNCATED_PAGE && _st != -ENOSPC) \
mlog(ML_ERROR, "status = %lld\n", (long long)_st); \
} while (0)
#else
#define mlog(mask, fmt, args...)
#define mlog_errno(st)
#endif
#define mlog_bug_on_msg(cond, fmt, args...) do { \
if (cond) { \
mlog(ML_ERROR, "bug expression: " #cond "\n"); \
mlog(ML_ERROR, fmt, ##args); \
printk(KERN_ERR "bug expression: " #cond "\n"); \
printk(KERN_ERR fmt, ##args); \
BUG(); \
} \
} while (0)