encyclopegia.org

YAFFS

YAFFS (Yet Another Flash File System) is a file system designed and written by Charles Manning for the company Aleph One.[src] YAFFS1 was the first version of this file system and was designed for the then-current NAND chips with 512 byte page size (+ 16 byte spare (OOB; Out-Of-Band) area).[src] Work started in 2002, and it was first released later that year.[src] The initial work was sponsored by Toby Churchill Ltd, and Brightstar Engineering.[src] YAFFS is a robust log-structured file system that holds data integrity as a high priority.[src] A secondary YAFFS goal is high performance.[src] YAFFS will typically outperform most alternatives.[src] It is also designed to be portable and has been used on Linux, Android, WinCE, pSOS, RTEMS, eCos, ThreadX, and various special-purpose OSes.[src] A variant 'YAFFS/Direct' is used in situations where there is no OS, embedded OSes or bootloaders: it has the same core filesystem but simpler interfacing to both the higher and lower level code and the NAND flash hardware.[src] The YAFFS codebase is licensed both under the GPL and under per-product licenses available from Aleph One.[src] YAFFS is locked on a per-partition basis at a high level, allowing only one thread to write at any given time.[src]

YAFFS (Yet Another Flash File System) is a file system designed and written by Charles Manning for the company Aleph One.[src] YAFFS1 was the first version of this file system and was designed for the then-current NAND chips with 512 byte page size (+ 16 byte spare (OOB; Out-Of-Band) area).[src] Work started in 2002, and it was first released later that year.[src] The initial work was sponsored by Toby Churchill Ltd, and Brightstar Engineering.[src] YAFFS is a robust log-structured file system that holds data integrity as a high priority.[src] A secondary YAFFS goal is high performance.[src] YAFFS will typically outperform most alternatives.[src] It is also designed to be portable and has been used on Linux, Android, WinCE, pSOS, RTEMS, eCos, ThreadX, and various special-purpose OSes.[src] A variant 'YAFFS/Direct' is used in situations where there is no OS, embedded OSes or bootloaders: it has the same core filesystem but simpler interfacing to both the higher and lower level code and the NAND flash hardware.[src] The YAFFS codebase is licensed both under the GPL and under per-product licenses available from Aleph One.[src] YAFFS is locked on a per-partition basis at a high level, allowing only one thread to write at any given time.[src] ==YAFFS1== There is no special procedure to initialize a YAFFS filesystem beyond simply erasing the flash memory.[src] When a bad block is encountered, YAFFS follows the smart media scheme of marking the fifth byte of the block's spare area.[src] Blocks marked as such remain unallocated from then on.[src] To write file data, YAFFS initially writes a whole page (chunk in YAFFS terminology) that describes the file metadata, such as timestamps, name, path, etc.[src] The new file is assigned a unique object ID number; every data chunk within the file will contain this unique object ID within the spare area.[src] YAFFS maintains a tree structure in RAM of the physical location of these chunks.[src] When a chunk is no longer valid (the file is deleted, or parts of the file are overwritten), YAFFS marks a particular byte in the spare area of the chunk as 'dirty'.[src] When an entire block (32 pages) is marked as dirty, YAFFS can erase the block and reclaim the space.[src] When the filesystem's free space is low, YAFFS consolidates a group of good pages onto a new block.[src] YAFFS then reclaims the space used by dirty pages within each of the original blocks.[src] When a YAFFS system mounts a NAND flash device, it must visit each block to check for valid data by scanning its spare area.[src] With this information it then reconstitutes the memory-resident tree data structure.[src] ==YAFFS2== YAFFS2 is similar in concept to YAFFS1, and shares much of the same code; the YAFFS2 code base supports YAFFS1 data formats through backward compatibility.[src] The main difference is that YAFFS2 needs to jump through significant hoops to meet the "write once" requirement of modern NAND flash.[src] YAFFS2 marks every newly written block with a sequence number that is monotonically increasing.[src] The sequence of the chunks can be inferred from the block sequence number and the chunk offset within the block.[src] Thereby when YAFFS2 scans the flash and detects multiple chunks that have identical ObjectIDs and ChunkNumbers, it can choose which to use by taking the greatest sequence number.[src] For efficiency reasons YAFFS2 also introduces the concept of shrink headers.[src] For example, when a file is resized to a smaller size, YAFFS1 will mark all of the affected chunks as dirty – YAFFS2 cannot do this due to the "write once" rule.[src] YAFFS2 instead writes a "shrink header", which indicates that a certain number of pages before that point are invalid.[src] This lets YAFFS2 reconstruct the final state of the filesystem when the system reboots.[src] YAFFS2 uses a more abstract definition of the NAND flash allowing it to be used with a wider variety of flash parts with different geometries, bad block handling rules etc.[src] YAFFS2 later added support for checkpointing, which bypasses normal mount scanning, allowing very fast mount times.[src] Performance will vary, but mount times of 3 seconds for 2 GB have been reported.[src] ==See also== List of file systems JFFS JFFS2 UBIFS LogFS NILFS, a New Implementation of a Log-structured File System Open NAND Flash Interface Working Group ==References== http://www.yaffs.net/yaffs-history ==External links== Introducing YAFFS, the first NAND-specific flash file system Unyaffs: A simple program to unpack YAFFS2 images.[src] yaffs2utils: Utilities to create/extract a YAFFS2 image on Linux.[src]

48 sentences · 48 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"YAFFS." encyclopegia.org, 2026, https://encyclopegia.org/wiki/yaffs. Accessed 30 November 2026.

Chicago

"YAFFS." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/yaffs.

APA

encyclopegia.org. (2026). YAFFS. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/yaffs

Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1377875710 · 0.5 · snapshot enwiki-001377875710

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.