mtd/fs/jffs2 build.c, 1.74, 1.75 debug.c, 1.5, 1.6 debug.h, 1.3, 1.4 erase.c, 1.82, 1.83 fs.c, 1.59, 1.60 gc.c, 1.150, 1.151 nodelist.c, 1.99, 1.100 nodelist.h, 1.132, 1.133 read.c, 1.40, 1.41 readinode.c, 1.128, 1.129 wbuf.c, 1.95, 1.96

Artem Bityuckiy dedekind at infradead.org
Fri Jul 22 06:32:12 EDT 2005


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

Modified Files:
	build.c debug.c debug.h erase.c fs.c gc.c nodelist.c 
	nodelist.h read.c readinode.c wbuf.c 
Log Message:
[JFFS2] Refine the debugging stuff

Make the debugging functions raceless, clean up them.


Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- build.c	17 Jul 2005 12:01:42 -0000	1.74
+++ build.c	22 Jul 2005 10:32:07 -0000	1.75
@@ -104,7 +104,7 @@
 		goto exit;
 
 	D1(printk(KERN_DEBUG "Scanned flash completely\n"));
-	jffs2_dbg_dump_block_lists(c);
+	jffs2_dbg_dump_block_lists_nolock(c);
 
 	c->flags |= JFFS2_SB_FLAG_BUILDING;
 	/* Now scan the directory tree, increasing nlink according to every dirent found. */
@@ -168,7 +168,7 @@
 	c->flags &= ~JFFS2_SB_FLAG_BUILDING;
 	
 	D1(printk(KERN_DEBUG "Pass 3 complete\n"));
-	jffs2_dbg_dump_block_lists(c);
+	jffs2_dbg_dump_block_lists_nolock(c);
 
 	/* Rotate the lists by some number to ensure wear levelling */
 	jffs2_rotate_lists(c);

Index: debug.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/debug.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- debug.c	20 Jul 2005 15:35:17 -0000	1.5
+++ debug.c	22 Jul 2005 10:32:07 -0000	1.6
@@ -16,8 +16,19 @@
 #include "debug.h"
 
 #ifdef JFFS2_DBG_PARANOIA_CHECKS
+/*
+ * Check the fragtree.
+ */
+void
+__jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f)
+{
+	down(&f->sem);
+	__jffs2_dbg_fragtree_paranoia_check_nolock(f);
+	up(&f->sem);
+}
+	
 void
-jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f)
+__jffs2_dbg_fragtree_paranoia_check_nolock(struct jffs2_inode_info *f)
 {
 	struct jffs2_node_frag *frag;
 	int bitched = 0;
@@ -59,7 +70,7 @@
 
 	if (bitched) {
 		printk(KERN_ERR "Fragtree is corrupted. Fragtree dump:\n");
-		jffs2_dbg_dump_fragtree(f);
+		__jffs2_dbg_dump_fragtree_nolock(f);
 		BUG();
 	}
 }
@@ -68,7 +79,8 @@
  * Check if the flash contains all 0xFF before we start writing.
  */
 void
-jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c, uint32_t ofs, int len)
+__jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c,
+				    uint32_t ofs, int len)
 {
 	size_t retlen;
 	int ret, i;
@@ -94,7 +106,7 @@
 	if (ret) {
 		printk(KERN_ERR "ARGH. About to write node to %#08x on flash, but there are data "
 				"already there. The first corrupted byte is at %#08x offset.\n", ofs, ofs + i);
-		jffs2_dbg_dump_buffer(buf, len, ofs);
+		__jffs2_dbg_dump_buffer(buf, len, ofs);
 		kfree(buf);
 		BUG();
 	}
@@ -106,15 +118,17 @@
  * Check the space accounting and node_ref list correctness for the JFFS2 erasable block 'jeb'.
  */
 void
-jffs2_dbg_acct_paranoia_check(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
+__jffs2_dbg_acct_paranoia_check(struct jffs2_sb_info *c,
+				struct jffs2_eraseblock *jeb)
 {
 	spin_lock(&c->erase_completion_lock);
-	jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
+	__jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
 	spin_unlock(&c->erase_completion_lock);
 }
 	
 void
-jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
+__jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c,
+				       struct jffs2_eraseblock *jeb)
 {
 	uint32_t my_used_size = 0;
 	uint32_t my_unchecked_size = 0;
@@ -128,10 +142,7 @@
 				ref2->flash_offset > jeb->offset + c->sector_size) {
 			printk(KERN_ERR "node_ref %#08x shouldn't be in block at %#08x!\n",
 				ref_offset(ref2), jeb->offset);
-			jffs2_dbg_dump_node_refs(c, jeb);
-			jffs2_dbg_dump_jeb(jeb);
-			jffs2_dbg_dump_block_lists(c);
-			BUG();
+			goto error;
 
 		}
 		if (ref_flags(ref2) == REF_UNCHECKED)
@@ -146,10 +157,7 @@
 					"last_node is at %#08x (mem %p)\n",
 					ref_offset(ref2), ref2, ref_offset(ref2->next_phys), ref2->next_phys,
 					ref_offset(jeb->last_node), jeb->last_node);
