mtd/fs/jffs2 erase.c,1.52,1.53

David Woodhouse dwmw2 at infradead.org
Wed Oct 8 13:22:56 EDT 2003


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

Modified Files:
	erase.c 
Log Message:
Fix up space accounting if an erased block had wasted space


Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/erase.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- erase.c	4 Oct 2003 08:33:06 -0000	1.52
+++ erase.c	8 Oct 2003 17:22:54 -0000	1.53
@@ -123,10 +123,11 @@
 			D1(printk(KERN_DEBUG "Starting erase of pending block 0x%08x\n", jeb->offset));
 			list_del(&jeb->list);
 			c->erasing_size += c->sector_size;
+			c->wasted_size -= jeb->wasted_size;
 			c->free_size -= jeb->free_size;
 			c->used_size -= jeb->used_size;
 			c->dirty_size -= jeb->dirty_size;
-			jeb->used_size = jeb->dirty_size = jeb->free_size = 0;
+			jeb->wasted_size = jeb->used_size = jeb->dirty_size = jeb->free_size = 0;
 			jffs2_free_all_node_refs(c, jeb);
 			list_add(&jeb->list, &c->erasing_list);
 			spin_unlock(&c->erase_completion_lock);




More information about the linux-mtd-cvs mailing list