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>
This commit is contained in:
@@ -44,23 +44,20 @@ config UBIFS_FS_ZLIB
|
|||||||
|
|
||||||
# Debugging-related stuff
|
# Debugging-related stuff
|
||||||
config UBIFS_FS_DEBUG
|
config UBIFS_FS_DEBUG
|
||||||
bool "Enable debugging"
|
bool "Enable debugging support"
|
||||||
depends on UBIFS_FS
|
depends on UBIFS_FS
|
||||||
select DEBUG_FS
|
select DEBUG_FS
|
||||||
select KALLSYMS_ALL
|
select KALLSYMS_ALL
|
||||||
help
|
help
|
||||||
This option enables UBIFS debugging.
|
This option enables UBIFS debugging support. It makes sure various
|
||||||
|
assertions, self-checks, debugging messages and test modes are compiled
|
||||||
config UBIFS_FS_DEBUG_MSG_LVL
|
in (this all is compiled out otherwise). Assertions are light-weight
|
||||||
int "Default message level (0 = no extra messages, 3 = lots)"
|
and this option also enables them. Self-checks, debugging messages and
|
||||||
depends on UBIFS_FS_DEBUG
|
test modes are switched off by default. Thus, it is safe and actually
|
||||||
default "0"
|
recommended to have debugging support enabled, and it should not slow
|
||||||
help
|
down UBIFS. You can then further enable / disable individual debugging
|
||||||
This controls the amount of debugging messages produced by UBIFS.
|
features using UBIFS module parameters and the corresponding sysfs
|
||||||
If reporting bugs, please try to have available a full dump of the
|
interfaces.
|
||||||
messages at level 1 while the misbehaviour was occurring. Level 2
|
|
||||||
may become necessary if level 1 messages were not enough to find the
|
|
||||||
bug. Generally Level 3 should be avoided.
|
|
||||||
|
|
||||||
config UBIFS_FS_DEBUG_CHKS
|
config UBIFS_FS_DEBUG_CHKS
|
||||||
bool "Enable extra checks"
|
bool "Enable extra checks"
|
||||||
|
@@ -43,8 +43,8 @@ DEFINE_SPINLOCK(dbg_lock);
|
|||||||
static char dbg_key_buf0[128];
|
static char dbg_key_buf0[128];
|
||||||
static char dbg_key_buf1[128];
|
static char dbg_key_buf1[128];
|
||||||
|
|
||||||
unsigned int ubifs_msg_flags = UBIFS_MSG_FLAGS_DEFAULT;
|
unsigned int ubifs_msg_flags;
|
||||||
unsigned int ubifs_chk_flags = UBIFS_CHK_FLAGS_DEFAULT;
|
unsigned int ubifs_chk_flags;
|
||||||
unsigned int ubifs_tst_flags;
|
unsigned int ubifs_tst_flags;
|
||||||
|
|
||||||
module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR);
|
module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR);
|
||||||
|
@@ -205,12 +205,6 @@ enum {
|
|||||||
UBIFS_MSG_RCVRY = 0x1000,
|
UBIFS_MSG_RCVRY = 0x1000,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Debugging message type flags for each default debug message level */
|
|
||||||
#define UBIFS_MSG_LVL_0 0
|
|
||||||
#define UBIFS_MSG_LVL_1 0x1
|
|
||||||
#define UBIFS_MSG_LVL_2 0x7f
|
|
||||||
#define UBIFS_MSG_LVL_3 0xffff
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Debugging check flags (must match chk_names in debug.c).
|
* Debugging check flags (must match chk_names in debug.c).
|
||||||
*
|
*
|
||||||
@@ -243,22 +237,6 @@ enum {
|
|||||||
UBIFS_TST_RCVRY = 0x4,
|
UBIFS_TST_RCVRY = 0x4,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 1
|
|
||||||
#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_1
|
|
||||||
#elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 2
|
|
||||||
#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_2
|
|
||||||
#elif CONFIG_UBIFS_FS_DEBUG_MSG_LVL == 3
|
|
||||||
#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_3
|
|
||||||
#else
|
|
||||||
#define UBIFS_MSG_FLAGS_DEFAULT UBIFS_MSG_LVL_0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_UBIFS_FS_DEBUG_CHKS
|
|
||||||
#define UBIFS_CHK_FLAGS_DEFAULT 0xffffffff
|
|
||||||
#else
|
|
||||||
#define UBIFS_CHK_FLAGS_DEFAULT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern spinlock_t dbg_lock;
|
extern spinlock_t dbg_lock;
|
||||||
|
|
||||||
extern unsigned int ubifs_msg_flags;
|
extern unsigned int ubifs_msg_flags;
|
||||||
|
Reference in New Issue
Block a user