-			jffs2_dbg_dump_node_refs(c, jeb);
-			jffs2_dbg_dump_jeb(jeb);
-			jffs2_dbg_dump_block_lists(c);
-			BUG();
+			goto error;
 		}
 		ref2 = ref2->next_phys;
 	}
@@ -157,19 +165,13 @@
 	if (my_used_size != jeb->used_size) {
 		printk(KERN_ERR "Calculated used size %#08x != stored used size %#08x\n",
 				my_used_size, jeb->used_size);
-		jffs2_dbg_dump_node_refs(c, jeb);
-		jffs2_dbg_dump_jeb(jeb);
-		jffs2_dbg_dump_block_lists(c);
-		BUG();
+		goto error;
 	}
 
 	if (my_unchecked_size != jeb->unchecked_size) {
 		printk(KERN_ERR "Calculated unchecked size %#08x != stored unchecked size %#08x\n",
 				my_unchecked_size, jeb->unchecked_size);
-		jffs2_dbg_dump_node_refs(c, jeb);
-		jffs2_dbg_dump_jeb(jeb);
-		jffs2_dbg_dump_block_lists(c);
-		BUG();
+		goto error;
 	}
 
 #if 0
@@ -177,10 +179,7 @@
 	if (my_dirty_size != jeb->dirty_size + jeb->wasted_size) {
 		printk(KERN_ERR "Calculated dirty+wasted size %#08x != stored dirty + wasted size %#08x\n",
 			my_dirty_size, jeb->dirty_size + jeb->wasted_size);
-		jffs2_dbg_dump_node_refs(c, jeb);
-		jffs2_dbg_dump_jeb(jeb);
-		jffs2_dbg_dump_block_lists(c);
-		BUG();
+		goto error;
 	}
 
 	if (jeb->free_size == 0
@@ -188,21 +187,37 @@
 		printk(KERN_ERR "The sum of all nodes in block (%#x) != size of block (%#x)\n",
 			my_used_size + my_unchecked_size + my_dirty_size,
 			c->sector_size);
-		jffs2_dbg_dump_node_refs(c, jeb);
-		jffs2_dbg_dump_jeb(jeb);
-		jffs2_dbg_dump_block_lists(c);
-		BUG();
+		goto error;
 	}
 #endif
+
+	return;
+
+error:
+	__jffs2_dbg_dump_node_refs_nolock(c, jeb);
+	__jffs2_dbg_dump_jeb_nolock(jeb);
+	__jffs2_dbg_dump_block_lists_nolock(c);
+	BUG();
+	
 }
-#endif /* JFFS2_PARANOIA_CHECKS */
+#endif /* JFFS2_DBG_PARANOIA_CHECKS */
 
-#ifdef JFFS2_DBG_DUMPS
+#if defined(JFFS2_DBG_DUMPS) || defined(JFFS2_DBG_PARANOIA_CHECKS)
 /*
  * Dump the node_refs of the 'jeb' JFFS2 eraseblock.
  */
 void
