mtd/fs/jffs2 wbuf.c,1.57,1.58

David Woodhouse dwmw2 at infradead.org
Sun Nov 2 04:51:12 EST 2003


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

Modified Files:
	wbuf.c 
Log Message:
Don't GC to flush wbuf if we haven't finished crc-checking yet.


Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/wbuf.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- wbuf.c	28 Oct 2003 17:14:58 -0000	1.57
+++ wbuf.c	2 Nov 2003 09:51:10 -0000	1.58
@@ -514,8 +514,12 @@
 	old_wbuf_ofs = c->wbuf_ofs;
 	old_wbuf_len = c->wbuf_len;
 
-	while (old_wbuf_len &&
-	       old_wbuf_ofs == c->wbuf_ofs) {
+	if (c->unchecked_size) {
+		/* GC won't make any progress for a while */
+		D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() padding. Not finished checking\n"));
+		ret = __jffs2_flush_wbuf(c, 2);
+	} else while (old_wbuf_len &&
+		      old_wbuf_ofs == c->wbuf_ofs) {
 
 		up(&c->alloc_sem);
 




More information about the linux-mtd-cvs mailing list