Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

erofs: refine on-disk definition comments

Fix some outdated comments and typos, hopefully helpful.

Link: https://lore.kernel.org/r/20220506194612.117120-3-hsiangkao@linux.alibaba.com
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>

+21 -20
+21 -20
fs/erofs/erofs_fs.h
··· 58 58 __le16 root_nid; /* nid of root directory */ 59 59 __le64 inos; /* total valid ino # (== f_files - f_favail) */ 60 60 61 - __le64 build_time; /* inode v1 time derivation */ 62 - __le32 build_time_nsec; /* inode v1 time derivation in nano scale */ 61 + __le64 build_time; /* compact inode time derivation */ 62 + __le32 build_time_nsec; /* compact inode time derivation in ns scale */ 63 63 __le32 blocks; /* used for statfs */ 64 64 __le32 meta_blkaddr; /* start block address of metadata area */ 65 65 __le32 xattr_blkaddr; /* start block address of shared xattr area */ ··· 79 79 80 80 /* 81 81 * erofs inode datalayout (i_format in on-disk inode): 82 - * 0 - inode plain without inline data A: 82 + * 0 - uncompressed flat inode without tail-packing inline data: 83 83 * inode, [xattrs], ... | ... | no-holed data 84 - * 1 - inode VLE compression B (legacy): 85 - * inode, [xattrs], extents ... | ... 86 - * 2 - inode plain with inline data C: 87 - * inode, [xattrs], last_inline_data, ... | ... | no-holed data 88 - * 3 - inode compression D: 84 + * 1 - compressed inode with non-compact indexes: 85 + * inode, [xattrs], [map_header], extents ... | ... 86 + * 2 - uncompressed flat inode with tail-packing inline data: 87 + * inode, [xattrs], tailpacking data, ... | ... | no-holed data 88 + * 3 - compressed inode with compact indexes: 89 89 * inode, [xattrs], map_header, extents ... | ... 90 - * 4 - inode chunk-based E: 90 + * 4 - chunk-based inode with (optional) multi-device support: 91 91 * inode, [xattrs], chunk indexes ... | ... 92 92 * 5~7 - reserved 93 93 */ ··· 106 106 datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY; 107 107 } 108 108 109 - /* bit definitions of inode i_advise */ 109 + /* bit definitions of inode i_format */ 110 110 #define EROFS_I_VERSION_BITS 1 111 111 #define EROFS_I_DATALAYOUT_BITS 3 112 112 ··· 140 140 __le32 i_size; 141 141 __le32 i_reserved; 142 142 union { 143 - /* file total compressed blocks for data mapping 1 */ 143 + /* total compressed blocks for compressed inodes */ 144 144 __le32 compressed_blocks; 145 + /* block address for uncompressed flat inodes */ 145 146 __le32 raw_blkaddr; 146 147 147 148 /* for device files, used to indicate old/new device # */ ··· 157 156 __le32 i_reserved2; 158 157 }; 159 158 160 - /* 32 bytes on-disk inode */ 159 + /* 32-byte on-disk inode */ 161 160 #define EROFS_INODE_LAYOUT_COMPACT 0 162 - /* 64 bytes on-disk inode */ 161 + /* 64-byte on-disk inode */ 163 162 #define EROFS_INODE_LAYOUT_EXTENDED 1 164 163 165 164 /* 64-byte complete form of an ondisk inode */ ··· 172 171 __le16 i_reserved; 173 172 __le64 i_size; 174 173 union { 175 - /* file total compressed blocks for data mapping 1 */ 174 + /* total compressed blocks for compressed inodes */ 176 175 __le32 compressed_blocks; 176 + /* block address for uncompressed flat inodes */ 177 177 __le32 raw_blkaddr; 178 178 179 179 /* for device files, used to indicate old/new device # */ ··· 367 365 368 366 struct z_erofs_vle_decompressed_index { 369 367 __le16 di_advise; 370 - /* where to decompress in the head cluster */ 368 + /* where to decompress in the head lcluster */ 371 369 __le16 di_clusterofs; 372 370 373 371 union { 374 - /* for the head cluster */ 372 + /* for the HEAD lclusters */ 375 373 __le32 blkaddr; 376 374 /* 377 - * for the rest clusters 378 - * eg. for 4k page-sized cluster, maximum 4K*64k = 256M) 379 - * [0] - pointing to the head cluster 380 - * [1] - pointing to the tail cluster 375 + * for the NONHEAD lclusters 376 + * [0] - distance to its HEAD lcluster 377 + * [1] - distance to the next HEAD lcluster 381 378 */ 382 379 __le16 delta[2]; 383 380 } di_u;