EROFS

Last updated
EROFS
Developer(s) Huawei originally, Alibaba Cloud, Bytedance, Coolpad, Google, OPPO
Full nameEnhanced Read-Only File System
IntroducedNovember 24, 2019 (2019-11-24) with Linux 5.4
Limits
Max volume size16 TiB
Max file size
  • 4 GiB (compact)
  • 16 EiB (extended, also limited by volume size) [1]
Max no. of filesDepends on volume size
Max filename length255 bytes
Features
Dates recordedFile change time (extended only) [1]
Date resolution1 ns
Attributes POSIX, Extended file attributes
File system
permissions
POSIX, ACL
Transparent
compression
Yes (LZ4; LZMA since 5.16; DEFLATE since 6.6) [1]
Data deduplication Yes (extent-based)
Other
Supported
operating systems
Linux

EROFS (Enhanced Read-Only File System) is a lightweight read-only file system initially developed by Huawei, originally for the Linux kernel and now maintained by an open-source community from all over the world.

Contents

EROFS aims to form a generic read-only file system 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. [1]

For example, it provides a solution to save storage space by using transparent compression as an option for scenarios that need high-performance read-only requirements on their devices with limited hardware resources, e.g. smartphones like Android and IoT operating systems such as HarmonyOS alongside its HarmonyOS NEXT core system iteration. [2] [3] All of Huawei's new products shipped with EMUI 9.0.1 or later used EROFS, [4] and it was promoted as one of the key features of EMUI 9.1. [5] Oppo, Xiaomi and some Samsung products also use EROFS. [6] [7]

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 v5.19. [8]

The file system was formally merged into the mainline kernel with Linux kernel v5.4. [9]

Features

The file system has two different inode on-disk layouts. One is compact, and the other is extended. [1]

See also

Related Research Articles

<span class="mw-page-title-main">7-Zip</span> Open-source file archiver

7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own archive format called 7z, but can read and write several others.

Reiser4 is a computer file system, successor to the ReiserFS file system, developed from scratch by Namesys and sponsored by DARPA as well as Linspire. Reiser4 was named after its former lead developer Hans Reiser. As of 2021, the Reiser4 patch set is still being maintained, but according to Phoronix, it is unlikely to be merged into mainline Linux without corporate backing.

vmlinux Executable file containing the Linux kernel

vmlinux is a statically linked executable file that contains the Linux kernel in one of the object file formats supported by Linux, which includes Executable and Linkable Format (ELF) and Common Object File Format (COFF). The vmlinux file might be required for kernel debugging, symbol table generation or other operations, but must be made bootable before being used as an operating system kernel by adding a multiboot header, bootsector and setup routines.

<span class="mw-page-title-main">Free and open-source graphics device driver</span> Software that controls computer-graphics hardware

A free and open-source graphics device driver is a software stack which controls computer-graphics hardware and supports graphics-rendering application programming interfaces (APIs) and is released under a free and open-source software license. Graphics device drivers are written for specific hardware to work within a specific operating system kernel and to support a range of APIs used by applications to access the graphics hardware. They may also control output to the display if the display driver is part of the graphics hardware. Most free and open-source graphics device drivers are developed by the Mesa project. The driver is made up of a compiler, a rendering API, and software which manages access to the graphics hardware.

In Linux systems, initrd is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

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 also the name of free software, licensed under the GPL, for accessing Squashfs filesystems.

<span class="mw-page-title-main">Phoronix Test Suite</span> Free and open-source benchmark software

Phoronix Test Suite (PTS) is a free and open-source benchmark software for Linux and other operating systems. The Phoronix Test Suite, developed by Michael Larabel and Matthew Tippett, has been endorsed by sites such as Linux.com, LinuxPlanet, and Softpedia.

HAMMER is a high-availability 64-bit file system developed by Matthew Dillon for DragonFly BSD using B+ trees. Its major features include infinite NFS-exportable snapshots, master–multislave operation, configurable history retention, fsckless-mount, and checksums to deal with data corruption. HAMMER also supports data block deduplication, meaning that identical data blocks will be stored only once on a file system. A successor, HAMMER2, was announced in 2011 and became the default in Dragonfly 5.2.

XZ Utils is a set of free software command-line lossless data compressors, including the programs lzma and xz, for Unix-like operating systems and, from version 5.0 onwards, Microsoft Windows. For compression/decompression the Lempel–Ziv–Markov chain algorithm (LZMA) is used. XZ Utils started as a Unix port of Igor Pavlov's LZMA-SDK that has been adapted to fit seamlessly into Unix environments and their usual structure and behavior.

lzip Data compression utility

lzip is a free, command-line tool for the compression of data; it employs the Lempel–Ziv–Markov chain algorithm (LZMA) with a user interface that is familiar to users of usual Unix compression tools, such as gzip and bzip2.

zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or as general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files and as a swap device. Initially, zram had only the latter function, hence the original name "compcache". Unlike swap, zram only uses 0.1% of the maximum size of the disk when not in use.

F2FS is a flash file system initially developed by Samsung Electronics for the Linux kernel.

LZ4 is a lossless data compression algorithm that is focused on compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes.

<span class="mw-page-title-main">AMDgpu (Linux kernel module)</span> AMD GPU driver for Linux

AMDgpu is an open source device driver for the Linux operating system developed by AMD to support its Radeon lineup of graphics cards (GPUs). It was announced in 2014 as the successor to the previous radeon device driver as part of AMD's new "unified" driver strategy, and was released on April 20, 2015.

Zstandard is a lossless data compression algorithm developed by Yann Collet at Facebook. Zstd is the corresponding reference implementation in C, released as open-source software on 31 August 2016.

<span class="mw-page-title-main">EMUI</span> Mobile operating system by Huawei

EMUI (formerly known as Emotion UI, and also known as MagicOS is a HarmonyOS/Android mobile operating system developed by Chinese technology company Huawei. It is used on the company's smartphones and tablet computers.

Bcachefs is a copy-on-write (COW) file system for Linux-based operating systems. Its primary developer, Kent Overstreet, first announced it in 2015, and it was added to the Linux kernel beginning with 6.7. It is intended to compete with the modern features of ZFS or Btrfs, and the speed and performance of ext4 or XFS.

<span class="mw-page-title-main">HarmonyOS</span> Distributed operating system by Huawei

HarmonyOS (HMOS) is a distributed operating system developed by Huawei for smartphones, tablets, smart TVs, smart watches, personal computers and other smart devices. It has a multikernel design with dual frameworks: the operating system selects suitable kernels from the abstraction layer in the case of devices that use diverse resources. The operating system was officially launched by Huawei in August 2019.

io_uring is a Linux kernel system call interface for storage device asynchronous I/O operations addressing performance issues with similar interfaces provided by functions like read /write or aio_read /aio_write etc. for operations on data accessed by file descriptors.

HarmonyOS NEXT is a proprietary distributed operating system and an iteration of HarmonyOS, developed by Huawei to support only HarmonyOS native apps. The operating system is primarily aimed at software and hardware developers that deal directly with Huawei. It does not include Android's AOSP core and is incompatible with Android applications.

References

  1. 1 2 3 4 5 6 7 8 9 10 11 12 13 Gao Xiang. "erofs.html". www.kernel.org. Retrieved 2022-08-04.
  2. Michael Larabel (2018-11-19). "There Is Finally A User-Space Utility To Make EROFS Linux File-Systems". Phoronix. Retrieved 2018-12-13.
  3. Xiang, Gao (2018-05-31). "erofs: introduce erofs file system". Linux kernel (Mailing list). Retrieved 2018-12-13.
  4. Xiang, Gao (2019-07-04). "erofs: promote erofs from staging". Linux kernel (Mailing list). Retrieved 2019-09-03.
  5. "EMUI 9.1, the Intelligent Android OS". HUAWEI Global. Huawei Technologies. Retrieved 2022-01-10.
  6. "Google's plan to use EROFS on Android". 20 May 2022. Retrieved 2022-08-04.
  7. "The Galaxy S23 might be Samsung's first Android device to use EROFS". 2023-02-07. Retrieved 2023-07-22.
  8. "The Evolution of the Nydus Image Acceleration". 6 June 2022. Retrieved 2022-08-04.
  9. corbet (2019-11-25). "The 5.4 kernel has been released". LWN.net. Retrieved 2019-12-01.
  10. Michael Larabel. "EROFS File-System Adding LZMA Compression Support Via New MicroLZMA". Phoronix. Retrieved 2022-01-10.
  11. Michael Larabel. "EROFS File-System Adding DEFLATE Compression Support". Phoronix. Retrieved 2023-09-03.
  12. "staging: erofs: introduce LZ4 decompression inplace" . Retrieved 2020-12-03.
  13. "staging: erofs: integrate decompression inplace" . Retrieved 2020-12-03.
  14. Michael Larabel. "EROFS Sends In "Big Pcluster" Support For Linux 5.13, Other Improvements". Phoronix. Retrieved 2021-07-11.
  15. "erofs: add big pcluster compression support" . Retrieved 2021-07-11.
  16. Michael Larabel. "XFS & EROFS File-Systems Have Big Changes For Linux 5.15". Phoronix. Retrieved 2021-11-02.
  17. "EROFS-Utils 1.5 Released With ZTailPacking, FSCK Extraction" . Retrieved 2022-08-04.
  18. Jonathan Corbet. "5.19 Merge window, part 1" . Retrieved 2022-08-04.
  19. Marius Nestor (31 July 2022). "Linux Kernel 5.19 Officially Released, Linus Torvalds Teases Linux 6.0 as Next Kernel Series" . Retrieved 2022-08-04.