Yet Another Flash File System (YAFFS) is a robust, log-structured file system designed specifically for NAND and NOR flash memory in embedded systems.
Log-structured flash file system designed from the ground up for NAND and NOR flash characteristics
First released in 2002, continuously developed and improved for over 20 years
Linux, VxWorks, eCos, Windows CE, or bare metal (no OS required)
NAND (SLC/MLC/TLC), NOR, parallel & serial (including SPI)
GNU GPL v2 (open source) or commercial license from Aleph One
Deployed in millions of devices from consumer electronics to satellites
YAFFS isn't a hard disk file system adapted for flash. It was designed specifically for flash memory characteristics:
Many file systems claim robustness—YAFFS proves it:
YAFFS understands embedded constraints:
Data is written sequentially as a log of changes to the file system. This provides several benefits:
Fast startup through intelligent state management:
Flash memory wears out—YAFFS manages this automatically:
NAND flash ships with bad blocks and develops more over time:
Multiple mechanisms ensure data integrity:
Reclaims space from deleted and overwritten data:
Works in virtually any embedded environment:
Your application can't tolerate data loss or corruption. YAFFS has 20+ years of field-proven reliability.
Your device needs to be ready quickly. YAFFS checkpoint system enables fast boot.
You don't have RAM to spare for file system overhead. YAFFS is optimized for embedded systems.
You want to see and understand the code. YAFFS is fully open source under GPL.
You want the option to get help from the people who created the filesystem.
Your product will be in the field for years. YAFFS has proven longevity (devices still running code from 2002).
| Consideration | YAFFS | JFFS2 | F2FS | FAT + FTL |
|---|---|---|---|---|
| Flash-Specific Design | ✅ Ground-up design | ✅ Flash-specific | ✅ Flash-specific | ❌ Disk FS + translation layer |
| Power-Fail Robustness | ✅ Extensively tested | ⚠️ Good, less tested | ⚠️ Good for modern use | ❌ FTL dependent |
| Boot Speed | ✅ Fast (checkpoints) | ⚠️ Can be slow | ✅ Fast | ✅ Fast |
| RAM Footprint | ✅ Low | ⚠️ Moderate | ⚠️ Higher | ✅ Low |
| Maturity | ✅ 20+ years | ✅ Mature | ⚠️ Newer (2012) | ✅ Very mature |
| Expert Support | ✅ Original developers | ⚠️ Community | ⚠️ Samsung/community | ❌ Vendor dependent |
| Bare Metal Support | ✅ YAFFS Direct | ❌ OS required | ❌ OS required | ✅ Often available |
For those interested in the internals, here's a brief overview:
Flash is organized in pages (unit of read/write). YAFFS calls these chunks for flexibility. Multiple chunks form a block (unit of erase).
Everything stored (files, directories) is an object. Each chunk has tags (metadata) identifying which object it belongs to and its position within that object.
All writes are sequential. When a file is modified, new chunks are written with current data. Old chunks are marked obsolete (for later garbage collection).
On boot, YAFFS can rebuild the filesystem state by scanning chunks and reading tags. Checkpoints speed this up by saving a snapshot of filesystem state.
Comprehensive guides for integration, configuration, and optimization.
Documentation