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