[RFC] read-only filesystem support for NAND flash devices

Josh Boyer jwboyer at gmail.com
Thu May 11 19:34:28 EDT 2006


On 5/11/06, Russ Dill <russ.dill at gmail.com> wrote:
> > > Free block list? Bad block list? Tracking of block numbers? Sounds
> > > like a full on FTL to me.
> >
> > A full read-write FTL needs to handle 512-byte writes if it's going to
> > pretend to be a normal block device. A simple FTL for read-only stuff
> > like cramfs/squashfs doesn't need that.
> >
> > We should probably do this kind of thing as an FTL -- we already have
> > the 'mtd_blkdevs' infrastructure to help you by doing most of the
> > interfacing to MTD and block layers for you. And then you can use any
> > read-only file system on it.
>
> True, I also realized another possible shortcut. If a blocks gets an
> ECC correction on a read, rewrite it to a free block, erase the block,
> rewrite it from the data written to the free block, and then erase the
> free block. You'd need to put some info in the OOB so you could know
> what the state is on power recovery.

Um, or simply leave the copied block alone, erase the original block
and use it as the spare now.  You only need a single block for
scrubbing.

josh




More information about the linux-mtd mailing list