mtd/fs/jffs2 scan.c,1.111,1.112

gleixner at infradead.org gleixner at infradead.org
Sun Sep 12 05:56:15 EDT 2004


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

Modified Files:
	scan.c 
Log Message:
Fix the case where a formatted partition has no data but one or more empty blocks. This happens on NAND where the cleanmarker is not taken into account as it resides ion OOB

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- scan.c	27 Jul 2004 14:13:43 -0000	1.111
+++ scan.c	12 Sep 2004 09:56:13 -0000	1.112
@@ -241,7 +241,7 @@
 	}
 #endif
 	if (c->nr_erasing_blocks) {
-		if ( !c->used_size && ((empty_blocks+bad_blocks)!= c->nr_blocks || bad_blocks == c->nr_blocks) ) {
+		if ( !c->used_size && ((c->nr_free_blocks+empty_blocks+bad_blocks)!= c->nr_blocks || bad_blocks == c->nr_blocks) ) { 
 			printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n");
 			printk(KERN_NOTICE "empty_blocks %d, bad_blocks %d, c->nr_blocks %d\n",empty_blocks,bad_blocks,c->nr_blocks);
 			ret = -EIO;





More information about the linux-mtd-cvs mailing list