mtd/fs/jffs3 debug.c,1.5,1.6 debug.h,1.16,1.17 nodelist.h,3.5,3.6

Artem Bityuckiy dedekind at infradead.org
Thu Dec 23 09:13:00 EST 2004


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

Modified Files:
	debug.c debug.h nodelist.h 
Log Message:
Move one more debugging function to debug.c


Index: debug.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/debug.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- debug.c	22 Dec 2004 18:35:51 -0000	1.5
+++ debug.c	23 Dec 2004 14:12:56 -0000	1.6
@@ -24,8 +24,8 @@
 /*
  * Dump the node_refs of the 'jeb' JFFS3 eraseblock.
  */
-static inline void
-node_refs_dump(struct jffs3_eraseblock *jeb) {
+static void
+jffs3_dbg_node_refs_dump(struct jffs3_eraseblock *jeb) {
 	struct jffs3_raw_node_ref *ref;
 	int i = 0;
 

Index: debug.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/debug.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- debug.h	22 Dec 2004 18:35:51 -0000	1.16
+++ debug.h	23 Dec 2004 14:12:56 -0000	1.17
@@ -292,6 +292,9 @@
 	} while(0)
 
 void
+jffs3_dbg_node_refs_dump(struct jffs3_eraseblock *jeb);
+	
+void
 jffs3_dbg_acct_paranoia_check(struct jffs3_sb_info *c, struct jffs3_eraseblock *jeb);
 
 void

Index: nodelist.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/nodelist.h,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -r3.5 -r3.6
--- nodelist.h	21 Dec 2004 15:18:50 -0000	3.5
+++ nodelist.h	23 Dec 2004 14:12:56 -0000	3.6
@@ -210,21 +210,7 @@
 	struct jffs3_raw_node_ref *gc_node;	/* Next node to be garbage collected */
 };
 
-static inline void paranoia_failed_dump(struct jffs3_eraseblock *jeb)
-{
-	struct jffs3_raw_node_ref *ref;
-	int i=0;
-
-	printk(KERN_NOTICE);
-	for (ref = jeb->first_node; ref; ref = ref->next_phys) {
-		printk("%08x->", ref_offset(ref));
-		if (++i == 8) {
-			i = 0;
-			printk("\n" KERN_NOTICE);
-		}
-	}
-	printk("\n");
-}
+#include "debug.h"
 
 /* Calculate totlen from surrounding nodes or eraseblock */
 static inline uint32_t __ref_totlen(struct jffs3_sb_info *c,
@@ -269,7 +255,8 @@
 		       ret, ref->__totlen);
 		if (!jeb)
 			jeb = &c->blocks[ref->flash_offset / c->sector_size];
-		paranoia_failed_dump(jeb);
+
+		jffs3_dbg_node_refs_dump(jeb);
 		BUG();
 	}
 #endif
@@ -421,4 +408,3 @@
 
 #endif /* __JFFS3_NODELIST_H__ */
 
-#include "debug.h"





More information about the linux-mtd-cvs mailing list