-jffs2_dbg_dump_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
+__jffs2_dbg_dump_node_refs(struct jffs2_sb_info *c,
+			   struct jffs2_eraseblock *jeb)
+{
+	spin_lock(&c->erase_completion_lock);
+	__jffs2_dbg_dump_node_refs_nolock(c, jeb);
+	spin_unlock(&c->erase_completion_lock);
+}
+
+void
+__jffs2_dbg_dump_node_refs_nolock(struct jffs2_sb_info *c,
+				  struct jffs2_eraseblock *jeb)
 {
 	struct jffs2_raw_node_ref *ref;
 	int i = 0;
@@ -228,9 +243,23 @@
 	printk("\n");
 }
 
+/*
+ * Dump an eraseblock's space accounting.
+ */
+void
+__jffs2_dbg_dump_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
+{
+	spin_lock(&c->erase_completion_lock);
+	__jffs2_dbg_dump_jeb_nolock(jeb);
+	spin_unlock(&c->erase_completion_lock);
+}
+
 void
-jffs2_dbg_dump_jeb(struct jffs2_eraseblock *jeb)
+__jffs2_dbg_dump_jeb_nolock(struct jffs2_eraseblock *jeb)
 {
+	if (!jeb)
+		return;
+
 	printk(KERN_DEBUG "dump space accounting for the eraseblock at %#08x\n",
 			jeb->offset);
 
@@ -242,7 +271,15 @@
 }
 
 void
-jffs2_dbg_dump_block_lists(struct jffs2_sb_info *c)
+__jffs2_dbg_dump_block_lists(struct jffs2_sb_info *c)
+{
+	spin_lock(&c->erase_completion_lock);
+	__jffs2_dbg_dump_block_lists_nolock(c);
+	spin_unlock(&c->erase_completion_lock);
+}
+
+void
+__jffs2_dbg_dump_block_lists_nolock(struct jffs2_sb_info *c)
 {
 	printk(KERN_DEBUG "Dump the blocks list\n");
 	printk(KERN_DEBUG "flash_size: %#08x\n",	c->flash_size);
@@ -466,7 +503,15 @@
 }
 
 void
-jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f)
+__jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f)
+{
+	down(&f->sem);
+	jffs2_dbg_dump_fragtree_nolock(f);
+	up(&f->sem);
+}
+
+void
+__jffs2_dbg_dump_fragtree_nolock(struct jffs2_inode_info *f)
 {
 	struct jffs2_node_frag *this = frag_first(&f->fragtree);
 	uint32_t lastofs = 0;
@@ -501,7 +546,7 @@
 
 #define JFFS2_BUFDUMP_BYTES_PER_LINE	32
 void
-jffs2_dbg_dump_buffer(unsigned char *buf, int len, uint32_t offs)
+__jffs2_dbg_dump_buffer(unsigned char *buf, int len, uint32_t offs)
 {
 	int skip;
 	int i;
@@ -522,7 +567,7 @@
 			if (i != 0)
 				printk("\n");
 			offs += JFFS2_BUFDUMP_BYTES_PER_LINE;
-			printk(KERN_DEBUG "%#08x: ", offs);
+			printk(KERN_DEBUG "%0#8x: ", offs);
 		}
 
 		printk("%02x ", buf[i]);
@@ -532,4 +577,4 @@
 
 	printk("\n");
 }
-#endif /* JFFS2_DBG_DUMPS */
+#endif /* JFFS2_DBG_DUMPS || JFFS2_DBG_PARANOIA_CHECKS */

Index: debug.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/debug.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- debug.h	20 Jul 2005 15:32:28 -0000	1.3
+++ debug.h	22 Jul 2005 10:32:08 -0000	1.4
@@ -19,19 +19,15 @@
 #define CONFIG_JFFS2_FS_DEBUG 1
 #endif
 
-/* Enable "paranoia" check if debugging is on */
+/* Enable "paranoia" checks and dumps if debugging is on */
 #if CONFIG_JFFS2_FS_DEBUG > 0
 #define JFFS2_DBG_PARANOIA_CHECKS
+#define JFFS2_DBG_DUMPS
 #endif
 
 /* Enable JFFS2 sanity checks by default */
 #define JFFS2_DBG_SANITY_CHECKS
 
