mtd/fs/jffs3 debug.h,1.8,1.9

Artem Bityuckiy dedekind at infradead.org
Tue Dec 21 09:10:31 EST 2004


Update of /home/cvs/mtd/fs/jffs3
In directory phoenix.infradead.org:/tmp/cvs-serv24032

Modified Files:
	debug.h 
Log Message:
Add more debugging.


Index: debug.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/debug.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- debug.h	17 Dec 2004 18:50:29 -0000	1.8
+++ debug.h	21 Dec 2004 14:10:28 -0000	1.9
@@ -31,6 +31,9 @@
 #define JFFS3_DBG_ERASE		5	/* Block erase */
 #define JFFS3_DBG_SALLOC	6	/* Main data structures allocation */
 #define JFFS3_DBG_READ		7	/* JFFS2 nodes reading */
+#define JFFS3_DBG_GCT		8	/* GC thread */
+#define JFFS3_DBG_VFS		9	/* VFS callback handlers */
+#define JFFS3_DBG_BLD		10	/* File system build (on mount) */
 
 #if CONFIG_JFFS3_FS_DEBUG > 0
 #define JFFS3_DBG_PARANOIA_CHECKS	1
@@ -42,6 +45,9 @@
 #define JFFS3_DBG_SUBSYS_ERASE_PRINT	1
 #define JFFS3_DBG_SUBSYS_SALLOC_PRINT	0
 #define JFFS3_DBG_SUBSYS_READ_PRINT	1
+#define JFFS3_DBG_SUBSYS_GCT_PRINT	1
+#define JFFS3_DBG_SUBSYS_VFS_PRINT	1
+#define JFFS3_DBG_SUBSYS_BLD_PRINT	1
 #else
 #define JFFS3_DBG_SUBSYS_OTHER_PRINT	0
 #define JFFS3_DBG_SUBSYS_SCAN_PRINT	0
@@ -50,6 +56,9 @@
 #define JFFS3_DBG_SUBSYS_ERASE_PRINT	0
 #define JFFS3_DBG_SUBSYS_SALLOC_PRINT	0
 #define JFFS3_DBG_SUBSYS_READ_PRINT	0
+#define JFFS3_DBG_SUBSYS_GCT_PRINT	0
+#define JFFS3_DBG_SUBSYS_VFS_PRINT	0
+#define JFFS3_DBG_SUBSYS_BLD_PRINT	0
 #endif
 
 /*
@@ -62,6 +71,18 @@
 	char *subsysname = NULL;						\
 	if ((debug_level) >= CONFIG_JFFS3_FS_DEBUG) {				\
 		switch (subsystem) {						\
+			case JFFS3_DBG_BLD:					\
+				if (JFFS3_DBG_SUBSYS_BLD_PRINT)			\
+					subsysname = "build";			\
+				break;						\
+			case JFFS3_DBG_VFS:					\
+				if (JFFS3_DBG_SUBSYS_VFS_PRINT)			\
+					subsysname = "VFS";			\
+				break;						\
+			case JFFS3_DBG_GCT:					\
+				if (JFFS3_DBG_SUBSYS_GCT_PRINT)			\
+					subsysname = "GCT";			\
+				break;						\
 			case JFFS3_DBG_READ:					\
 				if (JFFS3_DBG_SUBSYS_READ_PRINT)		\
 					subsysname = "read";			\
@@ -123,6 +144,15 @@
 
 #define DBG_READ(debug_level, args...)						\
 	JFFS3DBG_SUBSYSTEM(JFFS3_DBG_READ, debug_level, args)
+	
+#define DBG_GCT(debug_level, args...)						\
+	JFFS3DBG_SUBSYSTEM(JFFS3_DBG_GCT, debug_level, args)
+
+#define DBG_VFS(debug_level, args...)						\
+	JFFS3DBG_SUBSYSTEM(JFFS3_DBG_VFS, debug_level, args)
+
+#define DBG_BLD(debug_level, args...)						\
+	JFFS3DBG_SUBSYSTEM(JFFS3_DBG_BLD, debug_level, args)
 
 #define ERROR_MSG(args...)							\
 	do {									\
@@ -152,7 +182,7 @@
 void
 jffs3_dbg_fragtree_paranoia_check(struct jffs3_inode_info *f);
 
-#if CONFIG_JFFS3_FS_DEBUG > 1
+#if CONFIG_JFFS3_FS_DEBUG > 0
 void
 jffs3_dbg_dump_block_lists(struct jffs3_sb_info *c);
 
@@ -160,7 +190,7 @@
 jffs3_dbg_print_frag_list(struct jffs3_inode_info *f);
 
 void
-jffs3_dbg_dump_buffer(char *buf, int len, uint32_t offs)
+jffs3_dbg_dump_buffer(char *buf, int len, uint32_t offs);
 #endif
 
 





More information about the linux-mtd-cvs mailing list