Lines Matching +full:fixed +full:- +full:size
1 .. SPDX-License-Identifier: GPL-2.0
4 EROFS - Enhanced Read-Only File System
10 EROFS filesystem stands for Enhanced Read-Only File System. It aims to form a
11 generic read-only filesystem solution for various read-only use cases instead
17 random-access friendly high-performance filesystem to get rid of unneeded I/O
18 amplification and memory-resident overhead compared to similar approaches.
22 - read-only storage media or
24 - part of a fully trusted read-only solution, which means it needs to be
25 immutable and bit-for-bit identical to the official golden image for
28 - hope to minimize extra storage space with guaranteed end-to-end performance
30 especially for those embedded devices with limited memory and high-density
35 - Little endian on-disk design;
37 - Block-based distribution and file-based distribution over fscache are
40 - Support multiple devices to refer to external blobs, which can be used
43 - 32-bit block addresses for each device, therefore 16TiB address space at
44 most with 4KiB block size for now;
46 - Two inode layouts for different requirements:
51 Inode metadata size 32 bytes 64 bytes
52 Max file size 4 GiB 16 EiB (also limited by max. vol size)
54 Per-inode timestamp no yes (64 + 32-bit timestamp)
59 - Support extended attributes as an option;
61 - Support a bloom filter that speeds up negative extended attribute lookups;
63 - Support POSIX.1e ACLs by using extended attributes;
65 - Support transparent data compression as an option:
66 LZ4, MicroLZMA and DEFLATE algorithms can be used on a per-file basis; In
70 - Support chunk-based data deduplication and rolling-hash compressed data
73 - Support tailpacking inline compared to byte-addressed unaligned metadata
74 or smaller block size alternatives;
76 - Support merging tail-end data into a special inode as fragments.
78 - Support large folios to make use of THPs (Transparent Hugepages);
80 - Support direct I/O on uncompressed files to avoid double caching for loop
83 - Support FSDAX on uncompressed images for secure containers and ramdisks in
86 - Support file-based on-demand loading with the Fscache infrastructure.
88 The following git tree provides the file system user-space tools under
89 development, such as a formatting tool (mkfs.erofs), an on-disk consistency &
92 - git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
96 - https://erofs.docs.kernel.org
99 linux-erofs mailing list:
101 - linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
114 disabled In-place I/O decompression only;
117 in-place I/O decompression for the rest
121 It still does in-place I/O decompression
128 fsid=%s Specify a filesystem image ID for Fscache back-end.
131 fsoffset=%llu Specify block-aligned filesystem offset for the primary device.
140 (see also Documentation/ABI/testing/sysfs-fs-erofs)
142 On-disk details
146 -------
147 Different from other read-only file systems, an EROFS volume is designed
150 |-> aligned with the block size
156 All data areas should be aligned with the block size, but metadata areas
161 Each valid inode should be aligned with an inode slot, which is a fixed
162 value (32 bytes) and designed to be kept in line with compact inode size.
169 |-> aligned with 8B
170 |-> followed closely
171 + meta_blkaddr blocks |-> another slot
175 |-> aligned with the inode slot size
182 .____________________________________________________|-> aligned with 4B
185 |-> 12 bytes <-|->x * 4 bytes<-| .
192 |-> aligned with 4B
193 |-> aligned with 4B
196 field which all inode versions have -- i_format::
213 1 fixed-sized output data compression (with non-compacted indexes);
215 3 fixed-sized output data compression (with compacted indexes, v5.3+);
216 4 chunk-based file (v5.15+).
219 The size of the optional xattrs is indicated by i_xattr_count in inode
234 |-> aligned by 4 bytes
235 + xattr_blkaddr blocks |-> aligned with 4 bytes
241 -----------
242 All directories are now organized in a compact on-disk format. Note that
253 / / | nameoff1 | nameoffN-1
256 |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____|
265 introduce another on-disk field at all.
267 Chunk-based files
268 -----------------
269 In order to support chunk-based data deduplication, a new inode data layout has
270 been supported since Linux v5.15: Files are split in equal-sized data chunks
272 data: these can be simply as a 4-byte block address array or in the 8-byte
276 By the way, chunk-based files are all uncompressed for now.
279 -------------------------------------
282 work inefficiently in both image size and runtime performance in such cases.
286 entry could also refer to user-specified long xattr name prefixes, e.g.
290 erofs_xattr_entry.e_name_index is set, while the lower bits (bit 0-6) as a whole
298 xattr_prefix_count (of the on-disk superblock) indicates the total number of
304 where len represents the total size of the data part. The data part is actually
311 ----------------
312 EROFS implements fixed-sized output compression which generates fixed-sized
313 compressed data blocks from variable-sized input in contrast to other existing
314 fixed-sized input solutions. Relatively higher compression ratios can be gotten
315 by using fixed-sized output compression since nowadays popular data compression
316 algorithms are mostly LZ77-based and such fixed-sized output approach can be
319 In details, original (uncompressed) data is turned into several variable-sized
321 In order to record each variable-sized extent, logical clusters (lclusters) are
324 fixed in block size, as illustrated below::
326 |<- variable-sized extent ->|<- VLE ->|
332 |-> lcluster <-|-> lcluster <-|-> lcluster <-|-> lcluster <-|
340 |-> big pcluster <-|-> pcluster <-|
343 which contains compressed data. Previously, only lcluster-sized (4KB) pclusters
345 Linux v5.13), pcluster can be a multiple of lcluster size.
354 If big pcluster is enabled, pcluster size in lclusters needs to be recorded as
362 |<----- a big pcluster (with CBLKCNT) ------>|<-- -->|
363 a lcluster-sized pcluster (without CBLKCNT) ^
366 but it's easy to know the size of such pcluster is 1 lcluster as well.
368 Since Linux v6.1, each pcluster can be used for multiple variable-sized extents,