Patchwork [4/4] UBIFS: dump the stack on errors in failure mode too

login
register
mail settings
Submitter Artem Bityutskiy
Date April 26, 2011, 7:29 a.m.
Message ID <1303802963-31612-4-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/92864/
State New
Headers show

Comments

Artem Bityutskiy - April 26, 2011, 7:29 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

When UBIFS is in the failure mode (used for power cut emulation testing) we for
some reasons do not dump the stack in many places, e.g., in assertions.
Probably at early days we had too many of them and disabled this to make the
development easier, but then never enabled. Nowadays I sometimes observe
assertion failures during power cut testing, but the useful stackdump is not
printed, which is bad. This patch makes UBIFS always print the stackdump when
debugging is enabled.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/debug.h |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Patch

diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 8934c12..f3e235f 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -107,10 +107,7 @@  struct ubifs_debug_info {
 	}                                                                      \
 } while (0)
 
-#define dbg_dump_stack() do {                                                  \
-	if (!dbg_failure_mode)                                                 \
-		dump_stack();                                                  \
-} while (0)
+#define dbg_dump_stack() dump_stack()
 
 /* Generic debugging messages */
 #define dbg_msg(fmt, ...) do {                                                 \