UBIFS

UBIFS (UBI File System, more fully Unsorted Block Image File System) is a successor to JFFS2, and competitor to LogFS,[1] as a file system for use with raw flash memory media.[2] Development began in earnest in 2007, with the first stable release made to Linux kernel 2.6.27 in October 2008.[3] The file system is developed by Nokia engineers with help of the University of Szeged, Hungary.

UBIFS works on top of an UBI (unsorted block image) device, which is itself on top of a memory technology device (MTD). MTDs are not to be used directly.[4] Two major differences between UBIFS and JFFS2 are that UBIFS supports write caching,[5] and UBIFS errs on the pessimistic side of free space calculation.[6] UBIFS tends to perform better than JFFS2 for large NAND FLASH devices.[7] This is a consequence of the UBIFS design goals:[8] faster mounting, quicker access to large files, and improved write speeds. UBIFS also preserves or improves upon JFFS2's on-the-fly compression, recoverability and power fail tolerance.[8] UBIFS's on-the-fly data compression allows zlib (deflate algorithm) or LZO.

JFFS2 stores filesystem indexes in memory whereas UBIFS stores indexes in flash.[9] This directly impacts the scalability of JFFS2 as the tables must be rebuilt every time the volume is mounted. Also, the JFFS2 tables may consume enough system RAM that some images may be unusable.

UBI

UBI (Unsorted Block Images)[10] is an erase block management layer for flash memory devices. UBI serves two purposes, tracking NAND flash bad blocks and providing wear leveling. Wear leveling spreads the erases and writes across the entire flash device. UBI presents logical erase blocks to higher layers and maps these to physical flash erase blocks. UBI was written specifically for UBIFS so that it does not have to deal with wear leveling and bad blocks. However, UBI may also be useful with squashfs and NAND flash; squashfs is not aware of NAND flash bad blocks.

UBI's documentation explains that it is not a complete flash translation layer (FTL). Although a FTL also handles bad blocks and wear leveling, the interface a FTL provides is a block device with small (typically 512 byte) sectors that can be written completely independently. In contrast, UBI's interface directly exposes erase blocks and programmable pages (which are different sizes, and much larger than typical block device sectors), and filesystems that use UBI must be aware of the sizes and restrictions on how blocks must be erased before being written.

Fastmap

UBI was augmented in Linux 3.7 with fastmap support.[11][12] Fastmap maintains an on-disk version of information previously created in memory by scanning the entire flash device. The code falls back to the previous mechanism of a full scan on failures and older UBI systems will simply ignore the fastmap information.

See also

External links

References

  1. ^ Jonathan Corbet (2008-04-02). "UBIFS". LWN.net. Retrieved 2016-12-18. 
  2. ^ "UBIFS - UBI File-System: Big red note". 2015-01-22. Retrieved 2016-12-18. It does not work on top of block devices. UBIFS was designed to work on top of raw flash. 
  3. ^ Artem Bityutskiy (2008-03-27). "UBIFS - new flash file system". Retrieved 2016-12-18. 
  4. ^ "UBIFS - UBI File-System: Overview". 2015-01-22. Retrieved 2016-12-18. 
  5. ^ "UBIFS - UBI File-System: Write-back support". 2015-01-22. Retrieved 2016-12-18. 
  6. ^ "UBIFS FAQ and HOWTO: Why does df report too little free space?". 2015-12-18. Retrieved 2016-12-18. 
  7. ^ "UBIFS - UBI File-System: Scalability". 2015-01-22. Retrieved 2016-12-18. 
  8. ^ a b Bityutskiy, Artem; Hunter, Adrian (2008-09-24). "UBIFS File System" (PDF). p. 9. 
  9. ^ Adrian Hunter (2008-03-27). "A Brief Introduction to the Design of UBIFS" (PDF). 
  10. ^ "UBI - Unsorted Block Images". 2015-01-22. Retrieved 2016-12-18. 
  11. ^ Thomas Petazzoni (2012-10-03). "UBI fastmap making its way to mainline". Archived from the original on 2012-11-15. Retrieved 2016-12-18. 
  12. ^ Richard Weinberger (2012-09-24). "UBI: Fastmap request for inclusion (v18)". Retrieved 2016-12-18.