-/* "Paranoia" check functions use different "dump" debugging functions */
-#ifdef JFFS2_DBG_PARANOIA_CHECKS
-#define JFFS2_DBG_DUMPS
-#endif
-
 /* 
  * Dx() are mainly used for debugging messages, they must go away and be
  * superseded by nicer macros.
@@ -48,49 +44,84 @@
 #define D2(x)
 #endif
 
-#ifdef JFFS2_DBG_PARANOIA_CHECKS
+/* "Paranoia" checks */
 void
-jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f);
-
+__jffs2_dbg_fragtree_paranoia_check(struct jffs2_inode_info *f);
 void
-jffs2_dbg_acct_paranoia_check(struct jffs2_sb_info *c,
-			      struct jffs2_eraseblock *jeb);
-
+__jffs2_dbg_fragtree_paranoia_check_nolock(struct jffs2_inode_info *f);
 void
-jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c,
-				     struct jffs2_eraseblock *jeb);
-
+__jffs2_dbg_acct_paranoia_check(struct jffs2_sb_info *c,
+			   	struct jffs2_eraseblock *jeb);
 void
-jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c,
-				  uint32_t ofs, int len);
+__jffs2_dbg_acct_paranoia_check_nolock(struct jffs2_sb_info *c,
+				       struct jffs2_eraseblock *jeb);
+void
+__jffs2_dbg_prewrite_paranoia_check(struct jffs2_sb_info *c,
+				    uint32_t ofs, int len);
 
+/* "Dump" functions */
+void
+__jffs2_dbg_dump_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
+void
+__jffs2_dbg_dump_jeb_nolock(struct jffs2_eraseblock *jeb);
+void
+__jffs2_dbg_dump_block_lists(struct jffs2_sb_info *c);
+void
+__jffs2_dbg_dump_block_lists_nolock(struct jffs2_sb_info *c);
 void
-jffs2_dbg_dump_jeb(struct jffs2_eraseblock *jeb);
+__jffs2_dbg_dump_node_refs(struct jffs2_sb_info *c,
+		 	   struct jffs2_eraseblock *jeb);
+void
+__jffs2_dbg_dump_node_refs_nolock(struct jffs2_sb_info *c,
+				  struct jffs2_eraseblock *jeb);
+void
+__jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f);
+void
+__jffs2_dbg_dump_fragtree_nolock(struct jffs2_inode_info *f);
+void
+__jffs2_dbg_dump_buffer(unsigned char *buf, int len, uint32_t offs);
 
+#ifdef JFFS2_DBG_PARANOIA_CHECKS
+#define jffs2_dbg_fragtree_paranoia_check(f)			\
+	__jffs2_dbg_fragtree_paranoia_check(f)
+#define jffs2_dbg_fragtree_paranoia_check_nolock(f)		\
+	__jffs2_dbg_fragtree_paranoia_check_nolock(f)
+#define jffs2_dbg_acct_paranoia_check(c, jeb)			\
+	__jffs2_dbg_acct_paranoia_check(c,jeb)
+#define jffs2_dbg_acct_paranoia_check_nolock(c, jeb)		\
+	__jffs2_dbg_acct_paranoia_check_nolock(c,jeb)
+#define jffs2_dbg_prewrite_paranoia_check(c, ofs, len)		\
+	__jffs2_dbg_prewrite_paranoia_check(c, ofs, len)
 #else
 #define jffs2_dbg_fragtree_paranoia_check(f)
+#define jffs2_dbg_fragtree_paranoia_check_nolock(f)
 #define jffs2_dbg_acct_paranoia_check(c, jeb)
 #define jffs2_dbg_acct_paranoia_check_nolock(c, jeb)
 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len)
-#define jffs2_dbg_dump_jeb(jeb)
 #endif /* !JFFS2_PARANOIA_CHECKS */
 
 #ifdef JFFS2_DBG_DUMPS
