mtd/fs/jffs2 build.c,1.49,1.50
David Woodhouse
dwmw2 at infradead.org
Wed Oct 8 07:46:30 EDT 2003
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv18021/fs/jffs2
Modified Files:
build.c
Log Message:
Add nospc_dirty_size to superblock.
Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- build.c 4 Oct 2003 08:33:06 -0000 1.49
+++ build.c 8 Oct 2003 11:46:27 -0000 1.50
@@ -269,11 +269,18 @@
INIT_LIST_HEAD(&c->bad_used_list);
c->highest_ino = 1;
- c->resv_blocks_write = 5;
+ /* Heuristics for amount of free space required for various operations */
+
+ /* Deletion should almost _always_ be allowed. */
c->resv_blocks_deletion = 2;
+ c->resv_blocks_write = 5;
c->resv_blocks_gctrigger = 6;
c->resv_blocks_gcbad = 4;
c->resv_blocks_gcmerge = 3;
+
+ /* If there's less than this amount of dirty space, don't bother
+ trying to GC to make more space. It'll be a fruitless task */
+ c->nospc_dirty_size = c->sector_size + (c->flash_size / 100);
if (jffs2_build_filesystem(c)) {
D1(printk(KERN_DEBUG "build_fs failed\n"));
More information about the linux-mtd-cvs
mailing list