JFFS2 Config / FAQ

johan.adolfsson at axis.com johan.adolfsson at axis.com
Mon Nov 25 15:20:17 EST 2002


----- Original Message -----
From: "Jörn Engel" <joern at wohnheim.fh-wedel.de>
To: "David Woodhouse" <dwmw2 at infradead.org>
Cc: <joakim.tjernlund at lumentis.se>; "Herman Oosthuysen"
<Herman at wirelessnetworksinc.com>; <linux-mtd at lists.infradead.org>
Sent: den 25 november 2002 19:38
Subject: Re: JFFS2 Config / FAQ


> On Mon, 25 November 2002 16:19:53 +0000, David Woodhouse wrote:
> > joakim.tjernlund at lumentis.se said:
> > >  I think it's 5 blocks currently. It should be possible to lower that
> > > count, but that needs testing.
> >
> > It was tested. It broke. http://mhonarc.axis.se/jffs-dev/msg01495.html
>
> Yes, it broke with a smaller number. But wether that smaller number
> was 4, 1 or 0 is unknown.
>
> I would expect 3 or 4 to be fine, but not bet more than a beer on it.
>
> Jörn

We applied the following patch to test:
--- os/linux/fs/jffs2/nodelist.h        23 Apr 2002 13:18:37 -0000
1.1.1.3
+++ os/linux/fs/jffs2/nodelist.h        12 Jul 2002 10:11:57 -0000
@@ -223,10 +223,10 @@
 #define ALLOC_DELETION 1       /* Deletion node. Best to allow it */
 #define ALLOC_GC       2       /* Space requested for GC. Give it or die */

-#define JFFS2_RESERVED_BLOCKS_BASE 3
/* Number
 of free blocks there must be before we... */
-#define JFFS2_RESERVED_BLOCKS_WRITE (JFFS2_RESERVED_BLOCKS_BASE + 2)
/* ... al
low a normal filesystem write */
+#define JFFS2_RESERVED_BLOCKS_BASE 0
/* Number
 of free blocks there must be before we... */
+#define JFFS2_RESERVED_BLOCKS_WRITE (JFFS2_RESERVED_BLOCKS_BASE + 1)
/* ... al
low a normal filesystem write */
 #define JFFS2_RESERVED_BLOCKS_DELETION (JFFS2_RESERVED_BLOCKS_BASE + 1)
/
* ... allow a normal filesystem deletion */
-#define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE + 3)
/* ... wa
ke up the GC thread */
+#define JFFS2_RESERVED_BLOCKS_GCTRIGGER (JFFS2_RESERVED_BLOCKS_BASE + 1)
/* ... wa
ke up the GC thread */
 #define JFFS2_RESERVED_BLOCKS_GCBAD (JFFS2_RESERVED_BLOCKS_BASE + 1)
/* ... pi
ck a block from the bad_list to GC */
 #define JFFS2_RESERVED_BLOCKS_GCMERGE (JFFS2_RESERVED_BLOCKS_BASE)
/* ... me
rge pages when garbage collecting */

Our JFFS2 partition was only 5x64kB (2MB flash total, kernel+cramfs the
rest)

/Johan






More information about the linux-mtd mailing list