JFFS2 is a log-structured file system designed for raw flash storage in embedded systems.
It sits directly on Linux Memory Technology Device (MTD) flash rather than relying on a translation layer that makes flash behave like an ordinary disk. Raw flash has very different constraints: erase operations happen at block granularity, blocks have finite erase lifetimes, and NAND devices restrict repeated writes to a page.
JFFS2 is integrated into the Linux kernel and is suited to relatively modest NOR and NAND flash devices. It does not maintain an on-media index, so mounting requires a scan of the medium and memory consumption grows as the file system becomes larger. This makes it less scalable than UBIFS for large flash devices, but it remains useful in embedded systems.
This is free and open source software.
Key Features
- Uses a log-structured layout, writing file data and metadata as nodes rather than updating fixed locations in place.
- Tracks individual erase blocks so garbage collection can choose which blocks to reclaim instead of processing the medium in strict sequence.
- Provides on-the-fly compression to reduce the amount of flash storage consumed by file data.
- Includes wear-levelling behaviour that periodically relocates clean data so erase cycles are not concentrated on a small set of blocks.
- Stores cyclic redundancy checks with nodes to help detect corruption of stored structures and data.
- Supports directories, hard links, symbolic links, permissions, and timestamps.
- Handles obsolete nodes through garbage collection, recovering erase blocks for subsequent writes.
- Supports NAND-aware operation through the Linux MTD layer, including write buffering for NAND flash.
- Tolerates unclean shutdowns and power loss without requiring conventional filesystem checking.
- Allows filesystem images to be created with the mkfs.jffs2 utility supplied by the MTD user-space tools.
Website: sourceware.org/jffs2/
Support:
Developer: Red Hat
License: GNU General Public License v2.0 / Red Hat eCos Public License
Related Software
| Journaling File Systems | |
|---|---|
| ext4 | Evolved from ext3 adding many notable features including extents |
| XFS | Designed to maintain high performance with large files and file systems |
| Btrfs | Checksumming Copy on Write File system |
| F2FS | Flash file system initially developed by Samsung Electronics |
| OpenZFS | Advanced file system and volume manager originally developed for Solaris |
| GFS2 | Shared disk file system for Linux computer clusters |
| ext3 | Default file system for many popular Linux distributions |
| JFS | Journaled File System |
| UBIFS | File system for raw flash memory used through UBI volumes |
| OCFS2 | Extent-based cluster file system |
| Bcachefs | Advanced file system ejected from the mainline kernel |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.