Flash file system
Encyclopedia
A flash file system is a file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 designed for storing files
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 on flash memory
Flash memory
Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed. It was developed from EEPROM and must be erased in fairly large blocks before these can be rewritten with new data...

 devices. These are becoming more prevalent as the number of mobile devices is increasing, the cost per memory size decreases, and the capacity of flash memories increases.

While a block device layer can emulate a disk drive so that a disk file system can be used on a flash device, this is suboptimal for several reasons:
  • Erasing blocks: Flash memory blocks have to be explicitly erased before they can be written to. The time taken to erase blocks can be significant, thus it is beneficial to erase unused blocks while the device is idle.
  • Random access
    Random access
    In computer science, random access is the ability to access an element at an arbitrary position in a sequence in equal time, independent of sequence size. The position is arbitrary in the sense that it is unpredictable, thus the use of the term "random" in "random access"...

    : Disk file systems are optimized to avoid disk seeks whenever possible, due to the high cost of seeking. Flash memory devices impose no seek latency.
  • Wear leveling
    Wear leveling
    Wear leveling is a technique for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives and USB Flash drives...

    : Flash memory devices tend to wear out when a single block is repeatedly overwritten; flash file systems are designed to spread out writes evenly.


Log-structured file system
Log-structured file system
A log-structured filesystem is a file system design first proposed in 1988 by John K. Ousterhout and Fred Douglis. Designed for high write throughput, all updates to data and metadata are written sequentially to a continuous stream, called a log...

s have all the desirable properties for a flash file system. Such file systems include JFFS2
JFFS2
Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included in the Linux kernel since the 2.4.10 release. JFFS2 is also available for a couple of bootloaders like Das U-Boot, Open...

 and YAFFS
YAFFS
YAFFS was designed and written by Charles Manning, of Whitecliffs, New Zealand, for the company .Yaffs1 is the first version of this file system and works on NAND chips that have 512 byte pages + 16 byte spare areas. These older chips also generally allow 2 or 3 write cycles per page, which...

.

Because of the particular characteristics of flash memory, it is best used with either a controller
Flash memory controller
A flash memory controller manages the data stored on flash memory and communicates with a computer or electronic device. Flash memory controllers can be designed for operating in low duty-cycle environments like SD cards, CompactFlash cards, or other similar media for use in digital cameras, PDAs,...

 to perform wear leveling
Wear leveling
Wear leveling is a technique for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives and USB Flash drives...

 and error correction or specifically designed flash file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

s, which spread writes over the media and deal with the long erase times of NAND flash blocks. The basic concept behind flash file systems is: when the flash store is to be updated, the file system will write a new copy of the changed data over to a fresh block, remap the file pointers, then erase the old block later when it has time.

In practice, flash file systems are only used for "Memory Technology Device
Memory Technology Device
Memory technology devices are a new type of device file in Linux for interacting with flash memory. The MTD subsystem was created to provide an abstraction layer between the hardware-specific device drivers and higher-level applications...

s" ("MTD"), which are embedded flash memories that do not have a controller. Removable flash memory card
Memory card
A memory card or flash card is an electronic flash memory data storage device used for storing digital information. They are commonly used in many electronic devices, including digital cameras, mobile phones, laptop computers, MP3 players, and video game consoles...

s and USB flash drive
USB flash drive
A flash drive is a data storage device that consists of flash memory with an integrated Universal Serial Bus interface. flash drives are typically removable and rewritable, and physically much smaller than a floppy disk. Most weigh less than 30 g...

s have built-in controllers to manage MTD with dedicated algorithms, like wear leveling
Wear leveling
Wear leveling is a technique for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives and USB Flash drives...

, bad block recovery, power loss recovery, garbage collection and error correction, so use of a flash file system has limited benefit.

Examples

One of the earliest flash file systems was Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's FFS2, for use with MS-DOS
MS-DOS
MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

 in the early 1990s.

Around 1994, the PCMCIA, an industry group, approved the Flash Translation Layer (FTL) specification, which allowed a Linear Flash
Linear Flash
Linear Flash is a PC card flash memory format. Linear Flash requires no battery support, unlike somewhat faster SRAM, and features read/write speeds much faster than similar, less expensive ATA-type cards, which include CompactFlash and Memory Stick...

 device to look like a FAT
File Allocation Table
File Allocation Table is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras. FAT file systems are commonly found on floppy disks, flash memory cards, digital cameras, and many other portable devices because of...

 disk, but still have effective wear leveling
Wear leveling
Wear leveling is a technique for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives and USB Flash drives...

