squashfs and NAND flash
phillip at lougher.demon.co.uk
Thu Apr 27 19:35:46 EDT 2006
Russ Dill wrote:
> On 4/25/06, Andy Hawkins <a.hawkins at cabletime.com> wrote:
>>>Should mtd handle bad blocks when using squashfs?
>>I suspect you will have to write a simple 'translation layer' that
>>automatically skips bad blocks. This is something we had to do in our
>>Basically, if (for example) block 4 is bad, then any request for block 4
>>should actually return block 5. Also, any request for block 5 should return
>>block 6 etc. etc. etc.
> Even worse, NAND flash bits occasionally flip for no reason, ie, even
> when the sector isn't bad. If you read a sector, and get an ecc
> correction, you should rewrite the sector to a free sector, and then
> mark the current sector as free.
> So in other words, even with a read only filesystem, you need a good
> FTL, unless you really don't care if units stop booting after a year
> or two.
A couple of years ago I did some work making Squashfs work with NAND.
Because of the inherent unreliability of NAND, and the constant MTD code
base changes, I decided not to make this work publically available.
Providing native NAND support in Squashfs represents too much work for
absolutely no gain. It is unlikely this is going to change in the near
More information about the linux-mtd