EROFS
   HOME

TheInfoList



OR:

EROFS (Enhanced Read-Only File System) is a lightweight read-only
file system In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
initially developed by
Huawei Huawei Technologies Co., Ltd. ( ; ) is a Chinese multinational technology corporation headquartered in Shenzhen, Guangdong, China. It designs, develops, produces and sells telecommunications equipment, consumer electronics and various sma ...
for the Linux kernel. EROFS aims to form a generic read-only filesystem solution for various read-only use cases (embedded devices, containers and more) instead of just focusing on storage space saving without considering any side effects of runtime performance. For example, it provides a solution to save storage space by using transparent compression for scenarios which need high-performance read-only requirements on their devices with limited hardware resources, e.g. smartphones like Android and
HarmonyOS HarmonyOS (HMOS) () is a distributed operating system developed by Huawei to collaborate and interconnect with multiple smart devices on the Internet of Things (IoT) ecosystem. In its current multi-kernel design, the operating system select ...
. All of Huawei's new products shipped with
EMUI EMUI (formerly known as Emotion UI, and also known as Magic UI on Honor smartphones since 2019) is an Android-derived mobile operating system developed by Chinese technology company Huawei. It is used on the company's smartphones and tablets ...
9.0.1 or later used EROFS, and it was promoted as one of the key features of EMUI 9.1. OPPO and Xiaomi products also use EROFS. Also, it provides a content-addressable chunk-based container image solution together with lazy pulling feature to accelerate container startup speed by using new file-based fscache backend since
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 ...
v5.19. The file system was formally merged into the mainline kernel with
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 ...
v5.4.


Features

The file system has two different
inode The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attribut ...
on-disk layouts. One is compact, and the other is extended. *
Little-endian In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most si ...
on-disk design * 4 KB block size and 32-bit block address, which limits the total possible capacity of an EROFS filesystem to 16 TB. *
Metadata Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including: * Descriptive metadata – the descriptive ...
and
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
could be mixed by tail-packing inline data technology * Support
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
attributes and permissions, xattr and ACL * Fixed-output transparent compression with LZ4 for relative higher compression ratios * In-place decompression for higher sequential read * Big pcluster feature allowing up to 1 MiB big pclusters for better compression ratios since Linux 5.13. * Direct I/O, Direct Access (DAX) support, chunk-based data de-duplication for uncompressed files since Linux 5.15. * Multiple device support for multiple layer container images since Linux 5.16. * MicroLZMA algorithm support since Linux 5.16. * Ztailpacking support since Linux 5.17. * File-based Fscache backend support since Linux 5.19 with "on-demand mode".


See also

*
cramfs The compressed ROM/RAM file system (or cramfs) is a free (GPL'ed) read-only Linux file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems. Unlike a compressed image of a conventional f ...
*
ext4 ext4 (fourth extended filesystem) is a journaling file system for Linux, developed as the successor to ext3. ext4 was initially a series of backward-compatible extensions to ext3, many of them originally developed by Cluster File Systems for ...
- previously Huawei used this file system for its system partitions *
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 ...


References


External links

* * * - git.kernel.org * - git.kernel.org * - blog.sigma-star.at {{File systems Embedded Linux Compression file systems Free special-purpose file systems File systems supported by the Linux kernel Read-only file systems supported by the Linux kernel