147e4937aSGao Xiang# SPDX-License-Identifier: GPL-2.0-only 247e4937aSGao Xiang 347e4937aSGao Xiangconfig EROFS_FS 447e4937aSGao Xiang tristate "EROFS filesystem support" 547e4937aSGao Xiang depends on BLOCK 6b261d222SEric Biggers select CRC32 774da24f0SGeert Uytterhoeven select CRYPTO if EROFS_FS_ZIP_ACCEL 874da24f0SGeert Uytterhoeven select CRYPTO_DEFLATE if EROFS_FS_ZIP_ACCEL 9a08e67a0SHuang Jianan select FS_IOMAP 1074da24f0SGeert Uytterhoeven select LZ4_DECOMPRESS if EROFS_FS_ZIP 1174da24f0SGeert Uytterhoeven select XXHASH if EROFS_FS_XATTR 1274da24f0SGeert Uytterhoeven select XZ_DEC if EROFS_FS_ZIP_LZMA 1374da24f0SGeert Uytterhoeven select XZ_DEC_MICROLZMA if EROFS_FS_ZIP_LZMA 1474da24f0SGeert Uytterhoeven select ZLIB_INFLATE if EROFS_FS_ZIP_DEFLATE 1574da24f0SGeert Uytterhoeven select ZSTD_DECOMPRESS if EROFS_FS_ZIP_ZSTD 1647e4937aSGao Xiang help 17938c4184SGao Xiang EROFS (Enhanced Read-Only File System) is a modern, lightweight, 18938c4184SGao Xiang secure read-only filesystem for various use cases, such as immutable 19938c4184SGao Xiang system images, container images, application sandboxes, and datasets. 2047e4937aSGao Xiang 21938c4184SGao Xiang EROFS uses a flexible, hierarchical on-disk design so that features 22938c4184SGao Xiang can be enabled on demand: the core on-disk format is block-aligned in 23938c4184SGao Xiang order to perform optimally on all kinds of devices, including block 24938c4184SGao Xiang and memory-backed devices; the format is easy to parse and has zero 25938c4184SGao Xiang metadata redundancy, unlike generic filesystems, making it ideal for 26938c4184SGao Xiang filesystem auditing and remote access; inline data, random-access 27938c4184SGao Xiang friendly directory data, inline/shared extended attributes and 28938c4184SGao Xiang chunk-based deduplication ensure space efficiency while maintaining 29938c4184SGao Xiang high performance. 30938c4184SGao Xiang 31938c4184SGao Xiang Optionally, it supports multiple devices to reference external data, 32938c4184SGao Xiang enabling data sharing for container images. 33938c4184SGao Xiang 34938c4184SGao Xiang It also has advanced encoded on-disk layouts, particularly for data 35938c4184SGao Xiang compression and fine-grained deduplication. It utilizes fixed-size 36938c4184SGao Xiang output compression to improve storage density while keeping relatively 37938c4184SGao Xiang high compression ratios. Furthermore, it implements in-place 38938c4184SGao Xiang decompression to reuse file pages to keep compressed data temporarily 39938c4184SGao Xiang with proper strategies, which ensures guaranteed end-to-end runtime 400f24e3c0SGao Xiang performance under extreme memory pressure without extra cost. 41dfeab2e9SGao Xiang 42938c4184SGao Xiang For more details, see the web pages at <https://erofs.docs.kernel.org> 43938c4184SGao Xiang and the documentation at <file:Documentation/filesystems/erofs.rst>. 44938c4184SGao Xiang 45938c4184SGao Xiang To compile EROFS filesystem support as a module, choose M here. The 46938c4184SGao Xiang module will be called erofs. 4747e4937aSGao Xiang 4847e4937aSGao Xiang If unsure, say N. 4947e4937aSGao Xiang 5047e4937aSGao Xiangconfig EROFS_FS_DEBUG 5147e4937aSGao Xiang bool "EROFS debugging feature" 5247e4937aSGao Xiang depends on EROFS_FS 5347e4937aSGao Xiang help 5447e4937aSGao Xiang Print debugging messages and enable more BUG_ONs which check 5547e4937aSGao Xiang filesystem consistency and find potential issues aggressively, 5647e4937aSGao Xiang which can be used for Android eng build, for example. 5747e4937aSGao Xiang 5847e4937aSGao Xiang For daily use, say N. 5947e4937aSGao Xiang 6047e4937aSGao Xiangconfig EROFS_FS_XATTR 6147e4937aSGao Xiang bool "EROFS extended attributes" 6247e4937aSGao Xiang depends on EROFS_FS 6347e4937aSGao Xiang default y 6447e4937aSGao Xiang help 6547e4937aSGao Xiang Extended attributes are name:value pairs associated with inodes by 6647e4937aSGao Xiang the kernel or by users (see the attr(5) manual page, or visit 6747e4937aSGao Xiang <http://acl.bestbits.at/> for details). 6847e4937aSGao Xiang 6947e4937aSGao Xiang If unsure, say N. 7047e4937aSGao Xiang 7147e4937aSGao Xiangconfig EROFS_FS_POSIX_ACL 7247e4937aSGao Xiang bool "EROFS Access Control Lists" 7347e4937aSGao Xiang depends on EROFS_FS_XATTR 7447e4937aSGao Xiang select FS_POSIX_ACL 7547e4937aSGao Xiang default y 7647e4937aSGao Xiang help 7747e4937aSGao Xiang Posix Access Control Lists (ACLs) support permissions for users and 7847e4937aSGao Xiang groups beyond the owner/group/world scheme. 7947e4937aSGao Xiang 8047e4937aSGao Xiang To learn more about Access Control Lists, visit the POSIX ACLs for 8147e4937aSGao Xiang Linux website <http://acl.bestbits.at/>. 8247e4937aSGao Xiang 8347e4937aSGao Xiang If you don't know what Access Control Lists are, say N. 8447e4937aSGao Xiang 8547e4937aSGao Xiangconfig EROFS_FS_SECURITY 8647e4937aSGao Xiang bool "EROFS Security Labels" 8747e4937aSGao Xiang depends on EROFS_FS_XATTR 8847e4937aSGao Xiang default y 8947e4937aSGao Xiang help 9047e4937aSGao Xiang Security labels provide an access control facility to support Linux 9147e4937aSGao Xiang Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO 9247e4937aSGao Xiang Linux. This option enables an extended attribute handler for file 9347e4937aSGao Xiang security labels in the erofs filesystem, so that it requires enabling 9447e4937aSGao Xiang the extended attribute support in advance. 9547e4937aSGao Xiang 9647e4937aSGao Xiang If you are not using a security module, say N. 9747e4937aSGao Xiang 98fb176750SGao Xiangconfig EROFS_FS_BACKED_BY_FILE 99fb176750SGao Xiang bool "File-backed EROFS filesystem support" 100fb176750SGao Xiang depends on EROFS_FS 101fb176750SGao Xiang default y 102fb176750SGao Xiang help 103fb176750SGao Xiang This allows EROFS to use filesystem image files directly, without 104fb176750SGao Xiang the intercession of loopback block devices or likewise. It is 105fb176750SGao Xiang particularly useful for container images with numerous blobs and 106fb176750SGao Xiang other sandboxes, where loop devices behave intricately. It can also 107fb176750SGao Xiang be used to simplify error-prone lifetime management of unnecessary 108fb176750SGao Xiang virtual block devices. 109fb176750SGao Xiang 110fb176750SGao Xiang If you don't want to enable this feature, say N. 111fb176750SGao Xiang 11247e4937aSGao Xiangconfig EROFS_FS_ZIP 11347e4937aSGao Xiang bool "EROFS Data Compression Support" 11447e4937aSGao Xiang depends on EROFS_FS 11547e4937aSGao Xiang default y 11647e4937aSGao Xiang help 117938c4184SGao Xiang Enable EROFS compression layouts so that filesystems containing 118938c4184SGao Xiang compressed files can be parsed by the kernel. 11947e4937aSGao Xiang 12047e4937aSGao Xiang If you don't want to enable compression feature, say N. 121622ceaddSGao Xiang 122622ceaddSGao Xiangconfig EROFS_FS_ZIP_LZMA 123622ceaddSGao Xiang bool "EROFS LZMA compressed data support" 124622ceaddSGao Xiang depends on EROFS_FS_ZIP 1258f2fb72fSGao Xiang default y 126622ceaddSGao Xiang help 127622ceaddSGao Xiang Saying Y here includes support for reading EROFS file systems 128798eecaeSGao Xiang containing LZMA compressed data, specifically called microLZMA. It 129798eecaeSGao Xiang gives better compression ratios than the default LZ4 format, at the 130622ceaddSGao Xiang expense of more CPU overhead. 131622ceaddSGao Xiang 1328f2fb72fSGao Xiang Say N if you want to disable LZMA compression support. 133c6be2bd0SJeffle Xu 134c9b47e6bSMichael Bommaritoconfig EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS 135*ab74edaeSGeert Uytterhoeven int "EROFS LZMA default maximum decompression streams" if SMP 136c9b47e6bSMichael Bommarito depends on EROFS_FS_ZIP_LZMA 137a64d500bSGao Xiang range 1 NR_CPUS if SMP 138a64d500bSGao Xiang range 1 1 if !SMP 139*ab74edaeSGeert Uytterhoeven default 16 if SMP && NR_CPUS >= 16 140*ab74edaeSGeert Uytterhoeven default NR_CPUS if SMP 141*ab74edaeSGeert Uytterhoeven default 1 142c9b47e6bSMichael Bommarito help 143c9b47e6bSMichael Bommarito By default EROFS allocates one LZMA decompression stream per CPU. 144c9b47e6bSMichael Bommarito Each stream can hold a dictionary of up to 8 MiB taken from the 145c9b47e6bSMichael Bommarito mounted image, so on systems with many CPUs this can reserve a lot 146c9b47e6bSMichael Bommarito of memory. This caps the default; the lzma_streams module parameter 147c9b47e6bSMichael Bommarito still overrides it. 148c9b47e6bSMichael Bommarito 149*ab74edaeSGeert Uytterhoeven If unsure, keep the suggested default (16 or lower). 150c9b47e6bSMichael Bommarito 151ffa09b3bSGao Xiangconfig EROFS_FS_ZIP_DEFLATE 152ffa09b3bSGao Xiang bool "EROFS DEFLATE compressed data support" 153ffa09b3bSGao Xiang depends on EROFS_FS_ZIP 154ffa09b3bSGao Xiang help 155ffa09b3bSGao Xiang Saying Y here includes support for reading EROFS file systems 156ffa09b3bSGao Xiang containing DEFLATE compressed data. It gives better compression 157ffa09b3bSGao Xiang ratios than the default LZ4 format, while it costs more CPU 158ffa09b3bSGao Xiang overhead. 159ffa09b3bSGao Xiang 160ffa09b3bSGao Xiang If unsure, say N. 161ffa09b3bSGao Xiang 1627c35de4dSGao Xiangconfig EROFS_FS_ZIP_ZSTD 1637c35de4dSGao Xiang bool "EROFS Zstandard compressed data support" 1647c35de4dSGao Xiang depends on EROFS_FS_ZIP 1657c35de4dSGao Xiang help 1667c35de4dSGao Xiang Saying Y here includes support for reading EROFS file systems 1677c35de4dSGao Xiang containing Zstandard compressed data. It gives better compression 1687c35de4dSGao Xiang ratios than the default LZ4 format, while it costs more CPU 1698f2fb72fSGao Xiang overhead and memory footprint. 1707c35de4dSGao Xiang 1717c35de4dSGao Xiang If unsure, say N. 1727c35de4dSGao Xiang 173b4a29efcSBo Liuconfig EROFS_FS_ZIP_ACCEL 174b4a29efcSBo Liu bool "EROFS hardware decompression support" 175b4a29efcSBo Liu depends on EROFS_FS_ZIP 176b4a29efcSBo Liu help 177b4a29efcSBo Liu Saying Y here includes hardware accelerator support for reading 178b4a29efcSBo Liu EROFS file systems containing compressed data. It gives better 179b4a29efcSBo Liu decompression speed than the software-implemented decompression, and 180b4a29efcSBo Liu it costs lower CPU overhead. 181b4a29efcSBo Liu 182b4a29efcSBo Liu Hardware accelerator support is an experimental feature for now and 183b4a29efcSBo Liu file systems are still readable without selecting this option. 184b4a29efcSBo Liu 185b4a29efcSBo Liu If unsure, say N. 186b4a29efcSBo Liu 1873fffb589SSandeep Dhavaleconfig EROFS_FS_PCPU_KTHREAD 1883fffb589SSandeep Dhavale bool "EROFS per-cpu decompression kthread workers" 1893fffb589SSandeep Dhavale depends on EROFS_FS_ZIP 1903fffb589SSandeep Dhavale help 1913fffb589SSandeep Dhavale Saying Y here enables per-CPU kthread workers pool to carry out 1923fffb589SSandeep Dhavale async decompression for low latencies on some architectures. 1933fffb589SSandeep Dhavale 1943fffb589SSandeep Dhavale If unsure, say N. 1953fffb589SSandeep Dhavale 1963fffb589SSandeep Dhavaleconfig EROFS_FS_PCPU_KTHREAD_HIPRI 1973fffb589SSandeep Dhavale bool "EROFS high priority per-CPU kthread workers" 1983fffb589SSandeep Dhavale depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD 199cf7f2732SGao Xiang default y 2003fffb589SSandeep Dhavale help 2013fffb589SSandeep Dhavale This permits EROFS to configure per-CPU kthread workers to run 2023fffb589SSandeep Dhavale at higher priority. 2033fffb589SSandeep Dhavale 2043fffb589SSandeep Dhavale If unsure, say N. 205e0bf7d1cSHongzhen Luo 206e0bf7d1cSHongzhen Luoconfig EROFS_FS_PAGE_CACHE_SHARE 207e0bf7d1cSHongzhen Luo bool "EROFS page cache share support (experimental)" 208c37460cdSGao Xiang depends on EROFS_FS && EROFS_FS_XATTR 20996b2dbbeSGao Xiang select FS_STACK 210e0bf7d1cSHongzhen Luo help 211e0bf7d1cSHongzhen Luo This enables page cache sharing among inodes with identical 212e0bf7d1cSHongzhen Luo content fingerprints on the same machine. 213e0bf7d1cSHongzhen Luo 214e0bf7d1cSHongzhen Luo If unsure, say N. 215