Subject: Re: Flash Translation Layer?
To: None <tech-embed@netbsd.org>
From: Bucky Katz <bucky@picovex.com>
List: tech-embed
Date: 01/18/2007 12:34:27
"Perry E. Metzger" <perry@piermont.com> writes:

> Bucky Katz <bucky@picovex.com> writes:
>> Journaling for FFS is definitely a good thing. It won't, by itself, do
>> everything needed for NAND flash based file systems.
>
> I don't think it would be the right approach at all, actually. I'd say
> that a wear leveling layer plus an adaptation of our tmpfs code or
> something like it might make more sense for a flashfs than any form of
> ffs.

Sort of.  A wear leveling / translation / bad block management layer
that abstracts NAND as a block device is a good thing and seems to be
the most common approach taken by current NAND filesystem
implementations.

But such a layer needs cooperation from the filesystem and journaling
filesystems seem to be the cleanest way to get it that cooperation.

You can go a long way without a journaling file system if you have an
FTL but the overhead of metadata updating tends to make for an awful
lot of unnecessary garbage collection and block writing. Plus the FTL
can benefit from an optimization where the file system informs it of
deallocation of logical blocks, which helps it garbage collect.

Journaled filesystems are a better match to NAND hardware but only if
the file system understands and cooperates with the FTL's bad block
management.  The big win is when the journal is able to adapt its
write sizes to the good block count in an erase unit.