Kconfig

CONFIG_EROFS_FS EROFS filesystem support

  • Off
  • Module
  • Built in

EROFS (Enhanced Read-Only File System) is a modern, lightweight, secure read-only filesystem for various use cases, such as immutable system images, container images, application sandboxes, and datasets.

EROFS uses a flexible, hierarchical on-disk design so that features can be enabled on demand: the core on-disk format is block-aligned in order to perform optimally on all kinds of devices, including block and memory-backed devices; the format is easy to parse and has zero metadata redundancy, unlike generic filesystems, making it ideal for filesystem auditing and remote access; inline data, random-access friendly directory data, inline/shared extended attributes and chunk-based deduplication ensure space efficiency while maintaining high performance.

Optionally, it supports multiple devices to reference external data, enabling data sharing for container images.

It also has advanced encoded on-disk layouts, particularly for data compression and fine-grained deduplication. It utilizes fixed-size output compression to improve storage density while keeping relatively high compression ratios. Furthermore, it implements in-place decompression to reuse file pages to keep compressed data temporarily with proper strategies, which ensures guaranteed end-to-end runtime performance under extreme memory pressure without extra cost.

For more details, see the web pages at <https://erofs.docs.kernel.org> and the documentation at <file:Documentation/filesystems/erofs.rst>.

To compile EROFS filesystem support as a module, choose M here. The module will be called erofs.

If unsure, say N.

If EROFS_FS

CONFIG_EROFS_FS_DEBUG EROFS debugging feature

On

Print debugging messages and enable more BUG_ONs which check filesystem consistency and find potential issues aggressively, which can be used for Android eng build, for example.

For daily use, say N.

If EROFS_FS_XATTR

CONFIG_EROFS_FS_SECURITY EROFS Security Labels

On

Security labels provide an access control facility to support Linux Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO Linux. This option enables an extended attribute handler for file security labels in the erofs filesystem, so that it requires enabling the extended attribute support in advance.

If you are not using a security module, say N.

CONFIG_EROFS_FS_BACKED_BY_FILE File-backed EROFS filesystem support

On

This allows EROFS to use filesystem image files directly, without the intercession of loopback block devices or likewise. It is particularly useful for container images with numerous blobs and other sandboxes, where loop devices behave intricately. It can also be used to simplify error-prone lifetime management of unnecessary virtual block devices.

If you don't want to enable this feature, say N.

CONFIG_EROFS_FS_ZIP EROFS Data Compression Support

On

Enable EROFS compression layouts so that filesystems containing compressed files can be parsed by the kernel.

If you don't want to enable compression feature, say N.

If EROFS_FS_ZIP

CONFIG_EROFS_FS_ZIP_LZMA EROFS LZMA compressed data support

On

Saying Y here includes support for reading EROFS file systems containing LZMA compressed data, specifically called microLZMA. It gives better compression ratios than the default LZ4 format, at the expense of more CPU overhead.

Say N if you want to disable LZMA compression support.

If EROFS_FS_ZIP_LZMA

CONFIG_EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS EROFS LZMA default maximum decompression streams

By default EROFS allocates one LZMA decompression stream per CPU. Each stream can hold a dictionary of up to 8 MiB taken from the mounted image, so on systems with many CPUs this can reserve a lot of memory. This caps the default; the lzma_streams module parameter still overrides it.

If unsure, keep the default of 16.

CONFIG_EROFS_FS_ZIP_DEFLATE EROFS DEFLATE compressed data support

On

Saying Y here includes support for reading EROFS file systems containing DEFLATE compressed data. It gives better compression ratios than the default LZ4 format, while it costs more CPU overhead.

If unsure, say N.

CONFIG_EROFS_FS_ZIP_ZSTD EROFS Zstandard compressed data support

On

Saying Y here includes support for reading EROFS file systems containing Zstandard compressed data. It gives better compression ratios than the default LZ4 format, while it costs more CPU overhead and memory footprint.

If unsure, say N.

CONFIG_EROFS_FS_ZIP_ACCEL EROFS hardware decompression support

On

Saying Y here includes hardware accelerator support for reading EROFS file systems containing compressed data. It gives better decompression speed than the software-implemented decompression, and it costs lower CPU overhead.

Hardware accelerator support is an experimental feature for now and file systems are still readable without selecting this option.

If unsure, say N.

CONFIG_EROFS_FS_PCPU_KTHREAD EROFS per-cpu decompression kthread workers

On

Saying Y here enables per-CPU kthread workers pool to carry out async decompression for low latencies on some architectures.

If unsure, say N.

If EROFS_FS_PCPU_KTHREAD