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