next up previous
Next: XIP and raw media Up: Filesystem selection Previous: Storage efficiency

JFFS2

JFFS (Journaling Flash File System), originally developed by AXIS Communication AB, is a log structured file-system derived from LFS (ref ??). The original implementation has some limitations, a heuristic strategy for locating the last log position which was not safe , inefficiencies with respect to the log-rotation (unmodified files got moved at a very high rate) and no support for hard-links (which is an irritation but not a real problem in most cases). JFFS also showd some instability when brutalized with power-fail cycles long enough. The basis laid in JFFS and the analysis of the deficits lead to the development of JFFS2 by RedHat Inc. (and is an ongoing project, maintained by David Woodhouse who also leads the MTD project). JFFS2 is a compressing file-system and thus most appropriate for systems with extremely small boot-media, also it has wear leveling implemented in software (log-rotation via the periodic garbage-collection task) which was optimized to reduce the necessary log-rotations by splitting the physical device into segments (JFFS operated on the entire device as one segment) which makes it well suited for NAND and NOR Flash types.

One of the important things to note about JFFS is that this file-system does not require any block-device on which to reside - it directly operates on the flash-device which not only improves the performance as there is no layer in between but also allows to take advantage of the linear address space (as opposed to block oriented devices like hard-disks) mapped to the flash-devices. This means that JFFS2 makes very good usage of the available resources as there is no fragmentation incurred due to block alignment like in traditional UNIX filesystems (e.g. ext2).

JFFS2 does have some overhead though, and this overhead for the garbage_collection it requires reserves five erase_blocks, so to give you a picture of an actual filesystem. the MiniRTL V3.0 filesystem will run in a 2048 KB device using jffs2 with an erase size of 128 KB, resulting in 640 KB reserved for garbage_collection. So although 640 KB or 2048 KB looks bad, you can actually run a jffs2 filesystem on top of mtdram.o and mtdblock.o with the neto RAM-image halved compared to a minix filesystem on a regular RAMDSIK.


next up previous
Next: XIP and raw media Up: Filesystem selection Previous: Storage efficiency
Der Herr Hofrat
2002-05-25