diff options
| author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-09 06:36:23 -0500 |
|---|---|---|
| committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-11 03:52:07 -0500 |
| commit | cce3f612fedcbeee61977497b99bbf68a4082b6b (patch) | |
| tree | ceef1d444004e81ecae2b295468abded19ea1114 | |
| parent | 6342aaebda9b94e3cd101ba13eee690ac6577124 (diff) | |
UBIFS: simplify UBIFS Kconfig menu
Remove debug message level and debug checks Kconfig options as they
proved to be useless anyway. We have sysfs interface which we can
use for fine-grained debugging messages and checks selection, see
Documentation/filesystems/ubifs.txt for mode details.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| -rw-r--r-- | fs/ubifs/Kconfig | 23 | ||||
| -rw-r--r-- | fs/ubifs/debug.c | 4 | ||||
| -rw-r--r-- | fs/ubifs/debug.h | 22 |
3 files changed, 12 insertions, 37 deletions
diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig index 830e3f76f442..1d1859dc3de5 100644 --- a/fs/ubifs/Kconfig +++ b/fs/ubifs/Kconfig | |||
| @@ -44,23 +44,20 @@ config UBIFS_FS_ZLIB | |||
| 44 | 44 | ||
| 45 | # Debugging-related stuff | 45 | # Debugging-related stuff |
| 46 | config UBIFS_FS_DEBUG | 46 | config UBIFS_FS_DEBUG |
| 47 | bool "Enable debugging" | 47 | bool "Enable debugging support" |
| 48 | depends on UBIFS_FS | 48 | depends on UBIFS_FS |
| 49 | select DEBUG_FS | 49 | select DEBUG_FS |
| 50 | select KALLSYMS_ALL | 50 | select KALLSYMS_ALL |
| 51 | help | 51 | help |
| 52 | This option enables UBIFS debugging. | 52 | This option enables UBIFS debugging support. It makes sure various |
| 53 | 53 | assertions, self-checks, debugging messages and test modes are compiled | |
| 54 | config UBIFS_FS_DEBUG_MSG_LVL | 54 | in (this all is compiled out otherwise). Assertions are light-weight |
| 55 | int "Default message level (0 = no extra messages, 3 = lots)" | 55 | and this option also enables them. Self-checks, debugging messages and |
| 56 | depends on UBIFS_FS_DEBUG | 56 | test modes are switched off by default. Thus, it is safe and actually |
| 57 | default "0" | 57 | recommended to have debugging support enabled, and it should not slow |
| 58 | help | 58 | down UBIFS. You can then further enable / disable individual debugging |
| 59 | This controls the amount of debugging messages produced by UBIFS. | 59 | features using UBIFS module parameters and the corresponding sysfs |
| 60 | If reporting bugs, please try to have available a full dump of the | 60 | interfaces. |
| 61 | messages at level 1 while the misbehaviour was occurring. Level 2 | ||
| 62 | may become necessary if level 1 messages were not enough to find the | ||
| 63 | bug. Generally Level 3 should be avoided. | ||
| 64 | 61 | ||
| 65 | config UBIFS_FS_DEBUG_CHKS | 62 | config UBIFS_FS_DEBUG_CHKS |
| 66 | bool "Enable extra checks" | 63 | bool "Enable extra checks" |
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index bcb1acb79263..02c10dccdd60 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
| @@ -43,8 +43,8 @@ DEFINE_SPINLOCK(dbg_lock); | |||
| 43 | static char dbg_key_buf0[128]; | 43 | static char dbg_key_buf0[128]; |
| 44 | static char dbg_key_buf1[128]; | 44 | static char dbg_key_buf1[128]; |
| 45 | 45 | ||
| 46 | unsigned int ubifs_msg_flags = UBIFS_MSG_FLAGS_DEFAULT; | 46 | unsigned int ubifs_msg_flags; |
| 47 | unsigned int ubifs_chk_flags = UBIFS_CHK_FLAGS_DEFAULT; | 47 | unsigned int ubifs_chk_flags; |
| 48 | unsigned int ubifs_tst_flags; | 48 | unsigned int ubifs_tst_flags; |
| 49 | 49 | ||
| 50 | module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR); | 50 | module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR); |
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 69ebe4729151..10190c189817 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
| @@ -205,12 +205,6 @@ enum { | |||
| 205 | UBIFS_MSG_RCVRY = 0x1000, | 205 | UBIFS_MSG_RCVRY = 0x1000, |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | /* Debugging message type flags for each default debug message level */ | ||
| 209 | #define UBIFS_MSG_LVL_0 0 | ||
| 210 | #define UBIFS_MSG_LVL_1 0x1 | ||
| 211 | #define UBIFS_MSG_LVL_2 0x7f | ||
| 212 | #define UBIFS_MSG_LVL_3 0xffff | ||
| 213 | |||
| 214 | /* | 208 | /* |
| 215 | * Debugging check flags (must match chk_names in debug.c). | 209 | * Debugging check flags (must match chk_names in debug.c). |
| 216 | * | 210 | * |
| @@ -243,22 +237,6 @@ enum { | |||
| 243 | UBIFS_TST_RCVRY = 0x4, | 237 | UBIFS_TST_RCVRY = 0x4, |
| 244 | }; | 238 | }; |
| 245 | 239 | ||
| 246 | #if CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 1 | ||
| 247 | #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_1 | ||
| 248 | #elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 2 | ||
| 249 | #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_2 | ||
| 250 | #elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 3 | ||
| 251 | #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_3 | ||
| 252 | #else | ||
| 253 | #define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_0 | ||
| 254 | #endif | ||
| 255 | |||
| 256 | #ifdef CONFIG_UBIFS_FS_DEBUG_CHKS | ||
| 257 | #define UBIFS_CHK_FLAGS_DEFAULT 0xffffffff | ||
| 258 | #else | ||
| 259 | #define UBIFS_CHK_FLAGS_DEFAULT 0 | ||
| 260 | #endif | ||
| 261 | |||
| 262 | extern spinlock_t dbg_lock; | 240 | extern spinlock_t dbg_lock; |
| 263 | 241 | ||
| 264 | extern unsigned int ubifs_msg_flags; | 242 | extern unsigned int ubifs_msg_flags; |
