Eraseblock size in jffs2 ?

David Woodhouse dwmw2 at infradead.org
Wed Oct 10 12:47:26 EDT 2001


tsm at airfiber.com said:
>  Where, exactly?  Or at least, a starting point.  I've just started
> looking into using JFFS2 with my DOC2000s.

Firstly, you need to deal with the restrictions imposed by NAND flash - 
you can only make ten individual write() calls to any given 512-byte page 
before the contents of that page become undefined until the next erase. 
Because dirent nodes are quite small, it's feasible that you could try to 
fit more than ten of them in a single page - basically, on the tenth write 
you need to also pad to the end of the page with free space.

Secondly, you want ECC on the nodes instead of just a CRC - you want to be 
able to _correct_ errors instead of just complaining about them.

That's quite a simple addition and can be implemented and tested without 
even playing with real hardware. Define two new node types and make the 
code deal with them accordingly. The actual ECC code is easy enough - 
there's plenty of example code around, including some in nand/nand_ecc.c.


--
dwmw2






More information about the linux-mtd mailing list