mtd/fs/jffs2 wbuf.c,1.17,1.18

gleixner at infradead.org gleixner at infradead.org
Tue Sep 10 02:35:51 EDT 2002


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

Modified Files:
	wbuf.c 
Log Message:
speedup scan for NAND

Index: wbuf.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/wbuf.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- wbuf.c	29 Aug 2002 21:45:54 -0000	1.17
+++ wbuf.c	10 Sep 2002 06:35:48 -0000	1.18
@@ -511,7 +511,7 @@
 	}	
 
 	/* allocate a buffer for all oob data in this sector */
-	len = oob_size * (c->sector_size/c->mtd->oobblock);
+	len = 4 * oob_size;
 	buf = kmalloc(len, GFP_KERNEL);
 	if (!buf) {
 		printk(KERN_NOTICE "jffs2_check_oob_empty(): allocation of temporary data buffer for oob check failed\n");
@@ -535,7 +535,7 @@
 	}
 	
 	/* Special check for first two pages */
-	for (page = 0; page < 2; page += oob_size) {
+	for (page = 0; page < 2 * oob_size; page += oob_size) {
 		/* Check for bad block marker */
 		if (buf[page+badblock_pos] != 0xff) {
 			D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Bad or failed block at %08x\n",jeb->offset));





More information about the linux-mtd-cvs mailing list