JFFS2

JFFS2

Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use in 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 Open Firmware, the eCos RTOS and the RedBoot bootloader.

The new LogFS filesystem is aimed to replace JFFS2 for most uses, but focuses more on large devices.

Features

JFFS2 introduced:
* Support for NAND flash devices. This involved a considerable amount of work as NAND devices have a sequential I/O interface and cannot be memory-mapped for reading.
* Hard links. This was not possible in JFFS because of limitations in the on-disk format.
* Compression. Three algorithms are available: zlib, rubin and rtime.
* Better performance. JFFS treated the disk as a purely circular log. This generated a great deal of unnecessary I/O. The garbage collection algorithm in JFFS2 makes this mostly unnecessary.

Design

As with JFFS, changes to files and directories are "logged" to flash in "nodes", of which there are two types:
* "inodes": a header with file metadata, followed by a payload of file data (if any). Compressed payloads are limited to one page.
* "dirent" nodes: directory entries each holding a name and an inode number. Hard links are represented as different names with the same inode number. The special inode number 0 represents an unlink.As with JFFS, nodes start out as "valid" when they are created, and become "obsolete" when a newer version has been created elsewhere.

Unlike JFFS, however, there is no circular log. Instead, JFFS2 deals in "blocks", a unit the same size as the erase segment of the flash medium. Blocks are filled, one at a time, with nodes from bottom up. A "clean" block is one that contains only "valid" nodes. A "dirty" block contains at least one "obsolete" node. A "free" block contains no nodes.

The garbage collector runs in the background, turning "dirty" blocks into "free" blocks. It does this by copying "valid" nodes to a new block and skipping "obsolete" ones. That done, it erases the "dirty" block and tags it with a special marker designating it as a "free" block (to prevent confusion if power is lost during an erase operation).

To make wear-levelling more even and prevent erasures from being too concentrated on mostly-static file systems, the garbage collector will occasionally also consume "clean" blocks.

Disadvantages

* All nodes must still be scanned at mount time. This is slow and is becoming an increasingly serious problem as flash devices scale upward into the terabyte range.
* Writing many small blocks of data can even lead to negative compression rates, so it is essential for applications to use large write buffers.
* There is no practical way to tell how much usable free space is left on a device since this depends both on how well additional data can be compressed, and the writing sequence.

ee also

* List of file systems
* YAFFS

References

* Woodhouse, David. " [http://sources.redhat.com/jffs2/jffs2-html JFFS: The Journalling Flash File System] ".

External links

* [http://sources.redhat.com/jffs2/ Red Hat JFFS2 site]
* [http://sources.redhat.com/jffs2/jffs2.pdf JFFS: The Journalling Flash File System] by David Woodhouse
* [http://lists.infradead.org/pipermail/linux-mtd/ JFFS2 official mailing list]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • JFFS2 — (Journaling Flash File System version 2, журналируемая файловая система версии 2) структурированная файловая система, используемая в устройствах флеш памяти.[1] Является наследником JFFS. JFFS2 был включен в ядро Linux начиная с выхода версии 2.4 …   Википедия

  • Jffs2 — (Journaling Flash File System version 2, système de fichiers journalisé pour flash version 2) est un système de fichiers journalisé utilisé sur les systèmes à mémoire flash. Il succède à JFFS, et ne sera finalement pas remplacé par JFFS3 mais par …   Wikipédia en Français

  • JFFS2 — es un sistema de ficheros con soporte para transacciones especializado en memorias Flash, nace como sucesor de JFFS y será sucedido por JFFS3. Contenido 1 Características 1.1 Modificaciones respecto a JFFS 2 Desventajas …   Wikipedia Español

  • JFFS2 — (Journaling Flash File System version 2, système de fichiers journalisé pour flash version 2) est un système de fichiers journalisé utilisé sur les systèmes à mémoire flash. Il succède à JFFS, et ne sera finalement pas remplacé par JFFS3 mais par …   Wikipédia en Français

  • JFFS2 — es un sistema de ficheros con soporte para transacciones especializado en memorias Flash, nace como sucesor de JFFS y será sucedido por JFFS3 …   Enciclopedia Universal

  • JFFS2 — Ein Journaling Dateisystem ist ein Dateisystem, welches alle Änderungen vor dem eigentlichen Schreiben in einem dafür reservierten Speicherbereich, dem Journal, aufzeichnet. Damit ist es zu jedem Zeitpunkt möglich, einen konsistenten Zustand der… …   Deutsch Wikipedia

  • JFFS — The Journalling Flash File System (or JFFS) 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 Flash memory has access constraints very unlike those of… …   Wikipedia

  • Festkörperlaufwerk — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

  • Flash-Laufwerke — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

  • HHDD — Ein Solid State Drive (SSD, dt. Festkörperlaufwerk), auch Solid State Disk (dt. Festkörperplatte) genannt, ist ein Speichermedium, das wie eine herkömmliche Festplatte eingebaut und angesprochen werden kann, ohne eine rotierende Scheibe oder… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”