Lines Matching +full:no +full:- +full:unaligned +full:- +full:direct +full:- +full:access
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
29 by using compact layout, transparent file compression and direct access,
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
46 - Two inode layouts for different requirements:
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
76 - Support merging tail-end data into a special inode as fragments.
78 - Support large folios for uncompressed files.
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
95 linux-erofs mailing list:
97 - linux-erofs mailing list <linux-erofs@lists.ozlabs.org>
103 (no)user_xattr Setup Extended User Attributes. Note: xattr is enabled
105 (no)acl Setup POSIX Access Control List. Note: acl is enabled
110 disabled In-place I/O decompression only;
113 in-place I/O decompression for the rest
117 It still does in-place I/O decompression
120 dax={always,never} Use direct access (no page cache). See
124 fsid=%s Specify a filesystem image ID for Fscache back-end.
135 (see also Documentation/ABI/testing/sysfs-fs-erofs)
137 On-disk details
141 -------
142 Different from other read-only file systems, an EROFS volume is designed
145 |-> aligned with the block size
164 |-> aligned with 8B
165 |-> followed closely
166 + meta_blkaddr blocks |-> another slot
170 |-> aligned with the inode slot size
177 .____________________________________________________|-> aligned with 4B
180 |-> 12 bytes <-|->x * 4 bytes<-| .
187 |-> aligned with 4B
188 |-> aligned with 4B
191 field which all inode versions have -- i_format::
207 0 flat file data without data inline (no extent);
208 1 fixed-sized output data compression (with non-compacted indexes);
209 2 flat file data with tail packing data inline (no extent);
210 3 fixed-sized output data compression (with compacted indexes, v5.3+);
211 4 chunk-based file (v5.15+).
229 |-> aligned by 4 bytes
230 + xattr_blkaddr blocks |-> aligned with 4 bytes
236 -----------
237 All directories are now organized in a compact on-disk format. Note that
248 / / | nameoff1 | nameoffN-1
251 |___.0___|____1___|_____|___N-1__|____0_____|____1_____|_____|___N-1____|
259 the total number of directory entries in this block since it is no need to
260 introduce another on-disk field at all.
262 Chunk-based files
263 -----------------
264 In order to support chunk-based data deduplication, a new inode data layout has
265 been supported since Linux v5.15: Files are split in equal-sized data chunks
267 data: these can be simply as a 4-byte block address array or in the 8-byte
271 By the way, chunk-based files are all uncompressed for now.
274 -------------------------------------
281 entry could also refer to user-specified long xattr name prefixes, e.g.
285 erofs_xattr_entry.e_name_index is set, while the lower bits (bit 0-6) as a whole
293 xattr_prefix_count (of the on-disk superblock) indicates the total number of
306 ----------------
307 EROFS implements fixed-sized output compression which generates fixed-sized
308 compressed data blocks from variable-sized input in contrast to other existing
309 fixed-sized input solutions. Relatively higher compression ratios can be gotten
310 by using fixed-sized output compression since nowadays popular data compression
311 algorithms are mostly LZ77-based and such fixed-sized output approach can be
314 In details, original (uncompressed) data is turned into several variable-sized
316 In order to record each variable-sized extent, logical clusters (lclusters) are
321 |<- variable-sized extent ->|<- VLE ->|
327 |-> lcluster <-|-> lcluster <-|-> lcluster <-|-> lcluster <-|
335 |-> big pcluster <-|-> pcluster <-|
338 which contains compressed data. Previously, only lcluster-sized (4KB) pclusters
357 |<----- a big pcluster (with CBLKCNT) ------>|<-- -->|
358 a lcluster-sized pcluster (without CBLKCNT) ^
360 If another HEAD follows a HEAD lcluster, there is no room to record CBLKCNT,
363 Since Linux v6.1, each pcluster can be used for multiple variable-sized extents,