-void
-jffs2_dbg_dump_block_lists(struct jffs2_sb_info *c);
-
-void
-jffs2_dbg_dump_node_refs(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb);
-
-void
-jffs2_dbg_dump_fragtree(struct jffs2_inode_info *f);
-
-void
-jffs2_dbg_dump_buffer(unsigned char *buf, int len, uint32_t offs);
+#define jffs2_dbg_dump_jeb(c, jeb)				\
+	__jffs2_dbg_dump_jeb(c, jeb);
+#define jffs2_dbg_dump_jeb_nolock(jeb)				\
+	__jffs2_dbg_dump_jeb_nolock(jeb);
+#define jffs2_dbg_dump_block_lists(c)				\
+	__jffs2_dbg_dump_block_lists(c)
+#define jffs2_dbg_dump_block_lists_nolock(c)			\
+	__jffs2_dbg_dump_block_lists_nolock(c)
+#define jffs2_dbg_dump_fragtree(f)				\
+	__jffs2_dbg_dump_fragtree(f);
+#define jffs2_dbg_dump_fragtree_nolock(f)			\
+	__jffs2_dbg_dump_fragtree_nolock(f);
+#define jffs2_dbg_dump_buffer(buf, len, offs)			\
+	__jffs2_dbg_dump_buffer(*buf, len, offs);
 #else
+#define jffs2_dbg_dump_jeb(c, jeb)
+#define jffs2_dbg_dump_jeb_nolock(jeb)
 #define jffs2_dbg_dump_block_lists(c)
-#define jffs2_dbg_dump_node_refs(c, jeb)
+#define jffs2_dbg_dump_block_lists_nolock(c)
 #define jffs2_dbg_dump_fragtree(f)
+#define jffs2_dbg_dump_fragtree_nolock(f)
 #define jffs2_dbg_dump_buffer(buf, len, offs)
 #endif /* !JFFS2_DBG_DUMPS */
 
@@ -132,7 +163,6 @@
 	jffs2_dbg_acct_sanity_check_nolock(c, jeb);
 	spin_unlock(&c->erase_completion_lock);
 }
-
 #else
 #define jffs2_dbg_acct_sanity_check(c, jeb)
 #define jffs2_dbg_acct_sanity_check_nolock(c, jeb)

Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/erase.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- erase.c	20 Jul 2005 15:32:28 -0000	1.82
+++ erase.c	22 Jul 2005 10:32:08 -0000	1.83
@@ -48,7 +48,8 @@
 #else /* Linux */
 	struct erase_info *instr;
 
-	D1(printk(KERN_DEBUG "jffs2_erase_block(): erase block %#x (range %#x-%#x)\n", jeb->offset, jeb->offset, jeb->offset + c->sector_size));
+	D1(printk(KERN_DEBUG "jffs2_erase_block(): erase block %#08x (range %#08x-%#08x)\n",
+				jeb->offset, jeb->offset, jeb->offset + c->sector_size));
 	instr = kmalloc(sizeof(struct erase_info) + sizeof(struct erase_priv_struct), GFP_KERNEL);
 	if (!instr) {
 		printk(KERN_WARNING "kmalloc for struct erase_info in jffs2_erase_block failed. Refiling block for later\n");

Index: fs.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/fs.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- fs.c	18 Jul 2005 11:21:19 -0000	1.59
+++ fs.c	22 Jul 2005 10:32:08 -0000	1.60
@@ -194,19 +194,15 @@
 	buf->f_namelen = JFFS2_MAX_NAME_LEN;
 
 	spin_lock(&c->erase_completion_lock);
-
 	avail = c->dirty_size + c->free_size;
 	if (avail > c->sector_size * c->resv_blocks_write)
 		avail -= c->sector_size * c->resv_blocks_write;
 	else
 		avail = 0;
+	spin_unlock(&c->erase_completion_lock);
 
 	buf->f_bavail = buf->f_bfree = avail >> PAGE_SHIFT;
 
-	jffs2_dbg_dump_block_lists(c);
-
-	spin_unlock(&c->erase_completion_lock);
-
 	return 0;
 }
 

Index: gc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/gc.c,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- gc.c	17 Jul 2005 12:01:43 -0000	1.150
+++ gc.c	22 Jul 2005 10:32:08 -0000	1.151
@@ -111,7 +111,6 @@
 		ret->wasted_size = 0;
 	}
 
-	jffs2_dbg_dump_block_lists(c);
 	return ret;
 }
 
