Subject: Re: MTD devices in NetBSD
To: Garrett D'Amore <email@example.com>
From: Terry Moore <firstname.lastname@example.org>
Date: 03/23/2006 14:59:37
My point was that to have a common layer, you have to design for
NAND, not for NOR, and that it's not something anyone can do casually.
Based on my experience, trying to couple this kind of detail into a
file system is a really bad idea. FTLs (the generic term in the
industry for "Flash Transfer Layers", the transfer layers that hide
the media from the file system) are much better. The commercial
market has come to this conclusion too; this is why CF cards don't
expose the flash to the host machine. In the early 90s, I helped
write the PCMCIA spec that introduced standards for all this, and
worked for a company that used both Microsoft's original FFS and then
M-Systems TFFS (which is really an FTL). Microsoft's original FFS
never worked well. The problem was that the FFS systems that knew
about the media details were much too complex, and were
unmaintainable as the media evolved. It is possible to get
everything (including performance and reliability) via an FTL; then
you can use existing file systems (FAT, UDF, etc). There really
aren't enough hours in the day to deal with all these details. I've
written file system and FTL code, and the thought of trying to test
all the possible interactions between the file system, FTL and memory
technology is daunting. Since the performance of the file system is
critical for system integrity and security, keeping things simple is
a really good idea. In addition to all their other properties, FTLs
have a really clean unit-test interface.
Somewhat off topic, "MTD" is the term of art that was invented by
PCMCIA to describe the low level drivers for memory access (SRAM
cards, EPROM cards, Flash cards). Five years from now something may
well replace "flash", but wear levelling and data integrity
considerations that are peculiar to non-rotating inexpensive media
are likely still to be an issue. I'd strongly suggest using "mtd"
rather than "flash" as the name of the bus, for this reason. If I
understood the earlier comments, Linux got this one right.
At 11:45 AM 3/23/2006 -0800, Garrett D'Amore wrote:
>I *think* the existence of
>the MTD framework in Linux is evidence that the notion that the
>abstractions have *something* in common is not totally insane.