Changing the number of JFFS2 erasblocks?

Steven Scholz steven.scholz at imc-berlin.de
Thu Apr 8 08:54:27 EDT 2004


Steven Scholz wrote:

> Hi there,
> 
> I have 320KB of unused flash in our embedded systems. Now I want to make 
> use of them using an read/write filesystem by updating the kernel.
> 
> Since it's flash I need some fs that's aware of the flash wearing 
> problem. So I guess that leaves only JFFS2.
> 
> My problem is that the 5 erase blocks set by default will eat up the 
> whole 320KB and leaves no free space. And IIRC there's no way to pass 
> the number of eraseblocks during mount.
> 
> Could I hardcode the number of eraseblocks to 1 in my new (but still old 
> 2.4.20) kernel? Where is it defined?
> And what happens to my root fs which is JFFS2 when I change that?


Is it enough and ok to just change the

/* Number of free blocks there must be before we... */
#define JFFS2_RESERVED_BLOCKS_BASE 3

in fs/jffs2/nodelist.h ???

Steven




More information about the linux-mtd mailing list