ext4: Add configurable run-time mballoc debugging

Allow mballoc debugging to be enabled at run-time instead of just at
compile time.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Theodore Ts'o
2009-09-18 13:38:55 -04:00
parent 91cc219ad9
commit 6ba495e925
3 changed files with 80 additions and 26 deletions
+12 -4
View File
@@ -37,11 +37,19 @@
/*
*/
#define MB_DEBUG__
#ifdef MB_DEBUG
#define mb_debug(fmt, a...) printk(fmt, ##a)
#ifdef CONFIG_EXT4_DEBUG
extern u8 mb_enable_debug;
#define mb_debug(n, fmt, a...) \
do { \
if ((n) <= mb_enable_debug) { \
printk(KERN_DEBUG "(%s, %d): %s: ", \
__FILE__, __LINE__, __func__); \
printk(fmt, ## a); \
} \
} while (0)
#else
#define mb_debug(fmt, a...)
#define mb_debug(n, fmt, a...)
#endif
/*