About YAFFS

Yet Another Flash File System (YAFFS) is a robust, log-structured file system designed specifically for NAND and NOR flash memory in embedded systems.

Quick Facts

What

Log-structured flash file system designed from the ground up for NAND and NOR flash characteristics

When

First released in 2002, continuously developed and improved for over 20 years

Where

Linux, VxWorks, eCos, Windows CE, or bare metal (no OS required)

Flash Types

NAND (SLC/MLC/TLC), NOR, parallel & serial (including SPI)

License

GNU GPL v2 (open source) or commercial license from Aleph One

Scale

Deployed in millions of devices from consumer electronics to satellites

What Makes YAFFS Different?

Designed for Flash from Day One

YAFFS isn't a hard disk file system adapted for flash. It was designed specifically for flash memory characteristics:

  • No Flash Translation Layer (FTL) needed
  • Log-structured architecture exploits flash strengths
  • Automatic wear leveling inherent in the design
  • Handles flash-specific issues like bad blocks, read disturb, write disturb

Power-Fail Resilient by Design

Many file systems claim robustness—YAFFS proves it:

  • Power loss treated as a normal event, not an exception
  • Tested through hundreds of millions of power-fail cycles
  • Checkpoint system enables fast, safe recovery
  • Data consistency guaranteed even with no warning

Optimized for Embedded Systems

YAFFS understands embedded constraints:

  • Low RAM footprint
  • Fast boot times (single-pass scanning with checkpoints)
  • Predictable performance
  • Portable code works across architectures and OSes

Key Technical Features

Log-Structured Architecture

Data is written sequentially as a log of changes to the file system. This provides several benefits:

  • Faster writes (no read-modify-write cycles for metadata)
  • Inherent wear leveling (sequential writes naturally distribute wear)
  • Superior robustness (power loss during write doesn't corrupt existing data)
  • No fragmentation penalty (flash has no seek time)

Checkpoint-Based Boot

Fast startup through intelligent state management:

  • Periodic checkpoints capture filesystem state
  • On boot, checkpoint provides fast recovery path
  • If checkpoint invalid, robust scanning rebuilds state
  • Single-pass scanning with block summaries for speed

Automatic Wear Leveling

Flash memory wears out—YAFFS manages this automatically:

  • Log structure inherently distributes writes
  • No hot spots or prematurely worn blocks
  • No over-provisioning required
  • Extends flash lifetime without complexity

Bad Block Handling

NAND flash ships with bad blocks and develops more over time:

  • Factory bad blocks automatically detected
  • Runtime bad block detection and marking
  • Transparent remapping—applications never see bad blocks
  • No complex bad block remapping tables needed

Error Correction & Flash Reliability

Multiple mechanisms ensure data integrity:

  • Works with hardware or software ECC
  • Block refreshing counters read/write disturb
  • Handles bit flips and flash degradation
  • Configurable for different reliability requirements

Efficient Garbage Collection

Reclaims space from deleted and overwritten data:

  • Background garbage collection during idle time
  • Aggressive collection when space is low
  • Minimizes write amplification
  • Pre-erases blocks so writes are always fast

Portability & Flexibility

Works in virtually any embedded environment:

  • Multiple OS support (Linux, VxWorks, eCos, Windows CE)
  • YAFFS Direct Interface for bare metal (no OS)
  • Configurable chunk sizes to match hardware
  • Endian neutral (works on any CPU architecture)
  • Tested on ARM, x86, MIPS, PowerPC, 68000, ColdFire, DSPs

When Should You Choose YAFFS?

✅ You Need Proven Reliability

Your application can't tolerate data loss or corruption. YAFFS has 20+ years of field-proven reliability.

✅ Boot Time Matters

Your device needs to be ready quickly. YAFFS checkpoint system enables fast boot.

✅ RAM is Constrained

You don't have RAM to spare for file system overhead. YAFFS is optimized for embedded systems.

✅ You Value Open Source

You want to see and understand the code. YAFFS is fully open source under GPL.

✅ Expert Support Matters

You want the option to get help from the people who created the filesystem.

✅ Long-Term Stability

Your product will be in the field for years. YAFFS has proven longevity (devices still running code from 2002).

YAFFS vs Alternatives

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

Read Detailed Comparison

How YAFFS Works (Simplified)

For those interested in the internals, here's a brief overview:

Chunks and Blocks

Flash is organized in pages (unit of read/write). YAFFS calls these chunks for flexibility. Multiple chunks form a block (unit of erase).

Objects and Tags

Everything stored (files, directories) is an object. Each chunk has tags (metadata) identifying which object it belongs to and its position within that object.

Log-Structured Writes

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).

Scanning and Checkpoints

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.

Read Full Technical Documentation

Ready to Use YAFFS?

Download YAFFS

Get the GPL version and start integrating into your project today.

Download

Read Documentation

Comprehensive guides for integration, configuration, and optimization.

Documentation

Need Expert Help?

Talk to the team that created YAFFS about your project.

Consult Us