@@ -142,7 +141,7 @@
 		if (c->checked_ino > c->highest_ino) {
 			printk(KERN_CRIT "Checked all inodes but still 0x%x bytes of unchecked space?\n",
 			       c->unchecked_size);
-			jffs2_dbg_dump_block_lists(c);
+			jffs2_dbg_dump_block_lists_nolock(c);
 			spin_unlock(&c->erase_completion_lock);
 			BUG();
 		}

Index: nodelist.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- nodelist.c	15 Jul 2005 10:13:54 -0000	1.99
+++ nodelist.c	22 Jul 2005 10:32:08 -0000	1.100
@@ -203,7 +203,7 @@
 			return -EIO;
 			
 		if (unlikely(err)) {
-			printk(KERN_WARNING "Read remainder of name in jffs2_get_inode_nodes(): error %d\n", err);
+			printk(KERN_WARNING "Read remainder of name: error %d\n", err);
 			jffs2_free_full_dirent(fd);
 			return -EIO;
 		}

Index: nodelist.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.h,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- nodelist.h	17 Jul 2005 06:56:21 -0000	1.132
+++ nodelist.h	22 Jul 2005 10:32:08 -0000	1.133
@@ -236,7 +236,7 @@
 		       ret, ref->__totlen);
 		if (!jeb)
 			jeb = &c->blocks[ref->flash_offset / c->sector_size];
-		jffs2_dbg_dump_node_refs(c, jeb);
+		jffs2_dbg_dump_node_refs_nolock(c, jeb);
 		BUG();
 	}
 #endif

Index: read.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/read.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- read.c	17 Jul 2005 06:56:21 -0000	1.40
+++ read.c	22 Jul 2005 10:32:08 -0000	1.41
@@ -174,7 +174,6 @@
 			if (frag) {
 				D1(printk(KERN_NOTICE "Eep. Hole in ino #%u fraglist. frag->ofs = 0x%08x, offset = 0x%08x\n", f->inocache->ino, frag->ofs, offset));
 				holesize = min(holesize, frag->ofs - offset);
-				D2(jffs2_dbg_dump_fragtree(f));
 			}
 			D1(printk(KERN_DEBUG "Filling non-frag hole from %d-%d\n", offset, offset+holesize));
 			memset(buf, 0, holesize);

Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/readinode.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- readinode.c	17 Jul 2005 12:01:43 -0000	1.128
+++ readinode.c	22 Jul 2005 10:32:08 -0000	1.129
@@ -92,8 +92,8 @@
 				mark_ref_normal(next->node->raw);
 		}
 	}
-	jffs2_dbg_fragtree_paranoia_check(f);
-	jffs2_dbg_dump_fragtree(f);
+	jffs2_dbg_fragtree_paranoia_check_nolock(f);
+	jffs2_dbg_dump_fragtree_nolock(f);
 	return 0;
 }
 
@@ -480,7 +480,7 @@
 
 		jffs2_free_tmp_dnode_info(tn);
 	}
-	jffs2_dbg_fragtree_paranoia_check(f);
+	jffs2_dbg_fragtree_paranoia_check_nolock(f);
 
 	if (!fn) {
 		/* No data nodes for this inode. */

Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/wbuf.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- wbuf.c	20 Jul 2005 15:32:28 -0000	1.95
+++ wbuf.c	22 Jul 2005 10:32:08 -0000	1.96
@@ -137,7 +137,6 @@
 {
 	D1(printk("About to refile bad block at %08x\n", jeb->offset));
 
-	jffs2_dbg_dump_block_lists(c);
 	/* File the existing block on the bad_used_list.... */
 	if (c->nextblock == jeb)
 		c->nextblock = NULL;
@@ -154,7 +153,6 @@
 		c->nr_erasing_blocks++;
 		jffs2_erase_pending_trigger(c);
 	}
-	jffs2_dbg_dump_block_lists(c);
 
 	/* Adjust its size counts accordingly */
 	c->wasted_size += jeb->free_size;
@@ -162,6 +160,7 @@
 	jeb->wasted_size += jeb->free_size;
 	jeb->free_size = 0;
 
+	jffs2_dbg_dump_block_lists_nolock(c);
 	jffs2_dbg_acct_sanity_check_nolock(c,jeb);
 	jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
 }





More information about the linux-mtd-cvs mailing list