xref: /linux/fs/erofs/Kconfig (revision c37460cd9b2fcb61ec66b7eb4fde737e65ec2a56)
1# SPDX-License-Identifier: GPL-2.0-only
2
3config EROFS_FS
4	tristate "EROFS filesystem support"
5	depends on BLOCK
6	select CRC32
7	select CRYPTO if EROFS_FS_ZIP_ACCEL
8	select CRYPTO_DEFLATE if EROFS_FS_ZIP_ACCEL
9	select FS_IOMAP
10	select LZ4_DECOMPRESS if EROFS_FS_ZIP
11	select XXHASH if EROFS_FS_XATTR
12	select XZ_DEC if EROFS_FS_ZIP_LZMA
13	select XZ_DEC_MICROLZMA if EROFS_FS_ZIP_LZMA
14	select ZLIB_INFLATE if EROFS_FS_ZIP_DEFLATE
15	select ZSTD_DECOMPRESS if EROFS_FS_ZIP_ZSTD
16	help
17	  EROFS (Enhanced Read-Only File System) is a modern, lightweight,
18	  secure read-only filesystem for various use cases, such as immutable
19	  system images, container images, application sandboxes, and datasets.
20
21	  EROFS uses a flexible, hierarchical on-disk design so that features
22	  can be enabled on demand: the core on-disk format is block-aligned in
23	  order to perform optimally on all kinds of devices, including block
24	  and memory-backed devices; the format is easy to parse and has zero
25	  metadata redundancy, unlike generic filesystems, making it ideal for
26	  filesystem auditing and remote access; inline data, random-access
27	  friendly directory data, inline/shared extended attributes and
28	  chunk-based deduplication ensure space efficiency while maintaining
29	  high performance.
30
31	  Optionally, it supports multiple devices to reference external data,
32	  enabling data sharing for container images.
33
34	  It also has advanced encoded on-disk layouts, particularly for data
35	  compression and fine-grained deduplication. It utilizes fixed-size
36	  output compression to improve storage density while keeping relatively
37	  high compression ratios. Furthermore, it implements in-place
38	  decompression to reuse file pages to keep compressed data temporarily
39	  with proper strategies, which ensures guaranteed end-to-end runtime
40	  performance under extreme memory pressure without extra cost.
41
42	  For more details, see the web pages at <https://erofs.docs.kernel.org>
43	  and the documentation at <file:Documentation/filesystems/erofs.rst>.
44
45	  To compile EROFS filesystem support as a module, choose M here. The
46	  module will be called erofs.
47
48	  If unsure, say N.
49
50config EROFS_FS_DEBUG
51	bool "EROFS debugging feature"
52	depends on EROFS_FS
53	help
54	  Print debugging messages and enable more BUG_ONs which check
55	  filesystem consistency and find potential issues aggressively,
56	  which can be used for Android eng build, for example.
57
58	  For daily use, say N.
59
60config EROFS_FS_XATTR
61	bool "EROFS extended attributes"
62	depends on EROFS_FS
63	default y
64	help
65	  Extended attributes are name:value pairs associated with inodes by
66	  the kernel or by users (see the attr(5) manual page, or visit
67	  <http://acl.bestbits.at/> for details).
68
69	  If unsure, say N.
70
71config EROFS_FS_POSIX_ACL
72	bool "EROFS Access Control Lists"
73	depends on EROFS_FS_XATTR
74	select FS_POSIX_ACL
75	default y
76	help
77	  Posix Access Control Lists (ACLs) support permissions for users and
78	  groups beyond the owner/group/world scheme.
79
80	  To learn more about Access Control Lists, visit the POSIX ACLs for
81	  Linux website <http://acl.bestbits.at/>.
82
83	  If you don't know what Access Control Lists are, say N.
84
85config EROFS_FS_SECURITY
86	bool "EROFS Security Labels"
87	depends on EROFS_FS_XATTR
88	default y
89	help
90	  Security labels provide an access control facility to support Linux
91	  Security Models (LSMs) accepted by AppArmor, SELinux, Smack and TOMOYO
92	  Linux. This option enables an extended attribute handler for file
93	  security labels in the erofs filesystem, so that it requires enabling
94	  the extended attribute support in advance.
95
96	  If you are not using a security module, say N.
97
98config EROFS_FS_BACKED_BY_FILE
99	bool "File-backed EROFS filesystem support"
100	depends on EROFS_FS
101	default y
102	help
103	  This allows EROFS to use filesystem image files directly, without
104	  the intercession of loopback block devices or likewise. It is
105	  particularly useful for container images with numerous blobs and
106	  other sandboxes, where loop devices behave intricately.  It can also
107	  be used to simplify error-prone lifetime management of unnecessary
108	  virtual block devices.
109
110	  If you don't want to enable this feature, say N.
111
112config EROFS_FS_ZIP
113	bool "EROFS Data Compression Support"
114	depends on EROFS_FS
115	default y
116	help
117	  Enable EROFS compression layouts so that filesystems containing
118	  compressed files can be parsed by the kernel.
119
120	  If you don't want to enable compression feature, say N.
121
122config EROFS_FS_ZIP_LZMA
123	bool "EROFS LZMA compressed data support"
124	depends on EROFS_FS_ZIP
125	default y
126	help
127	  Saying Y here includes support for reading EROFS file systems
128	  containing LZMA compressed data, specifically called microLZMA. It
129	  gives better compression ratios than the default LZ4 format, at the
130	  expense of more CPU overhead.
131
132	  Say N if you want to disable LZMA compression support.
133
134config EROFS_FS_ZIP_DEFLATE
135	bool "EROFS DEFLATE compressed data support"
136	depends on EROFS_FS_ZIP
137	help
138	  Saying Y here includes support for reading EROFS file systems
139	  containing DEFLATE compressed data.  It gives better compression
140	  ratios than the default LZ4 format, while it costs more CPU
141	  overhead.
142
143	  If unsure, say N.
144
145config EROFS_FS_ZIP_ZSTD
146	bool "EROFS Zstandard compressed data support"
147	depends on EROFS_FS_ZIP
148	help
149	  Saying Y here includes support for reading EROFS file systems
150	  containing Zstandard compressed data.  It gives better compression
151	  ratios than the default LZ4 format, while it costs more CPU
152	  overhead and memory footprint.
153
154	  If unsure, say N.
155
156config EROFS_FS_ZIP_ACCEL
157	bool "EROFS hardware decompression support"
158	depends on EROFS_FS_ZIP
159	help
160	  Saying Y here includes hardware accelerator support for reading
161	  EROFS file systems containing compressed data.  It gives better
162	  decompression speed than the software-implemented decompression, and
163	  it costs lower CPU overhead.
164
165	  Hardware accelerator support is an experimental feature for now and
166	  file systems are still readable without selecting this option.
167
168	  If unsure, say N.
169
170config EROFS_FS_PCPU_KTHREAD
171	bool "EROFS per-cpu decompression kthread workers"
172	depends on EROFS_FS_ZIP
173	help
174	  Saying Y here enables per-CPU kthread workers pool to carry out
175	  async decompression for low latencies on some architectures.
176
177	  If unsure, say N.
178
179config EROFS_FS_PCPU_KTHREAD_HIPRI
180	bool "EROFS high priority per-CPU kthread workers"
181	depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD
182	default y
183	help
184	  This permits EROFS to configure per-CPU kthread workers to run
185	  at higher priority.
186
187	  If unsure, say N.
188
189config EROFS_FS_PAGE_CACHE_SHARE
190	bool "EROFS page cache share support (experimental)"
191	depends on EROFS_FS && EROFS_FS_XATTR
192	help
193	  This enables page cache sharing among inodes with identical
194	  content fingerprints on the same machine.
195
196	  If unsure, say N.
197