EROFS

Read-only file system for Linux From Wikipedia, the free encyclopedia

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.

Full nameEnhanced Read-Only File System
IntroducedNovember 24, 2019 (2019-11-24) with Linux 5.4
Max volume size1 EiB since 6.15
Quick facts Developer(s), Full name ...
EROFS
Developer(s)Huawei originally, Alibaba Cloud, Bytedance, Coolpad, Google, OPPO, Red Hat, Shanghai Jiao Tong University, VIVO, Uniontech, South China University of Technology
Full nameEnhanced Read-Only File System
IntroducedNovember 24, 2019 (2019-11-24) with Linux 5.4
Limits
Max volume size1 EiB since 6.15
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
AttributesPOSIX, Extended file attributes
File system
permissions
POSIX, ACL
Transparent
compression
Yes (LZ4; LZMA since 5.16; DEFLATE since 6.6)[1]
Data deduplicationYes (extent-based)
Other
Supported
operating systems
Linux
Close

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 and file-backed mounts since v6.12.[8][9]

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

Features

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

  • Little-endian on-disk design[1]
  • 48-bit block addressing, which currently limits the total possible capacity of an EROFS filesystem to 1 EiB of 4 KiB block size.
  • Metadata and data can be mixed by design for on-disk flexibility together with tail-packing inline data technology[1]
  • Support POSIX attributes and permissions, extended file attributes and ACL[1]
  • Fixed-size output transparent compression with LZ4, MicroLZMA (since Linux 5.16[11]), zstd and/or DEFLATE (since Linux 6.6[12]) for relative higher compression ratios[1]
  • In-place decompression for higher sequential read [13][14]
  • Big pcluster feature allowing up to 1 MiB big pclusters for better compression ratios since Linux 5.13.[15][16]
  • Direct I/O, Direct Access (DAX) support, chunk-based data deduplication for uncompressed files since Linux 5.15.[1][17]
  • Multiple device support for multiple layer container images since Linux 5.16.[1]
  • Ztailpacking support since Linux 5.17.[18]
  • File-based Fscache backend support since Linux 5.19 with "on-demand mode".[19][20]
  • Rolling hash deduplicated data compression and fragment support since Linux 6.1. [1]

See also

References

Related Articles

Wikiwand AI