This article needs additional citations for verification. (October 2009) |
This article is about an event or subject that may not be current but does not specify the time period. |
Developer(s) | Charles Manning |
---|---|
Full name | Yet Another Flash File System |
Other | |
Supported operating systems | Android, Firefox OS, Linux, Windows CE, pSOS, RTEMS, eCos, ThreadX, LCOS |
YAFFS (Yet Another Flash File System) is a file system designed and written by Charles Manning for the company Aleph One.
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). Work started in 2002, and it was first released later that year. The initial work was sponsored by Toby Churchill Ltd, and Brightstar Engineering.
These older chips also generally allow 2 or 3 write cycles per page.[1] YAFFS takes advantage of this: dirty pages are marked by writing to a specific spare area byte. Newer NAND flash chips have larger pages, first 2K pages (+ 64 bytes OOB), later 4K, with stricter write requirements. Each page within an erase block (128 kilobytes) must be written to in sequential order, and each page must be written only once.[citation needed]
Designing a storage system that enforces a "write once rule" ("write once property") has several advantages.[2]
YAFFS2 was designed to accommodate these newer chips. It was based on the YAFFS1 source code, with the major difference being that internal structures are not fixed to assume 512 byte sizing, and a block sequence number is placed on each written page. In this way older pages can be logically overwritten without violating the "write once" rule. It was released in late 2003.
YAFFS is a robust log-structured file system that holds data integrity as a high priority. A secondary YAFFS goal is high performance. YAFFS will typically outperform most alternatives.[3] It is also designed to be portable and has been used on Linux, WinCE, pSOS, RTEMS, eCos, ThreadX, and various special-purpose OSes. 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.
The YAFFS codebase is licensed both under the GPL and under per-product licenses available from Aleph One.
YAFFS is locked on a per-partition basis at a high level, allowing only one thread to write at any given time.[4]