JBD: Export jbd-debug via debugfs
PATCH 1/1 JBD: Export jbd-debug via debugfs
From: Jose R. Santos <[email protected]>
JBD: Export jbd-debug via debugfs
The jbd-debug file used to be located in /proc/sys/fs/jbd-debug, but create_proc_entry() does not do lookups on file names that are more that one directory deep. This causes the entry creation to fail and hence, no proc file is created.
Instead of fixing this on procfs might as well move the jbd2-debug file to debugfs which would be the preferred location for this kind of tunable. The new location is now /sys/kernel/debug/jbd/jbd-debug.
Signed-off-by Jose R. Santos <[email protected]>
Signed-off-by Jan Kara <[email protected]>
--
fs/Kconfig | 10 ++++---- fs/jbd/journal.c | 65 ++++++++++++++++++++------------------------------- include/linux/jbd.h | 2 +- 3 files changed, 31 insertions(+), 46 deletions(-)
fs/Kconfig +5 -5
@@ -219,7 +219,7 @@ config JBD config JBD_DEBUG bool "JBD (ext3) debugging support" - depends on JBD + depends on JBD && DEBUG_FS help If you are using the ext3 journaled file system (or potentially any other file system/device using JBD), this option allows you to
@@ -228,10 +228,10 @@ config JBD_DEBUG debugging output will be turned off. If you select Y here, then you will be able to turn on debugging - with "echo N > /proc/sys/fs/jbd-debug", where N is a number between - 1 and 5, the higher the number, the more debugging output is - generated. To turn debugging off again, do - "echo 0 > /proc/sys/fs/jbd-debug". + with "echo N > /sys/kernel/debug/jbd/jbd-debug", where N is a + number between 1 and 5, the higher the number, the more debugging + output is generated. To turn debugging off again, do + "echo 0 > /sys/kernel/debug/jbd/jbd-debug". config JBD2 tristate
fs/jbd/journal.c +25 -40
109 lines not on this page · raw message
include/linux/jbd.h +1 -1
@@ -57,7 +57,7 @@* CONFIG_JBD_DEBUG is on. */ #define JBD_EXPENSIVE_CHECKING -extern int journal_enable_debug; +extern u8 journal_enable_debug; #define jbd_debug(n, f, a...) \ do { \