xref: /linux/fs/erofs/Kconfig (revision dfc0f6373094dd88e1eaf76c44f2ff01b65db851)
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
6*74da24f0SGeert Uytterhoeven	select CACHEFILES if EROFS_FS_ONDEMAND
7b261d222SEric Biggers	select CRC32
8*74da24f0SGeert Uytterhoeven	select CRYPTO if EROFS_FS_ZIP_ACCEL
9*74da24f0SGeert Uytterhoeven	select CRYPTO_DEFLATE if EROFS_FS_ZIP_ACCEL
10a08e67a0SHuang Jianan	select FS_IOMAP
11*74da24f0SGeert Uytterhoeven	select LZ4_DECOMPRESS if EROFS_FS_ZIP
12*74da24f0SGeert Uytterhoeven	select NETFS_SUPPORT if EROFS_FS_ONDEMAND
13*74da24f0SGeert Uytterhoeven	select XXHASH if EROFS_FS_XATTR
14*74da24f0SGeert Uytterhoeven	select XZ_DEC if EROFS_FS_ZIP_LZMA
15*74da24f0SGeert Uytterhoeven	select XZ_DEC_MICROLZMA if EROFS_FS_ZIP_LZMA
16*74da24f0SGeert Uytterhoeven	select ZLIB_INFLATE if EROFS_FS_ZIP_DEFLATE
17*74da24f0SGeert Uytterhoeven	select ZSTD_DECOMPRESS if EROFS_FS_ZIP_ZSTD
1847e4937aSGao Xiang	help
19dfeab2e9SGao Xiang	  EROFS (Enhanced Read-Only File System) is a lightweight read-only
20dfeab2e9SGao Xiang	  file system with modern designs (e.g. no buffer heads, inline
21dfeab2e9SGao Xiang	  xattrs/data, chunk-based deduplication, multiple devices, etc.) for
22dfeab2e9SGao Xiang	  scenarios which need high-performance read-only solutions, e.g.
23dfeab2e9SGao Xiang	  smartphones with Android OS, LiveCDs and high-density hosts with
24dfeab2e9SGao Xiang	  numerous containers;
2547e4937aSGao Xiang
260f24e3c0SGao Xiang	  It also provides transparent compression and deduplication support to
270f24e3c0SGao Xiang	  improve storage density and maintain relatively high compression
280f24e3c0SGao Xiang	  ratios, and it implements in-place decompression to temporarily reuse
290f24e3c0SGao Xiang	  page cache for compressed data using proper strategies, which is
300f24e3c0SGao Xiang	  quite useful for ensuring guaranteed end-to-end runtime decompression
310f24e3c0SGao Xiang	  performance under extreme memory pressure without extra cost.
32dfeab2e9SGao Xiang
33dfeab2e9SGao Xiang	  See the documentation at <file:Documentation/filesystems/erofs.rst>
3462b241efSGao Xiang	  and the web pages at <https://erofs.docs.kernel.org> for more details.
3547e4937aSGao Xiang
3647e4937aSGao Xiang	  If unsure, say N.
3747e4937aSGao Xiang
3847e4937aSGao Xiangconfig EROFS_FS_DEBUG
3947e4937aSGao Xiang	bool "EROFS debugging feature"
4047e4937aSGao Xiang	depends on EROFS_FS
4147e4937aSGao Xiang	help
4247e4937aSGao Xiang	  Print debugging messages and enable more BUG_ONs which check
4347e4937aSGao Xiang	  filesystem consistency and find potential issues aggressively,
4447e4937aSGao Xiang	  which can be used for Android eng build, for example.
4547e4937aSGao Xiang
4647e4937aSGao Xiang	  For daily use, say N.
4747e4937aSGao Xiang
4847e4937aSGao Xiangconfig EROFS_FS_XATTR
4947e4937aSGao Xiang	bool "EROFS extended attributes"
5047e4937aSGao Xiang	depends on EROFS_FS
5147e4937aSGao Xiang	default y
5247e4937aSGao Xiang	help
5347e4937aSGao Xiang	  Extended attributes are name:value pairs associated with inodes by
5447e4937aSGao Xiang	  the kernel or by users (see the attr(5) manual page, or visit
5547e4937aSGao Xiang	  <http://acl.bestbits.at/> for details).
5647e4937aSGao Xiang
5747e4937aSGao Xiang	  If unsure, say N.
5847e4937aSGao Xiang
5947e4937aSGao Xiangconfig EROFS_FS_POSIX_ACL
6047e4937aSGao Xiang	bool "EROFS Access Control Lists"
6147e4937aSGao Xiang	depends on EROFS_FS_XATTR
6247e4937aSGao Xiang	select FS_POSIX_ACL
6347e4937aSGao Xiang	default y
6447e4937aSGao Xiang	help
6547e4937aSGao Xiang	  Posix Access Control Lists (ACLs) support permissions for users and
6647e4937aSGao Xiang	  groups beyond the owner/group/world scheme.
6747e4937aSGao Xiang
6847e4937aSGao Xiang	  To learn more about Access Control Lists, visit the POSIX ACLs for
6947e4937aSGao Xiang	  Linux website <http://acl.bestbits.at/>.
7047e4937aSGao Xiang
7147e4937aSGao Xiang	  If you don't know what Access Control Lists are, say N.
7247e4937aSGao Xiang
7347e4937aSGao Xiangconfig EROFS_FS_SECURITY
7447e4937aSGao Xiang	bool "EROFS Security Labels"
7547e4937aSGao Xiang	depends on EROFS_FS_XATTR
7647e4937aSGao Xiang	default y
7747e4937aSGao Xiang	help
7847e4937aSGao Xiang	  Security labels provide an access control facility to support Linux
7947e4937aSGao Xiang	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
8047e4937aSGao Xiang	  Linux. This option enables an extended attribute handler for file
8147e4937aSGao Xiang	  security labels in the erofs filesystem, so that it requires enabling
8247e4937aSGao Xiang	  the extended attribute support in advance.
8347e4937aSGao Xiang
8447e4937aSGao Xiang	  If you are not using a security module, say N.
8547e4937aSGao Xiang
86fb176750SGao Xiangconfig EROFS_FS_BACKED_BY_FILE
87fb176750SGao Xiang	bool "File-backed EROFS filesystem support"
88fb176750SGao Xiang	depends on EROFS_FS
89fb176750SGao Xiang	default y
90fb176750SGao Xiang	help
91fb176750SGao Xiang	  This allows EROFS to use filesystem image files directly, without
92fb176750SGao Xiang	  the intercession of loopback block devices or likewise. It is
93fb176750SGao Xiang	  particularly useful for container images with numerous blobs and
94fb176750SGao Xiang	  other sandboxes, where loop devices behave intricately.  It can also
95fb176750SGao Xiang	  be used to simplify error-prone lifetime management of unnecessary
96fb176750SGao Xiang	  virtual block devices.
97fb176750SGao Xiang
98fb176750SGao Xiang	  Note that this feature, along with ongoing fanotify pre-content
99fb176750SGao Xiang	  hooks, will eventually replace "EROFS over fscache."
100fb176750SGao Xiang
101fb176750SGao Xiang	  If you don't want to enable this feature, say N.
102fb176750SGao Xiang
10347e4937aSGao Xiangconfig EROFS_FS_ZIP
10447e4937aSGao Xiang	bool "EROFS Data Compression Support"
10547e4937aSGao Xiang	depends on EROFS_FS
10647e4937aSGao Xiang	default y
10747e4937aSGao Xiang	help
1080f24e3c0SGao Xiang	  Enable transparent compression support for EROFS file systems.
10947e4937aSGao Xiang
11047e4937aSGao Xiang	  If you don't want to enable compression feature, say N.
111622ceaddSGao Xiang
112622ceaddSGao Xiangconfig EROFS_FS_ZIP_LZMA
113622ceaddSGao Xiang	bool "EROFS LZMA compressed data support"
114622ceaddSGao Xiang	depends on EROFS_FS_ZIP
115622ceaddSGao Xiang	help
116622ceaddSGao Xiang	  Saying Y here includes support for reading EROFS file systems
117798eecaeSGao Xiang	  containing LZMA compressed data, specifically called microLZMA. It
118798eecaeSGao Xiang	  gives better compression ratios than the default LZ4 format, at the
119622ceaddSGao Xiang	  expense of more CPU overhead.
120622ceaddSGao Xiang
121622ceaddSGao Xiang	  If unsure, say N.
122c6be2bd0SJeffle Xu
123ffa09b3bSGao Xiangconfig EROFS_FS_ZIP_DEFLATE
124ffa09b3bSGao Xiang	bool "EROFS DEFLATE compressed data support"
125ffa09b3bSGao Xiang	depends on EROFS_FS_ZIP
126ffa09b3bSGao Xiang	help
127ffa09b3bSGao Xiang	  Saying Y here includes support for reading EROFS file systems
128ffa09b3bSGao Xiang	  containing DEFLATE compressed data.  It gives better compression
129ffa09b3bSGao Xiang	  ratios than the default LZ4 format, while it costs more CPU
130ffa09b3bSGao Xiang	  overhead.
131ffa09b3bSGao Xiang
132ffa09b3bSGao Xiang	  DEFLATE support is an experimental feature for now and so most
133ffa09b3bSGao Xiang	  file systems will be readable without selecting this option.
134ffa09b3bSGao Xiang
135ffa09b3bSGao Xiang	  If unsure, say N.
136ffa09b3bSGao Xiang
1377c35de4dSGao Xiangconfig EROFS_FS_ZIP_ZSTD
1387c35de4dSGao Xiang	bool "EROFS Zstandard compressed data support"
1397c35de4dSGao Xiang	depends on EROFS_FS_ZIP
1407c35de4dSGao Xiang	help
1417c35de4dSGao Xiang	  Saying Y here includes support for reading EROFS file systems
1427c35de4dSGao Xiang	  containing Zstandard compressed data.  It gives better compression
1437c35de4dSGao Xiang	  ratios than the default LZ4 format, while it costs more CPU
1447c35de4dSGao Xiang	  overhead.
1457c35de4dSGao Xiang
1467c35de4dSGao Xiang	  Zstandard support is an experimental feature for now and so most
1477c35de4dSGao Xiang	  file systems will be readable without selecting this option.
1487c35de4dSGao Xiang
1497c35de4dSGao Xiang	  If unsure, say N.
1507c35de4dSGao Xiang
151b4a29efcSBo Liuconfig EROFS_FS_ZIP_ACCEL
152b4a29efcSBo Liu	bool "EROFS hardware decompression support"
153b4a29efcSBo Liu	depends on EROFS_FS_ZIP
154b4a29efcSBo Liu	help
155b4a29efcSBo Liu	  Saying Y here includes hardware accelerator support for reading
156b4a29efcSBo Liu	  EROFS file systems containing compressed data.  It gives better
157b4a29efcSBo Liu	  decompression speed than the software-implemented decompression, and
158b4a29efcSBo Liu	  it costs lower CPU overhead.
159b4a29efcSBo Liu
160b4a29efcSBo Liu	  Hardware accelerator support is an experimental feature for now and
161b4a29efcSBo Liu	  file systems are still readable without selecting this option.
162b4a29efcSBo Liu
163b4a29efcSBo Liu	  If unsure, say N.
164b4a29efcSBo Liu
165c6be2bd0SJeffle Xuconfig EROFS_FS_ONDEMAND
1660d442ce0SGao Xiang	bool "EROFS fscache-based on-demand read support (deprecated)"
167915cd30cSDavid Howells	depends on EROFS_FS
168915cd30cSDavid Howells	select FSCACHE
169915cd30cSDavid Howells	select CACHEFILES_ONDEMAND
170c6be2bd0SJeffle Xu	help
171c6be2bd0SJeffle Xu	  This permits EROFS to use fscache-backed data blobs with on-demand
172c6be2bd0SJeffle Xu	  read support.
173c6be2bd0SJeffle Xu
1740d442ce0SGao Xiang	  It is now deprecated and scheduled to be removed from the kernel
1750d442ce0SGao Xiang	  after fanotify pre-content hooks are landed.
1760d442ce0SGao Xiang
177c6be2bd0SJeffle Xu	  If unsure, say N.
1783fffb589SSandeep Dhavale
1793fffb589SSandeep Dhavaleconfig EROFS_FS_PCPU_KTHREAD
1803fffb589SSandeep Dhavale	bool "EROFS per-cpu decompression kthread workers"
1813fffb589SSandeep Dhavale	depends on EROFS_FS_ZIP
1823fffb589SSandeep Dhavale	help
1833fffb589SSandeep Dhavale	  Saying Y here enables per-CPU kthread workers pool to carry out
1843fffb589SSandeep Dhavale	  async decompression for low latencies on some architectures.
1853fffb589SSandeep Dhavale
1863fffb589SSandeep Dhavale	  If unsure, say N.
1873fffb589SSandeep Dhavale
1883fffb589SSandeep Dhavaleconfig EROFS_FS_PCPU_KTHREAD_HIPRI
1893fffb589SSandeep Dhavale	bool "EROFS high priority per-CPU kthread workers"
1903fffb589SSandeep Dhavale	depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD
191cf7f2732SGao Xiang	default y
1923fffb589SSandeep Dhavale	help
1933fffb589SSandeep Dhavale	  This permits EROFS to configure per-CPU kthread workers to run
1943fffb589SSandeep Dhavale	  at higher priority.
1953fffb589SSandeep Dhavale
1963fffb589SSandeep Dhavale	  If unsure, say N.
197