mtd/fs/jffs2 background.c,1.25,1.26

David Woodhouse dwmw2 at infradead.org
Fri May 10 17:25:53 EDT 2002


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

Modified Files:
	background.c 
Log Message:
Make thread_should_wake() print its return value.


Index: background.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/background.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- background.c	10 May 2002 21:09:03 -0000	1.25
+++ background.c	10 May 2002 21:25:50 -0000	1.26
@@ -179,18 +179,22 @@
 static int thread_should_wake(struct jffs2_sb_info *c)
 {
 	uint32_t gcnodeofs = 0;
+	int ret;
 
 	/* Don't count any progress we've already made through the gcblock
 	   as dirty space, for the purposes of this calculation */
 	if (c->gcblock && c->gcblock->gc_node)
 		gcnodeofs = c->gcblock->gc_node->flash_offset & ~3 & (c->sector_size-1);
 
-	D1(printk(KERN_DEBUG "thread_should_wake(): nr_free_blocks %d, nr_erasing_blocks %d, dirty_size 0x%x (mod 0x%x\n", 
-		  c->nr_free_blocks, c->nr_erasing_blocks, c->dirty_size,
-		  c->dirty_size - gcnodeofs));
 	if (c->nr_free_blocks + c->nr_erasing_blocks < JFFS2_RESERVED_BLOCKS_GCTRIGGER &&
 	    (c->dirty_size - gcnodeofs) > c->sector_size)
-		return 1;
+		ret = 1;
 	else 
-		return 0;
+		ret = 0;
+
+	D1(printk(KERN_DEBUG "thread_should_wake(): nr_free_blocks %d, nr_erasing_blocks %d, dirty_size 0x%x (mod 0x%x\n): %s", 
+		  c->nr_free_blocks, c->nr_erasing_blocks, c->dirty_size,
+		  c->dirty_size - gcnodeofs, ret?"yes":"no"));
+
+	return ret;
 }





More information about the linux-mtd-cvs mailing list