Cram FS on NAND - How to do this?

Jasmine Strong jasmine at regolith.co.uk
Wed Jun 11 05:01:29 EDT 2003


On Wednesday, Jun 11, 2003, at 09:43 Europe/London, Pantelis Antoniou 
wrote:
[snip]

1)  Where are you going to store this bad block list?

There isn't anywhere on the Flash that can be guaranteed good.
You can't pick a set location for the bad block list, so you must scan
for it-  and once you have found it you must have some way to
check that you are looking at a good copy of it.

If you plan to generate it at mount time, you run the risk that
a block has gone bad while the device has been dormant, and
thus you may generate a block list that does not match the one
the device was written with,  which could render a block
-structured filesystem like cramfs unreadable.

Also, all this scanning takes time, which makes mounting slow.

2)  What about blocks that go bad while the system is in service?

Flash blocks go bad randomly, and often while they are in use.
You must use a strategy to cope with this-  JFFS and YAFFS use
Reed-Solomon forward error correction.

3)  What about wear-levelling?

Flash blocks do not last indefinitely.  Every erase brings the Flash
block you are erasing closer to the end of its lifespan.  Obviously
this is less of a concern on a static filesystem like cramfs.

Why not put a cramfs filesystem into a file on a YAFFS or JFFS2
filesystem and use a loopback to mount it?

-Jas.




More information about the linux-mtd mailing list