EROFS

From HandWiki - Reading time: 5 min

Short description: File system
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. number 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 permissionsPOSIX, ACL
Transparent compressionYes (LZ4; LZMA since 5.16; DEFLATE since 6.6)[1]
Data deduplicationYes (extent-based)
Other
Supported operating systemsLinux

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

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 HarmonyOS.[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]

  • Little-endian on-disk design[1]
  • 32-bit block addressing, which currently limits the total possible capacity of an EROFS filesystem to 16 TiB of 4 KiB block size.[1]
  • 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[10]) and/or DEFLATE (since Linux 6.6[11]) for relative higher compression ratios[1]
  • In-place decompression for higher sequential read [12][13]
  • Big pcluster feature allowing up to 1 MiB big pclusters for better compression ratios since Linux 5.13.[14][15]
  • Direct I/O, Direct Access (DAX) support, chunk-based data de-duplication for uncompressed files since Linux 5.15.[1][16]
  • Multiple device support for multiple layer container images since Linux 5.16.[1]
  • Ztailpacking support since Linux 5.17.[17]
  • File-based Fscache backend support since Linux 5.19 with "on-demand mode".[18][19]
  • Rolling-hash deduplicated data compression and fragment support since Linux 6.1. [1]

See also

References

  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 Gao Xiang. "erofs.html". https://www.kernel.org/doc/html/v5.19/filesystems/erofs.html. 
  2. Michael Larabel (2018-11-19). "There Is Finally A User-Space Utility To Make EROFS Linux File-Systems". https://www.phoronix.com/scan.php?page=news_item&px=Linux-EROFS-User-Space. 
  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 Technologies. https://consumer.huawei.com/levant/emui-9-1/. 
  6. "Google's plan to use EROFS on Android". 20 May 2022. https://blog.esper.io/android-dessert-bites-25-erofs-in-android-13-47987123/. 
  7. "The Galaxy S23 might be Samsung's first Android device to use EROFS". 2023-02-07. https://www.realmicentral.com/2023/02/07/the-galaxy-s23-might-be-samsungs-first-android-device-to-use-erofs. 
  8. "The Evolution of the Nydus Image Acceleration". 6 June 2022. https://d7y.io/blog/2022/06/06/evolution-of-nydus/. 
  9. corbet (2019-11-25). "The 5.4 kernel has been released". https://lwn.net/Articles/805462/. 
  10. Michael Larabel. "EROFS File-System Adding LZMA Compression Support Via New MicroLZMA". https://www.phoronix.com/scan.php?page=news_item&px=EROFS-LZMA-Compression. 
  11. Michael Larabel. "EROFS File-System Adding DEFLATE Compression Support". https://www.phoronix.com/news/EROFS-DEFLATE-Coming. 
  12. "staging: erofs: introduce LZ4 decompression inplace". https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/staging?id=0ffd71bcc3a03ebb3551661a36052488369c4de9. 
  13. "staging: erofs: integrate decompression inplace". https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/staging?id=b6a76183dea8df67d5888493afe4181e260fad95. 
  14. Michael Larabel. "EROFS Sends In "Big Pcluster" Support For Linux 5.13, Other Improvements". https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.13-EROFS. 
  15. "erofs: add big pcluster compression support". https://lwn.net/Articles/851388/. 
  16. Michael Larabel. "XFS & EROFS File-Systems Have Big Changes For Linux 5.15". https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.15-XFS-EROFS. 
  17. "EROFS-Utils 1.5 Released With ZTailPacking, FSCK Extraction". https://www.phoronix.com/news/EROFS-Utils-1.5-Released. 
  18. Jonathan Corbet. "5.19 Merge window, part 1". https://lwn.net/Articles/896140/. 
  19. Marius Nestor (31 July 2022). "Linux Kernel 5.19 Officially Released, Linus Torvalds Teases Linux 6.0 as Next Kernel Series". https://9to5linux.com/linux-kernel-5-19-officially-released-this-is-whats-new. 

External links




Licensed under CC BY-SA 3.0 | Source: https://handwiki.org/wiki/EROFS
12 views | Status: cached on July 17 2024 15:05:47
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF