mtd/fs/jffs3 background.c,3.4,3.5 build.c,3.4,3.5 erase.c,3.3,3.4

Artem Bityuckiy dedekind at infradead.org
Wed Dec 22 13:33:52 EST 2004


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

Modified Files:
	background.c build.c erase.c 
Log Message:
printk changes.


Index: background.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/background.c,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -r3.4 -r3.5
--- background.c	21 Dec 2004 14:11:19 -0000	3.4
+++ background.c	22 Dec 2004 18:33:48 -0000	3.5
@@ -44,12 +44,12 @@
 
 	pid = kernel_thread(jffs3_garbage_collect_thread, c, CLONE_FS|CLONE_FILES);
 	if (pid < 0) {
-		printk(KERN_WARNING "fork failed for JFFS3 garbage collect thread: %d\n", -pid);
+		DBG_GCT(1, "fork failed for JFFS3 garbage collect thread: %d\n", -pid);
 		complete(&c->gc_thread_exit);
 		ret = pid;
 	} else {
 		/* Wait for it... */
-		D1(printk(KERN_DEBUG "JFFS3: Garbage collect thread is pid %d\n", pid));
+		DBG_GCT(1, "Garbage collect thread is pid %d\n", pid);
 		down(&c->gc_thread_start);
 	}
  
@@ -60,7 +60,7 @@
 {
 	spin_lock(&c->erase_completion_lock);
 	if (c->gc_task) {
-		D1(printk(KERN_DEBUG "jffs3: Killing GC task %d\n", c->gc_task->pid));
+		DBG_GCT(1, "Killing GC task %d\n", c->gc_task->pid);
 		send_sig(SIGKILL, c->gc_task, 1);
 	}
 	spin_unlock(&c->erase_completion_lock);

Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/build.c,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -r3.4 -r3.5
--- build.c	21 Dec 2004 15:18:50 -0000	3.4
+++ build.c	22 Dec 2004 18:33:48 -0000	3.5
@@ -105,7 +105,8 @@
 		goto exit;
 
 	DBG_BLD(1, "Scanned flash completely\n");
-	D2(jffs3_dbg_dump_block_lists(c));
+	if (DEBUG2)
+		jffs3_dbg_dump_block_lists(c);
 
 	/* Now scan the directory tree, increasing nlink according to every dirent found. */
 	for_each_inode(i, c, ic) {
@@ -168,7 +169,8 @@
 		cond_resched();
 	}
 	DBG_BLD(1, "Pass 3 complete\n");
-	D2(jffs3_dbg_dump_block_lists(c));
+	if (DEBUG2)
+		jffs3_dbg_dump_block_lists(c);
 
 	/* Rotate the lists by some number to ensure wear levelling */
 	jffs3_rotate_lists(c);

Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/erase.c,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -r3.3 -r3.4
--- erase.c	17 Dec 2004 14:50:17 -0000	3.3
+++ erase.c	22 Dec 2004 18:33:48 -0000	3.4
@@ -260,18 +260,18 @@
 		return;
 	}
 
-	DBG_ERASE(1, "Removed nodes in range %#08x-%#08x from ino #%u\n",
+	DBG_NR(1, "Removed nodes in range %#08x-%#08x from ino #%u\n",
 		  jeb->offset, jeb->offset + c->sector_size, ic->ino);
 
 	D2({
 		int i=0;
 		struct jffs3_raw_node_ref *this;
-		printk(KERN_DEBUG "After remove_node_refs_from_ino_list: \n" KERN_DEBUG);
+		DBG_NR(2, "After remove_node_refs_from_ino_list: \n" KERN_DEBUG);
 
 		this = ic->nodes;
 	   
 		while(this) {
-			printk( "%#08x(%d)->", ref_offset(this), ref_flags(this));
+			printk("%#08x(%d)->", ref_offset(this), ref_flags(this));
 			if (++i == 5) {
 				printk("\n" KERN_DEBUG);
 				i=0;
@@ -282,7 +282,7 @@
 	});
 
 	if (ic->nodes == (void *)ic) {
-		DBG_ERASE(1, "inocache for ino #%u is all gone now. Freeing\n", ic->ino);
+		DBG_NR(1, "inocache for ino #%u is all gone now. Freeing\n", ic->ino);
 		jffs3_del_ino_cache(c, ic);
 		jffs3_free_inode_cache(ic);
 	}
@@ -291,7 +291,7 @@
 static void jffs3_free_all_node_refs(struct jffs3_sb_info *c, struct jffs3_eraseblock *jeb)
 {
 	struct jffs3_raw_node_ref *ref;
-	DBG_ERASE(1, "Freeing all node refs for eraseblock offset %#08x\n", jeb->offset);
+	DBG_NR(1, "Freeing all node refs for eraseblock offset %#08x\n", jeb->offset);
 	while(jeb->first_node) {
 		ref = jeb->first_node;
 		jeb->first_node = ref->next_phys;
@@ -439,7 +439,8 @@
 	c->used_size += jeb->used_size;
 
 	jffs3_dbg_acct_sanity_check(c, jeb);
-	jffs3_dbg_acct_paranoia_check(c, jeb);
+	if (DEBUG1)
+		jffs3_dbg_acct_paranoia_check(c, jeb);
 
 	list_add_tail(&jeb->list, &c->free_list);
 	c->nr_erasing_blocks--;





More information about the linux-mtd-cvs mailing list