• Home
  • Raw
  • Download

Lines Matching +full:name +full:- +full:prefix

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
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 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.
139 device name (i.e., /sys/fs/erofs/sda).
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
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+).
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
243 each directory block is divided into index and name areas in order to support
245 alphabetical order in order to support improved prefix binary search
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.
278 Long extended attribute name prefixes
279 -------------------------------------
284 The long xattr name prefixes feature is introduced to address this issue. The
286 entry could also refer to user-specified long xattr name prefixes, e.g.
289 When referring to a long xattr name prefix, the highest bit (bit 7) of
290 erofs_xattr_entry.e_name_index is set, while the lower bits (bit 0-6) as a whole
291 represent the index of the referred long name prefix among all long name
292 prefixes. Therefore, only the trailing part of the name apart from the long
293 xattr name prefix is stored in erofs_xattr_entry.e_name, which could be empty if
294 the full xattr name matches exactly as its long xattr name prefix.
298 xattr_prefix_count (of the on-disk superblock) indicates the total number of
299 long xattr name prefixes, while (xattr_prefix_start * 4) indicates the start
300 offset of long name prefixes in the packed/meta inode. Note that, long extended
301 attribute name prefixes are disabled if xattr_prefix_count is 0.
303 Each long name prefix is stored in the format: ALIGN({__le16 len, data}, 4),
306 index of the predefined xattr name prefix, e.g. EROFS_XATTR_INDEX_TRUSTED for
307 "trusted.overlay." long name prefix, while the infix string keeps the string
308 after stripping the short prefix, e.g. "overlay." for the example above.
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
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
362 |<----- a big pcluster (with CBLKCNT) ------>|<-- -->|
363 a lcluster-sized pcluster (without CBLKCNT) ^
368 Since Linux v6.1, each pcluster can be used for multiple variable-sized extents,