HOME

TheInfoList



OR:

UBIFS (UBI File System, more fully Unsorted Block Image File System) is a
flash file system A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash ...
for unmanaged
flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both us ...
devices. UBIFS works on top of an UBI (unsorted block image) layer, which is itself on top of a memory technology device (MTD) layer. The file system is developed by Nokia engineers with help of the
University of Szeged , mottoeng = Truth. Bravery. Freedom. , established = , type = Public research university , founder = Emperor Franz Joseph I , affiliation = European University Association, Science Without Borders, Confucius Institute , budget = US$220 mi ...
, Hungary. Development began in earnest in 2007, with the first stable release made to
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ope ...
2.6.27 in October 2008. Two major differences between UBIFS and
JFFS2 Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the ...
are that UBIFS supports write caching, and UBIFS errs on the pessimistic side of free space calculation. UBIFS tends to perform better than JFFS2 for large
NAND flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both use ...
devices. This is a consequence of the UBIFS design goals: faster mounting, quicker access to large files, and improved write speeds. UBIFS also preserves or improves upon
JFFS2 Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the ...
's on-the-fly compression, recoverability and power fail tolerance. UBIFS's on-the-fly data compression allows
zlib zlib ( or "zeta-lib", ) is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also a ...
( deflate algorithm), LZO or
Zstandard Zstandard, commonly known by the name of its reference implementation zstd, is a lossless data compression algorithm developed by Yann Collet at Facebook. ''Zstd'' is the reference implementation in C. Version 1 of this implementation was re ...
. UBIFS stores indexes in flash whereas
JFFS2 Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the ...
stores filesystem indexes in memory. This directly impacts the scalability of
JFFS2 Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included into the Linux kernel since September 23, 2001, when it was merged into the ...
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) is an erase block management layer for
flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both us ...
devices. UBI serves two purposes, tracking
NAND flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both use ...
bad blocks and providing
wear leveling Wear leveling (also written as wear levelling) is a technique Wear leveling techniques for flash memory systems. for prolonging the service life of some kinds of erasable computer storage media, such as flash memory, which is used in solid-state d ...
. 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 erase blocks. UBI was written specifically for UBIFS so that UBIFS does not have to deal with wear leveling and bad blocks. However, UBI may also be useful with
squashfs Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is al ...
and NAND flash;
squashfs Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is al ...
is not aware of NAND flash bad blocks. UBI's documentation explains that it is not a complete
flash translation layer A flash memory controller (or flash controller) manages data stored on flash memory (usually NAND flash) and communicates with a computer or electronic device. Flash memory controllers can be designed for operating in low duty-cycle environments ...
(FTL). Although a FTL also handles bad blocks and wear leveling, the interface a FTL provides is a block device with small (typically 512 bytes) 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. UBI is in some ways analogous to a
Logical Volume Manager In computer storage, logical volume management or LVM provides a method of allocating space on mass-storage devices that is more flexible than conventional partitioning schemes to store volumes. In particular, a volume manager can concatenate ...
. In typical usage, rather than partitioning flash into fixed regions, a single UBI device spans the entire flash (except for perhaps a few pages in fixed locations reserved for the bootloader), and multiple volumes are created within the UBI device. This allows wear-leveling to be spread across the whole flash, even if some volumes are written more frequently than others. UBI volumes can be ''static'' (which contain a whole file or image written once and protected by CRC-32 by UBI) or ''dynamic'' (which contain a read-write filesystem that is responsible for its own data integrity). The only filesystem that directly supports UBI is UBIFS, but using gluebi it's possible to emulate a MTD device, which can then be used to run other flash filesystems like JFFS2 and YAFFS, and using ubiblk it's possible to emulate block devices, which can run common filesystems like Ext4.


Fastmap

UBI was augmented in Linux 3.7 with fastmap support. 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

*
List of file systems The following lists identify, characterize, and link to more thorough information on Computer file systems. Many older operating systems support only their one "native" file system, which does not bear any name apart from the name of the operating ...
*
Comparison of file systems The following tables compare general and technical information for a number of file systems. General information Limits Metadata Features File capabilities Block capabilities Note that in addition to the below table, blo ...


References


External links


Home page

University of Szeged: UBIFS

UBIFS experiments
on the
XO Laptop The OLPC XO (formerly known as $100 Laptop, Children's Machine, 2B1) is a low cost laptop computer intended to be distributed to children in developing countries around the world, to provide them with access to knowledge, and opportunities to ...
( One Laptop per Child)
UBIFS file system
{{DEFAULTSORT:Ubifs Embedded Linux Flash file systems supported by the Linux kernel Free special-purpose file systems