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_LZMA_DEFAULT_MAX_STREAMS 135 int "EROFS LZMA default maximum decompression streams" 136 depends on EROFS_FS_ZIP_LZMA 137 range 1 NR_CPUS if SMP 138 range 1 1 if !SMP 139 default 16 140 help 141 By default EROFS allocates one LZMA decompression stream per CPU. 142 Each stream can hold a dictionary of up to 8 MiB taken from the 143 mounted image, so on systems with many CPUs this can reserve a lot 144 of memory. This caps the default; the lzma_streams module parameter 145 still overrides it. 146 147 If unsure, keep the default of 16. 148 149config EROFS_FS_ZIP_DEFLATE 150 bool "EROFS DEFLATE compressed data support" 151 depends on EROFS_FS_ZIP 152 help 153 Saying Y here includes support for reading EROFS file systems 154 containing DEFLATE compressed data. It gives better compression 155 ratios than the default LZ4 format, while it costs more CPU 156 overhead. 157 158 If unsure, say N. 159 160config EROFS_FS_ZIP_ZSTD 161 bool "EROFS Zstandard compressed data support" 162 depends on EROFS_FS_ZIP 163 help 164 Saying Y here includes support for reading EROFS file systems 165 containing Zstandard compressed data. It gives better compression 166 ratios than the default LZ4 format, while it costs more CPU 167 overhead and memory footprint. 168 169 If unsure, say N. 170 171config EROFS_FS_ZIP_ACCEL 172 bool "EROFS hardware decompression support" 173 depends on EROFS_FS_ZIP 174 help 175 Saying Y here includes hardware accelerator support for reading 176 EROFS file systems containing compressed data. It gives better 177 decompression speed than the software-implemented decompression, and 178 it costs lower CPU overhead. 179 180 Hardware accelerator support is an experimental feature for now and 181 file systems are still readable without selecting this option. 182 183 If unsure, say N. 184 185config EROFS_FS_PCPU_KTHREAD 186 bool "EROFS per-cpu decompression kthread workers" 187 depends on EROFS_FS_ZIP 188 help 189 Saying Y here enables per-CPU kthread workers pool to carry out 190 async decompression for low latencies on some architectures. 191 192 If unsure, say N. 193 194config EROFS_FS_PCPU_KTHREAD_HIPRI 195 bool "EROFS high priority per-CPU kthread workers" 196 depends on EROFS_FS_ZIP && EROFS_FS_PCPU_KTHREAD 197 default y 198 help 199 This permits EROFS to configure per-CPU kthread workers to run 200 at higher priority. 201 202 If unsure, say N. 203 204config EROFS_FS_PAGE_CACHE_SHARE 205 bool "EROFS page cache share support (experimental)" 206 depends on EROFS_FS && EROFS_FS_XATTR 207 select FS_STACK 208 help 209 This enables page cache sharing among inodes with identical 210 content fingerprints on the same machine. 211 212 If unsure, say N. 213