. Other commercial systems such as FlashFX and FlashFX Pro by Datalight
Datalight
Datalight is a privately held software company specializing in data management for embedded devices, particularly mobile phones. The company was founded in 1983 by Roy Sherrill, and is headquartered in Bothell, Washington.-Overview and history:...

 were created to avoid patent concerns with FTL.

JFFS/JFFS2/YAFFS

JFFS
JFFS
The Journaling Flash File System is a log-structured file system for use on NOR flash memory devices on the Linux operating system. It has been superseded by JFFS2.- Design :...

 was the first flash-specific file system for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, but it was quickly superseded by JFFS2
JFFS2
Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included in the Linux kernel since the 2.4.10 release. JFFS2 is also available for a couple of bootloaders like Das U-Boot, Open...

, originally developed for NOR flash. Then YAFFS
YAFFS
YAFFS was designed and written by Charles Manning, of Whitecliffs, New Zealand, for the company .Yaffs1 is the first version of this file system and works on NAND chips that have 512 byte pages + 16 byte spare areas. These older chips also generally allow 2 or 3 write cycles per page, which...

 was released in 2002, dealing specifically with NAND flash, and JFFS2
JFFS2
Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included in the Linux kernel since the 2.4.10 release. JFFS2 is also available for a couple of bootloaders like Das U-Boot, Open...

 was updated to support NAND flash too.

LogFS

LogFS
LogFS
LogFS is a Linux log-structured and scalable flash file system, intended for use on large devices of flash memory. It is written by Jörn Engel and in part sponsored by the CE Linux Forum....

, another Linux flash-specific file system, is currently being developed to address the scalability issues of JFFS2.

Then there are some susbsytems often called flash file systems but are more truthfully block drivers since they do not actually have a file system interface. These include:

TrueFFS

True flash file system or TrueFFS is a low level file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 designed to run on a raw Solid-state drive
Solid-state drive
A solid-state drive , sometimes called a solid-state disk or electronic disk, is a data storage device that uses solid-state memory to store persistent data with the intention of providing access in the same manner of a traditional block i/o hard disk drive...

 (most modern consumer SSDs are not raw). TrueFFS implements error correction, bad block re-mapping
Bad Sector
Bad Sector is an ambient/noise project formed in 1992 in Tuscany, Italy by Massimo Magrini. While working at the Computer Art Lab of ISTI in Pisa , he developed original gesture interfaces that he uses in live performances: 'Aerial Painting Hand' , 'UV-Stick' Bad Sector is an ambient/noise...

 and wear leveling
Wear leveling
Wear leveling is a technique for prolonging the service life of some kinds of erasable computer storage media, such as Flash memory used in solid-state drives and USB Flash drives...

. Externally, TrueFFS presents a normal hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 interface.

TrueFFS was created by M-Systems
M-Systems
M-Systems Ltd., was a Nasdaq-listed Israeli producer of Flash memory storage products founded in 1989 by Dov Moran and based in Kfar Sava, Israel. They were best known for developing and patenting the first flash drive, marketed in 1995 as DiskOnChip, and the first USB flash drive, marketed in...

 , on well-known "DiskOnChip 2000" product line, who were acquired by Sandisk
SanDisk
SanDisk Corporation is an American multinational corporation that designs, develops and manufactures data storage solutions in a range of form factors using the flash memory, controller and firmware technologies. It was founded in 1988 by Dr. Eli Harari and Sanjay Mehrotra, non-volatile memory...

 in 2006. A derivative of TrueFFS, called TFFS or TFFS-lite, is found in the VxWorks operating system, where it functions as a flash translation layer, not as a fully functional file system. A flash translation layer is used to adapt a fully functional file system to the constraints and restrictions imposed by flash memory devices.

ExtremeFFS

ExtremeFFS is a technology being developed by SanDisk
SanDisk
SanDisk Corporation is an American multinational corporation that designs, develops and manufactures data storage solutions in a range of form factors using the flash memory, controller and firmware technologies. It was founded in 1988 by Dr. Eli Harari and Sanjay Mehrotra, non-volatile memory...

 allowing for improved random write performance in flash memory compared to traditional systems such as TrueFFS. Sandisk claims that the technology improves random access speed in Solid-state drives by a factor of 100. The company plans on using ExtremeFFS in an upcoming Multi-level cell
Multi-level cell
In electronics, a multi-level cell is a memory element capable of storing more than a single bit of information.MLC NAND flash is a flash memory technology using multiple levels per cell to allow more bits to be stored using the same number of transistors...

 implementation of NAND flash memory.

See also

  • List of flash file systems

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK