JFFS2

JFFS2
Developer(s) David Woodhouse
Full name Journalling Flash File System version 2
Introduced with Linux 2.4.10
Features
Transparent compression zlib, rubin and rtime
Other
Supported operating systems Linux

Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices.[1] It is the successor to JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the Linux kernel mainline as part of the kernel version 2.4.10 release. JFFS2 is also available for a few bootloaders, like Das U-Boot, Open Firmware, the eCos RTOS and the RedBoot. Most prominent usage of the JFFS2 comes from OpenWrt.[2]

At least three file systems have been developed as JFFS2 replacements: LogFS, UBIFS, and YAFFS.

Features

JFFS2 introduced:

Design

As with JFFS, changes to files and directories are "logged" to flash in nodes, of which there are two types:

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.[3]

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).[3]

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.[3]

Disadvantages

Due to its log-structured design, JFFS2's disadvantages include the following:[3]

See also

External links

References

This article is issued from Wikipedia - version of the 7/4/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.