JFFS
   HOME

TheInfoList



OR:

The Journaling Flash File System (or JFFS) is a
log-structured file system A log-structured filesystem is a file system in which data and metadata are written sequentially to a circular buffer, called a log. The design was first proposed in 1988 by John K. Ousterhout and Fred Douglis and first implemented in 1992 by ...
for use on NOR
flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both us ...
devices on the
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
operating system. It has been superseded by
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 into the Linux kernel since September 23, 2001, when it was merged into th ...
.


Design

Flash memory (specifically NOR flash) must be erased prior to writing. The erase process has several limitations: * Erasing is very slow (typically 1–100 ms per erase block, which is 103–105 times slower than reading data from the same region). * It is only possible to erase flash in large segments (usually 64
KiB The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
or more), whereas it can be read or written in smaller blocks (often 512 bytes). * Flash memory can only be erased a limited number of times (typically 103–106) before it becomes worn out. These constraints combine to produce a profound asymmetry between patterns of read and write access to flash memory. In contrast, magnetic hard disk drives offer nearly symmetrical read and write access: read speed and write speed are nearly identical (as both are constrained by the rate at which the disk spins), it is possible to both read and write small blocks or sectors (typically 512 or 4096 bytes), and there is no practical limit to the number of times magnetic media can be written and rewritten. Traditional file systems, such as
ext2 The ext2 or second extended file system is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same pr ...
or
FAT In nutrition science, nutrition, biology, and chemistry, fat usually means any ester of fatty acids, or a mixture of such chemical compound, compounds, most commonly those that occur in living beings or in food. The term often refers spec ...
which were designed for use on magnetic media typically update their data structures in-place, with data structures like inodes and directories updated on-disk after every modification. This concentrated lack of wear-levelling makes conventional file systems unsuitable for read-write use on flash devices. JFFS enforces
wear levelling Wear leveling (also written as wear levelling) is a technique Wear leveling techniques for flash memory systems. for prolonging the service life of some kinds of erasable computer storage media, such as flash memory, which is used in solid-state dri ...
by treating the flash device as a circular log. All changes to files and directories are written to the tail of the log in ''nodes''. In each node, a header containing metadata is written first, followed by file data, if any. Nodes are chained together with offset pointers in the header. Nodes start out as ''valid'' and then become ''obsolete'' when a newer version of them is created. The free space remaining in the file system is the gap between the log's tail and its head. When this runs low, a
garbage collector A waste collector, also known as a garbageman, garbage collector, trashman (in the US), binman or (rarely) dustman (in the UK), is a person employed by a public or private enterprise to collect and dispose of municipal solid waste (refuse) and r ...
copies valid nodes from the head to the tail and skips obsolete ones, thus reclaiming space.


Disadvantages

* At mount time, the file system driver must read the entire inode chain and then keep it in memory. This can be very slow. Memory consumption of JFFS is also proportional to the number of files in the file system. * The circular log design means ''all'' data in the filesystem is re-written, regardless of whether it is static or not. This generates many unnecessary erase cycles and reduces the life of the flash medium.


See also

*
List of file systems The following lists identify, characterize, and link to more thorough information on Computer file systems. Many older operating systems support only their one "native" file system, which does not bear any name apart from the name of the operating ...
*
NILFS NILFS or NILFS2 (''New Implementation of a Log-structured File System'') is a log-structured file system implementation for the Linux kernel. It was developed by Nippon Telegraph and Telephone Corporation (NTT) CyberSpace Laboratories and a comm ...
*
UBIFS UBIFS (UBI File System, more fully Unsorted Block Image File System) is a flash file system for unmanaged flash memory devices. UBIFS works on top of an UBI (unsorted block image) layer, which is itself on top of a memory technology device (MT ...
*
YAFFS Yaffs (Yet Another Flash File System) is a file system designed and written by Charles Manning for the company Aleph One. Yaffs1 was the first version of this file system and was designed for the then-current NAND chips with 512 byte page size ( ...


References


Sources

*


External links


JFFS Homepage (no longer maintained)


{{Filesystem Flash file systems supported by the Linux kernel Year of introduction missing