Treatise on Formatting FLASH Storage Devices

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Wed Feb 4 09:52:44 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

david at lang.hm wrote:
> On Wed, 4 Feb 2009, Mitch Bradley wrote:
> 
>> http://wiki.laptop.org/go/How_to_Damage_a_FLASH_Storage_Device
>>
>> Read it and weep.
> 
> this completely ignores wear leveling, which is very nessasary for just 
> about any filesystem, but especially for FAT (which appear to be the only 
> filesystems this author is familiar with)

Umm, what?

"To alleviate the "wear out" problems, the FTL must move data around so
that repeated writes to a given sector don't cause too many writes to the
same NAND page."

Mitch is describing "FLASH" devices like SD cards.  All such devices have
a built-in microcontroller (the FTL) that performs wear-leveling.
Layering additional wear-leveling filesystems like JFFS2 or UBIFS on top
of the FTL requires a reverse translation (block device->MTD) and is not
recommended.  e.g.  From http://www.linux-mtd.infradead.org/doc/ubifs.html :

"UBIFS was designed to work on top of raw flash, which has nothing to do
with block devices. This is why UBIFS does not work on MMC cards and the
like - they look like block devices to the outside world because they
implement FTL (Flash Translation Layer) support in hardware, which simply
speaking emulates a block device"

As for the author only being familiar with FAT, that is hilarious.  Mitch
implemented JFFS2 support in OFW, and wrote this page to explain how he
produced optimal ext2 formatting of FTL FLASH.  Indeed, that is the
subject of
http://wiki.laptop.org/go/How_to_Damage_a_FLASH_Storage_Device#Screwed-Up_Formatting

- --Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmJq7wACgkQUJT6e6HFtqT4sACdH/YR07Eq+l+i2M53HuWlZbF3
6bYAn3Aw3X7+k+cThHg9elaI/Jjiokp/
=6lfi
-----END PGP SIGNATURE-----



More information about the Devel mailing list