Re: squashfs and NAND flash

Russ Dill
2006-04-27T21:33:52Z

On 4/25/06, Andy Hawkins <a.hawkins@cabletime.com> wrote:
> Hi,
>
> > 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
> device.
>
> 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.