How YAFFS works: the internals

1 Purpose
2 What Is YAFFS?
3 Design and coding strategies
4 Terminology: YAFFS vs YAFFS1 vs YAFFS2
5 Objects
6 The YAFFS NAND Model
7 How YAFFS1 Stores Files
8 Garbage collection
9 YAFFS1 Serial numbers
10 YAFFS2 NAND model
10.1.YAFFS2 Extended tags
11 Bad block handling NAND error handling
12 RAM structures
12.1.yaffs_Object
12.2.ObjectId look­up
12.3.Directory structure
12.4.Hard links
12.5.Symbolic link and special object
12.6.File object
12.6.1 Tnode tree
13 How various mechanisms work
13.1.Block and Chunk Management
13.1.1 Block States
13.1.2 Block and Chunk Allocation
13.1.3 A word about wear leveling
13.1.4 yaffs_Tnode and yaffs_Object Management
13.2.Internal Cache
13.3.Scanning
13.3.1 YAFFS1 Scanning
13.3.2 YAFFS2 Scanning
13.4.Checkpoint
13.5.Extended Tags and Packed Tags
13.6.Inband tags
13.7.Soft Deletion


YAFFS
stands for Yet Another Flash File System, a term coined by Charles Manning in 2001 when suggesting that the already cluttered flash file system space could do with yet another offering – this time a flash file system designed from the ground up to work with NAND flash.

YAFFS is highly portable and has been used in many different products and applications as varied as sewing machines, point of sale, phones and aerospace. YAFFS has been used with multiple different operating systems. Native support is available for Linux, WindowsCE and eCOS while yaffs Direct Interface provides a layer that can be used in other applications such as RTOSs. YAFFS has been used with multiple different CPUs and compilers.
YAFFS has also been used as a NOR file system and even as a RAM file system.

This PDF contains details of data structures and strategies that YAFFS uses.

Back to top