FAT file system on NAND flash memory

Josh Boyer jwboyer at gmail.com
Fri Apr 27 09:45:27 EDT 2007


On 4/26/07, Seongsu Lee <senux at senux.com> wrote:
> On Thu, Apr 12, 2007 at 08:55:23AM -0500, Josh Boyer wrote:
> > On 4/12/07, Seongsu Lee <senux at senux.com> wrote:
> > > Hi,
> > >
> > > In my knowledge, mtdblock.c must be used to use
> > > FAT filesystem on bare NAND flash memories
> > > because NFTL is made only for a specific hardware,
> > > DiskOnChip.
> > >
> > > (Layer 0) VFS
> > > (Layer 1) FAT (or EXT2, EXT3)
> > > (Layer 2) mtdblock.c (nftl.c can be used only with DiskOnChip)
> > > (Layer 3) NAND flash memory driver (vendor specific)
> > > (Layer 4) Physical NAND flash memory
> > >
> > > Please let me know if it is wrong.
> >
> > That layering is correct, but your results will be bad.  mtdblock
> > doesn't handle bad blocks.  So if you have one in the middle of your
> > filesystem, it will break things.  You need some kind of translation
> > layer if you're going to use NAND.
>
> Thank you for the reply.
>
> Just one more question.
>
> Could you tell me the reason that there is no translation layer code
> in MTD for bare flash memories?

Because most users of MTD already handle bad blocks themselves on bare
NAND.  JFFS2, yaffs, etc. all have bad block handling contained within
them.

UBI can be used for things that lack the proper translation
themselves.  JFFS2 can even run on top if a UBI volume.  Perhaps you
should check into that.

josh




More information about the linux-mtd mailing list