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

ext4, doc: remove unnecessary escaping

Signed-off-by: Wang Jianjian <wangjianjian3@huawei.com>
Link: https://lore.kernel.org/r/20220520022255.2120576-2-wangjianjian3@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Wang Jianjian and committed by
Theodore Ts'o
3103084a 48e02e61

+810 -810
+34 -34
Documentation/filesystems/ext4/attributes.rst
··· 13 13 14 14 There are two places where extended attributes can be found. The first 15 15 place is between the end of each inode entry and the beginning of the 16 - next inode entry. For example, if inode.i\_extra\_isize = 28 and 17 - sb.inode\_size = 256, then there are 256 - (128 + 28) = 100 bytes 16 + next inode entry. For example, if inode.i_extra_isize = 28 and 17 + sb.inode_size = 256, then there are 256 - (128 + 28) = 100 bytes 18 18 available for in-inode extended attribute storage. The second place 19 19 where extended attributes can be found is in the block pointed to by 20 20 ``inode.i_file_acl``. As of Linux 3.11, it is not possible for this ··· 38 38 - Name 39 39 - Description 40 40 * - 0x0 41 - - \_\_le32 42 - - h\_magic 41 + - __le32 42 + - h_magic 43 43 - Magic number for identification, 0xEA020000. This value is set by the 44 44 Linux driver, though e2fsprogs doesn't seem to check it(?) 45 45 ··· 55 55 - Name 56 56 - Description 57 57 * - 0x0 58 - - \_\_le32 59 - - h\_magic 58 + - __le32 59 + - h_magic 60 60 - Magic number for identification, 0xEA020000. 61 61 * - 0x4 62 - - \_\_le32 63 - - h\_refcount 62 + - __le32 63 + - h_refcount 64 64 - Reference count. 65 65 * - 0x8 66 - - \_\_le32 67 - - h\_blocks 66 + - __le32 67 + - h_blocks 68 68 - Number of disk blocks used. 69 69 * - 0xC 70 - - \_\_le32 71 - - h\_hash 70 + - __le32 71 + - h_hash 72 72 - Hash value of all attributes. 73 73 * - 0x10 74 - - \_\_le32 75 - - h\_checksum 74 + - __le32 75 + - h_checksum 76 76 - Checksum of the extended attribute block. 77 77 * - 0x14 78 - - \_\_u32 79 - - h\_reserved[3] 78 + - __u32 79 + - h_reserved[3] 80 80 - Zero. 81 81 82 82 The checksum is calculated against the FS UUID, the 64-bit block number ··· 100 100 - Name 101 101 - Description 102 102 * - 0x0 103 - - \_\_u8 104 - - e\_name\_len 103 + - __u8 104 + - e_name_len 105 105 - Length of name. 106 106 * - 0x1 107 - - \_\_u8 108 - - e\_name\_index 107 + - __u8 108 + - e_name_index 109 109 - Attribute name index. There is a discussion of this below. 110 110 * - 0x2 111 - - \_\_le16 112 - - e\_value\_offs 111 + - __le16 112 + - e_value_offs 113 113 - Location of this attribute's value on the disk block where it is stored. 114 114 Multiple attributes can share the same value. For an inode attribute 115 115 this value is relative to the start of the first entry; for a block this 116 116 value is relative to the start of the block (i.e. the header). 117 117 * - 0x4 118 - - \_\_le32 119 - - e\_value\_inum 118 + - __le32 119 + - e_value_inum 120 120 - The inode where the value is stored. Zero indicates the value is in the 121 121 same block as this entry. This field is only used if the 122 - INCOMPAT\_EA\_INODE feature is enabled. 122 + INCOMPAT_EA_INODE feature is enabled. 123 123 * - 0x8 124 - - \_\_le32 125 - - e\_value\_size 124 + - __le32 125 + - e_value_size 126 126 - Length of attribute value. 127 127 * - 0xC 128 - - \_\_le32 129 - - e\_hash 128 + - __le32 129 + - e_hash 130 130 - Hash value of attribute name and attribute value. The kernel doesn't 131 131 update the hash for in-inode attributes, so for that case this value 132 132 must be zero, because e2fsck validates any non-zero hash regardless of 133 133 where the xattr lives. 134 134 * - 0x10 135 135 - char 136 - - e\_name[e\_name\_len] 136 + - e_name[e_name_len] 137 137 - Attribute name. Does not include trailing NULL. 138 138 139 139 Attribute values can follow the end of the entry table. There appears to 140 140 be a requirement that they be aligned to 4-byte boundaries. The values 141 141 are stored starting at the end of the block and grow towards the 142 - xattr\_header/xattr\_entry table. When the two collide, the overflow is 142 + xattr_header/xattr_entry table. When the two collide, the overflow is 143 143 put into a separate disk block. If the disk block fills up, the 144 144 filesystem returns -ENOSPC. 145 145 ··· 167 167 * - 1 168 168 - “user.” 169 169 * - 2 170 - - “system.posix\_acl\_access” 170 + - “system.posix_acl_access” 171 171 * - 3 172 - - “system.posix\_acl\_default” 172 + - “system.posix_acl_default” 173 173 * - 4 174 174 - “trusted.” 175 175 * - 6 176 176 - “security.” 177 177 * - 7 178 - - “system.” (inline\_data only?) 178 + - “system.” (inline_data only?) 179 179 * - 8 180 180 - “system.richacl” (SuSE kernels only?) 181 181
+1 -1
Documentation/filesystems/ext4/bigalloc.rst
··· 23 23 also shrinking the amount of file system overhead for metadata. 24 24 25 25 The administrator can set a block cluster size at mkfs time (which is 26 - stored in the s\_log\_cluster\_size field in the superblock); from then 26 + stored in the s_log_cluster_size field in the superblock); from then 27 27 on, the block bitmaps track clusters, not individual blocks. This means 28 28 that block groups can be several gigabytes in size (instead of just 29 29 128MiB); however, the minimum allocation unit becomes a cluster, not a
+3 -3
Documentation/filesystems/ext4/bitmaps.rst
··· 9 9 The inode bitmap records which entries in the inode table are in use. 10 10 11 11 As with most bitmaps, one bit represents the usage status of one data 12 - block or inode table entry. This implies a block group size of 8 \* 13 - number\_of\_bytes\_in\_a\_logical\_block. 12 + block or inode table entry. This implies a block group size of 8 * 13 + number_of_bytes_in_a_logical_block. 14 14 15 15 NOTE: If ``BLOCK_UNINIT`` is set for a given block group, various parts 16 16 of the kernel and e2fsprogs code pretends that the block bitmap contains 17 17 zeros (i.e. all blocks in the group are free). However, it is not 18 18 necessarily the case that no blocks are in use -- if ``meta_bg`` is set, 19 19 the bitmaps and group descriptor live inside the group. Unfortunately, 20 - ext2fs\_test\_block\_bitmap2() will return '0' for those locations, 20 + ext2fs_test_block_bitmap2() will return '0' for those locations, 21 21 which produces confusing debugfs output. 22 22 23 23 Inode Table
+15 -15
Documentation/filesystems/ext4/blockgroup.rst
··· 56 56 present, will be at the beginning of the block group. The bitmaps and 57 57 the inode table can be anywhere, and it is quite possible for the 58 58 bitmaps to come after the inode table, or for both to be in different 59 - groups (flex\_bg). Leftover space is used for file data blocks, indirect 59 + groups (flex_bg). Leftover space is used for file data blocks, indirect 60 60 block maps, extent tree blocks, and extended attributes. 61 61 62 62 Flexible Block Groups 63 63 --------------------- 64 64 65 65 Starting in ext4, there is a new feature called flexible block groups 66 - (flex\_bg). In a flex\_bg, several block groups are tied together as one 66 + (flex_bg). In a flex_bg, several block groups are tied together as one 67 67 logical block group; the bitmap spaces and the inode table space in the 68 - first block group of the flex\_bg are expanded to include the bitmaps 69 - and inode tables of all other block groups in the flex\_bg. For example, 70 - if the flex\_bg size is 4, then group 0 will contain (in order) the 68 + first block group of the flex_bg are expanded to include the bitmaps 69 + and inode tables of all other block groups in the flex_bg. For example, 70 + if the flex_bg size is 4, then group 0 will contain (in order) the 71 71 superblock, group descriptors, data block bitmaps for groups 0-3, inode 72 72 bitmaps for groups 0-3, inode tables for groups 0-3, and the remaining 73 73 space in group 0 is for file data. The effect of this is to group the 74 74 block group metadata close together for faster loading, and to enable 75 75 large files to be continuous on disk. Backup copies of the superblock 76 76 and group descriptors are always at the beginning of block groups, even 77 - if flex\_bg is enabled. The number of block groups that make up a 78 - flex\_bg is given by 2 ^ ``sb.s_log_groups_per_flex``. 77 + if flex_bg is enabled. The number of block groups that make up a 78 + flex_bg is given by 2 ^ ``sb.s_log_groups_per_flex``. 79 79 80 80 Meta Block Groups 81 81 ----------------- 82 82 83 - Without the option META\_BG, for safety concerns, all block group 83 + Without the option META_BG, for safety concerns, all block group 84 84 descriptors copies are kept in the first block group. Given the default 85 85 128MiB(2^27 bytes) block group size and 64-byte group descriptors, ext4 86 86 can have at most 2^27/64 = 2^21 block groups. This limits the entire 87 87 filesystem size to 2^21 * 2^27 = 2^48bytes or 256TiB. 88 88 89 89 The solution to this problem is to use the metablock group feature 90 - (META\_BG), which is already in ext3 for all 2.6 releases. With the 91 - META\_BG feature, ext4 filesystems are partitioned into many metablock 90 + (META_BG), which is already in ext3 for all 2.6 releases. With the 91 + META_BG feature, ext4 filesystems are partitioned into many metablock 92 92 groups. Each metablock group is a cluster of block groups whose group 93 93 descriptor structures can be stored in a single disk block. For ext4 94 94 filesystems with 4 KB block size, a single metablock group partition ··· 110 110 a 1KB block size, and 128 block groups for filesystems with a 4KB 111 111 blocksize. Filesystems can either be created using this new block group 112 112 descriptor layout, or existing filesystems can be resized on-line, and 113 - the field s\_first\_meta\_bg in the superblock will indicate the first 113 + the field s_first_meta_bg in the superblock will indicate the first 114 114 block group using this new layout. 115 115 116 116 Please see an important note about ``BLOCK_UNINIT`` in the section about ··· 121 121 122 122 A new feature for ext4 are three block group descriptor flags that 123 123 enable mkfs to skip initializing other parts of the block group 124 - metadata. Specifically, the INODE\_UNINIT and BLOCK\_UNINIT flags mean 124 + metadata. Specifically, the INODE_UNINIT and BLOCK_UNINIT flags mean 125 125 that the inode and block bitmaps for that group can be calculated and 126 126 therefore the on-disk bitmap blocks are not initialized. This is 127 127 generally the case for an empty block group or a block group containing 128 - only fixed-location block group metadata. The INODE\_ZEROED flag means 128 + only fixed-location block group metadata. The INODE_ZEROED flag means 129 129 that the inode table has been initialized; mkfs will unset this flag and 130 130 rely on the kernel to initialize the inode tables in the background. 131 131 132 132 By not writing zeroes to the bitmaps and inode table, mkfs time is 133 - reduced considerably. Note the feature flag is RO\_COMPAT\_GDT\_CSUM, 134 - but the dumpe2fs output prints this as “uninit\_bg”. They are the same 133 + reduced considerably. Note the feature flag is RO_COMPAT_GDT_CSUM, 134 + but the dumpe2fs output prints this as “uninit_bg”. They are the same 135 135 thing.
+1 -1
Documentation/filesystems/ext4/blockmap.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 3 +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 4 - | i.i\_block Offset | Where It Points | 4 + | i.i_block Offset | Where It Points | 5 5 +=====================+==============================================================================================================================================================================================================================+ 6 6 | 0 to 11 | Direct map to file blocks 0 to 11. | 7 7 +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+13 -13
Documentation/filesystems/ext4/checksums.rst
··· 4 4 --------- 5 5 6 6 Starting in early 2012, metadata checksums were added to all major ext4 7 - and jbd2 data structures. The associated feature flag is metadata\_csum. 7 + and jbd2 data structures. The associated feature flag is metadata_csum. 8 8 The desired checksum algorithm is indicated in the superblock, though as 9 9 of October 2012 the only supported algorithm is crc32c. Some data 10 10 structures did not have space to fit a full 32-bit checksum, so only the ··· 20 20 checksum, it will request that you run ``e2fsck -D`` to have the 21 21 directories rebuilt with checksums. This has the added benefit of 22 22 removing slack space from the directory files and rebalancing the htree 23 - indexes. If you \_ignore\_ this step, your directories will not be 23 + indexes. If you _ignore_ this step, your directories will not be 24 24 protected by a checksum! 25 25 26 26 The following table describes the data elements that go into each type ··· 35 35 - Length 36 36 - Ingredients 37 37 * - Superblock 38 - - \_\_le32 38 + - __le32 39 39 - The entire superblock up to the checksum field. The UUID lives inside 40 40 the superblock. 41 41 * - MMP 42 - - \_\_le32 42 + - __le32 43 43 - UUID + the entire MMP block up to the checksum field. 44 44 * - Extended Attributes 45 - - \_\_le32 45 + - __le32 46 46 - UUID + the entire extended attribute block. The checksum field is set to 47 47 zero. 48 48 * - Directory Entries 49 - - \_\_le32 49 + - __le32 50 50 - UUID + inode number + inode generation + the directory block up to the 51 51 fake entry enclosing the checksum field. 52 52 * - HTREE Nodes 53 - - \_\_le32 53 + - __le32 54 54 - UUID + inode number + inode generation + all valid extents + HTREE tail. 55 55 The checksum field is set to zero. 56 56 * - Extents 57 - - \_\_le32 57 + - __le32 58 58 - UUID + inode number + inode generation + the entire extent block up to 59 59 the checksum field. 60 60 * - Bitmaps 61 - - \_\_le32 or \_\_le16 61 + - __le32 or __le16 62 62 - UUID + the entire bitmap. Checksums are stored in the group descriptor, 63 63 and truncated if the group descriptor size is 32 bytes (i.e. ^64bit) 64 64 * - Inodes 65 - - \_\_le32 65 + - __le32 66 66 - UUID + inode number + inode generation + the entire inode. The checksum 67 67 field is set to zero. Each inode has its own checksum. 68 68 * - Group Descriptors 69 - - \_\_le16 70 - - If metadata\_csum, then UUID + group number + the entire descriptor; 71 - else if gdt\_csum, then crc16(UUID + group number + the entire 69 + - __le16 70 + - If metadata_csum, then UUID + group number + the entire descriptor; 71 + else if gdt_csum, then crc16(UUID + group number + the entire 72 72 descriptor). In all cases, only the lower 16 bits are stored. 73 73
+83 -83
Documentation/filesystems/ext4/directory.rst
··· 42 42 - Name 43 43 - Description 44 44 * - 0x0 45 - - \_\_le32 45 + - __le32 46 46 - inode 47 47 - Number of the inode that this directory entry points to. 48 48 * - 0x4 49 - - \_\_le16 50 - - rec\_len 49 + - __le16 50 + - rec_len 51 51 - Length of this directory entry. Must be a multiple of 4. 52 52 * - 0x6 53 - - \_\_le16 54 - - name\_len 53 + - __le16 54 + - name_len 55 55 - Length of the file name. 56 56 * - 0x8 57 57 - char 58 - - name[EXT4\_NAME\_LEN] 58 + - name[EXT4_NAME_LEN] 59 59 - File name. 60 60 61 61 Since file names cannot be longer than 255 bytes, the new directory 62 - entry format shortens the name\_len field and uses the space for a file 62 + entry format shortens the name_len field and uses the space for a file 63 63 type flag, probably to avoid having to load every inode during directory 64 64 tree traversal. This format is ``ext4_dir_entry_2``, which is at most 65 65 263 bytes long, though on disk you'll need to reference ··· 74 74 - Name 75 75 - Description 76 76 * - 0x0 77 - - \_\_le32 77 + - __le32 78 78 - inode 79 79 - Number of the inode that this directory entry points to. 80 80 * - 0x4 81 - - \_\_le16 82 - - rec\_len 81 + - __le16 82 + - rec_len 83 83 - Length of this directory entry. 84 84 * - 0x6 85 - - \_\_u8 86 - - name\_len 85 + - __u8 86 + - name_len 87 87 - Length of the file name. 88 88 * - 0x7 89 - - \_\_u8 90 - - file\_type 89 + - __u8 90 + - file_type 91 91 - File type code, see ftype_ table below. 92 92 * - 0x8 93 93 - char 94 - - name[EXT4\_NAME\_LEN] 94 + - name[EXT4_NAME_LEN] 95 95 - File name. 96 96 97 97 .. _ftype: ··· 137 137 - Name 138 138 - Description 139 139 * - 0x0 140 - - \_\_le32 140 + - __le32 141 141 - hash 142 142 - The hash of the directory name 143 143 * - 0x4 144 - - \_\_le32 145 - - minor\_hash 144 + - __le32 145 + - minor_hash 146 146 - The minor hash of the directory name 147 147 148 148 149 149 In order to add checksums to these classic directory blocks, a phony 150 150 ``struct ext4_dir_entry`` is placed at the end of each leaf block to 151 151 hold the checksum. The directory entry is 12 bytes long. The inode 152 - number and name\_len fields are set to zero to fool old software into 152 + number and name_len fields are set to zero to fool old software into 153 153 ignoring an apparently empty directory entry, and the checksum is stored 154 154 in the place where the name normally goes. The structure is 155 155 ``struct ext4_dir_entry_tail``: ··· 163 163 - Name 164 164 - Description 165 165 * - 0x0 166 - - \_\_le32 167 - - det\_reserved\_zero1 166 + - __le32 167 + - det_reserved_zero1 168 168 - Inode number, which must be zero. 169 169 * - 0x4 170 - - \_\_le16 171 - - det\_rec\_len 170 + - __le16 171 + - det_rec_len 172 172 - Length of this directory entry, which must be 12. 173 173 * - 0x6 174 - - \_\_u8 175 - - det\_reserved\_zero2 174 + - __u8 175 + - det_reserved_zero2 176 176 - Length of the file name, which must be zero. 177 177 * - 0x7 178 - - \_\_u8 179 - - det\_reserved\_ft 178 + - __u8 179 + - det_reserved_ft 180 180 - File type, which must be 0xDE. 181 181 * - 0x8 182 - - \_\_le32 183 - - det\_checksum 182 + - __le32 183 + - det_checksum 184 184 - Directory leaf block checksum. 185 185 186 186 The leaf directory block checksum is calculated against the FS UUID, the ··· 194 194 A linear array of directory entries isn't great for performance, so a 195 195 new feature was added to ext3 to provide a faster (but peculiar) 196 196 balanced tree keyed off a hash of the directory entry name. If the 197 - EXT4\_INDEX\_FL (0x1000) flag is set in the inode, this directory uses a 197 + EXT4_INDEX_FL (0x1000) flag is set in the inode, this directory uses a 198 198 hashed btree (htree) to organize and find directory entries. For 199 199 backwards read-only compatibility with ext2, this tree is actually 200 200 hidden inside the directory file, masquerading as “empty” directory data ··· 206 206 The root of the tree always lives in the first data block of the 207 207 directory. By ext2 custom, the '.' and '..' entries must appear at the 208 208 beginning of this first block, so they are put here as two 209 - ``struct ext4_dir_entry_2``\ s and not stored in the tree. The rest of 209 + ``struct ext4_dir_entry_2`` s and not stored in the tree. The rest of 210 210 the root node contains metadata about the tree and finally a hash->block 211 211 map to find nodes that are lower in the htree. If 212 212 ``dx_root.info.indirect_levels`` is non-zero then the htree has two 213 213 levels; the data block pointed to by the root node's map is an interior 214 214 node, which is indexed by a minor hash. Interior nodes in this tree 215 215 contains a zeroed out ``struct ext4_dir_entry_2`` followed by a 216 - minor\_hash->block map to find leafe nodes. Leaf nodes contain a linear 216 + minor_hash->block map to find leafe nodes. Leaf nodes contain a linear 217 217 array of all ``struct ext4_dir_entry_2``; all of these entries 218 218 (presumably) hash to the same value. If there is an overflow, the 219 219 entries simply overflow into the next leaf node, and the ··· 245 245 - Name 246 246 - Description 247 247 * - 0x0 248 - - \_\_le32 248 + - __le32 249 249 - dot.inode 250 250 - inode number of this directory. 251 251 * - 0x4 252 - - \_\_le16 253 - - dot.rec\_len 252 + - __le16 253 + - dot.rec_len 254 254 - Length of this record, 12. 255 255 * - 0x6 256 256 - u8 257 - - dot.name\_len 257 + - dot.name_len 258 258 - Length of the name, 1. 259 259 * - 0x7 260 260 - u8 261 - - dot.file\_type 261 + - dot.file_type 262 262 - File type of this entry, 0x2 (directory) (if the feature flag is set). 263 263 * - 0x8 264 264 - char 265 265 - dot.name[4] 266 - - “.\\0\\0\\0” 266 + - “.\0\0\0” 267 267 * - 0xC 268 - - \_\_le32 268 + - __le32 269 269 - dotdot.inode 270 270 - inode number of parent directory. 271 271 * - 0x10 272 - - \_\_le16 273 - - dotdot.rec\_len 274 - - block\_size - 12. The record length is long enough to cover all htree 272 + - __le16 273 + - dotdot.rec_len 274 + - block_size - 12. The record length is long enough to cover all htree 275 275 data. 276 276 * - 0x12 277 277 - u8 278 - - dotdot.name\_len 278 + - dotdot.name_len 279 279 - Length of the name, 2. 280 280 * - 0x13 281 281 - u8 282 - - dotdot.file\_type 282 + - dotdot.file_type 283 283 - File type of this entry, 0x2 (directory) (if the feature flag is set). 284 284 * - 0x14 285 285 - char 286 - - dotdot\_name[4] 287 - - “..\\0\\0” 286 + - dotdot_name[4] 287 + - “..\0\0” 288 288 * - 0x18 289 - - \_\_le32 290 - - struct dx\_root\_info.reserved\_zero 289 + - __le32 290 + - struct dx_root_info.reserved_zero 291 291 - Zero. 292 292 * - 0x1C 293 293 - u8 294 - - struct dx\_root\_info.hash\_version 294 + - struct dx_root_info.hash_version 295 295 - Hash type, see dirhash_ table below. 296 296 * - 0x1D 297 297 - u8 298 - - struct dx\_root\_info.info\_length 298 + - struct dx_root_info.info_length 299 299 - Length of the tree information, 0x8. 300 300 * - 0x1E 301 301 - u8 302 - - struct dx\_root\_info.indirect\_levels 303 - - Depth of the htree. Cannot be larger than 3 if the INCOMPAT\_LARGEDIR 302 + - struct dx_root_info.indirect_levels 303 + - Depth of the htree. Cannot be larger than 3 if the INCOMPAT_LARGEDIR 304 304 feature is set; cannot be larger than 2 otherwise. 305 305 * - 0x1F 306 306 - u8 307 - - struct dx\_root\_info.unused\_flags 307 + - struct dx_root_info.unused_flags 308 308 - 309 309 * - 0x20 310 - - \_\_le16 310 + - __le16 311 311 - limit 312 - - Maximum number of dx\_entries that can follow this header, plus 1 for 312 + - Maximum number of dx_entries that can follow this header, plus 1 for 313 313 the header itself. 314 314 * - 0x22 315 - - \_\_le16 315 + - __le16 316 316 - count 317 - - Actual number of dx\_entries that follow this header, plus 1 for the 317 + - Actual number of dx_entries that follow this header, plus 1 for the 318 318 header itself. 319 319 * - 0x24 320 - - \_\_le32 320 + - __le32 321 321 - block 322 322 - The block number (within the directory file) that goes with hash=0. 323 323 * - 0x28 324 - - struct dx\_entry 324 + - struct dx_entry 325 325 - entries[0] 326 326 - As many 8-byte ``struct dx_entry`` as fits in the rest of the data block. 327 327 ··· 362 362 - Name 363 363 - Description 364 364 * - 0x0 365 - - \_\_le32 365 + - __le32 366 366 - fake.inode 367 367 - Zero, to make it look like this entry is not in use. 368 368 * - 0x4 369 - - \_\_le16 370 - - fake.rec\_len 371 - - The size of the block, in order to hide all of the dx\_node data. 369 + - __le16 370 + - fake.rec_len 371 + - The size of the block, in order to hide all of the dx_node data. 372 372 * - 0x6 373 373 - u8 374 - - name\_len 374 + - name_len 375 375 - Zero. There is no name for this “unused” directory entry. 376 376 * - 0x7 377 377 - u8 378 - - file\_type 378 + - file_type 379 379 - Zero. There is no file type for this “unused” directory entry. 380 380 * - 0x8 381 - - \_\_le16 381 + - __le16 382 382 - limit 383 - - Maximum number of dx\_entries that can follow this header, plus 1 for 383 + - Maximum number of dx_entries that can follow this header, plus 1 for 384 384 the header itself. 385 385 * - 0xA 386 - - \_\_le16 386 + - __le16 387 387 - count 388 - - Actual number of dx\_entries that follow this header, plus 1 for the 388 + - Actual number of dx_entries that follow this header, plus 1 for the 389 389 header itself. 390 390 * - 0xE 391 - - \_\_le32 391 + - __le32 392 392 - block 393 393 - The block number (within the directory file) that goes with the lowest 394 394 hash value of this block. This value is stored in the parent block. 395 395 * - 0x12 396 - - struct dx\_entry 396 + - struct dx_entry 397 397 - entries[0] 398 398 - As many 8-byte ``struct dx_entry`` as fits in the rest of the data block. 399 399 ··· 410 410 - Name 411 411 - Description 412 412 * - 0x0 413 - - \_\_le32 413 + - __le32 414 414 - hash 415 415 - Hash code. 416 416 * - 0x4 417 - - \_\_le32 417 + - __le32 418 418 - block 419 419 - Block number (within the directory file, not filesystem blocks) of the 420 420 next node in the htree. ··· 423 423 author.) 424 424 425 425 If metadata checksums are enabled, the last 8 bytes of the directory 426 - block (precisely the length of one dx\_entry) are used to store a 426 + block (precisely the length of one dx_entry) are used to store a 427 427 ``struct dx_tail``, which contains the checksum. The ``limit`` and 428 - ``count`` entries in the dx\_root/dx\_node structures are adjusted as 429 - necessary to fit the dx\_tail into the block. If there is no space for 430 - the dx\_tail, the user is notified to run e2fsck -D to rebuild the 428 + ``count`` entries in the dx_root/dx_node structures are adjusted as 429 + necessary to fit the dx_tail into the block. If there is no space for 430 + the dx_tail, the user is notified to run e2fsck -D to rebuild the 431 431 directory index (which will ensure that there's space for the checksum. 432 - The dx\_tail structure is 8 bytes long and looks like this: 432 + The dx_tail structure is 8 bytes long and looks like this: 433 433 434 434 .. list-table:: 435 435 :widths: 8 8 24 40 ··· 441 441 - Description 442 442 * - 0x0 443 443 - u32 444 - - dt\_reserved 444 + - dt_reserved 445 445 - Zero. 446 446 * - 0x4 447 - - \_\_le32 448 - - dt\_checksum 447 + - __le32 448 + - dt_checksum 449 449 - Checksum of the htree directory block. 450 450 451 451 The checksum is calculated against the FS UUID, the htree index header 452 - (dx\_root or dx\_node), all of the htree indices (dx\_entry) that are in 453 - use, and the tail block (dx\_tail). 452 + (dx_root or dx_node), all of the htree indices (dx_entry) that are in 453 + use, and the tail block (dx_tail).
+5 -5
Documentation/filesystems/ext4/eainode.rst
··· 5 5 6 6 To enable ext4 to store extended attribute values that do not fit in the 7 7 inode or in the single extended attribute block attached to an inode, 8 - the EA\_INODE feature allows us to store the value in the data blocks of 8 + the EA_INODE feature allows us to store the value in the data blocks of 9 9 a regular file inode. This “EA inode” is linked only from the extended 10 10 attribute name index and must not appear in a directory entry. The 11 - inode's i\_atime field is used to store a checksum of the xattr value; 12 - and i\_ctime/i\_version store a 64-bit reference count, which enables 11 + inode's i_atime field is used to store a checksum of the xattr value; 12 + and i_ctime/i_version store a 64-bit reference count, which enables 13 13 sharing of large xattr values between multiple owning inodes. For 14 14 backward compatibility with older versions of this feature, the 15 - i\_mtime/i\_generation *may* store a back-reference to the inode number 16 - and i\_generation of the **one** owning inode (in cases where the EA 15 + i_mtime/i_generation *may* store a back-reference to the inode number 16 + and i_generation of the **one** owning inode (in cases where the EA 17 17 inode is not referenced by multiple inodes) to verify that the EA inode 18 18 is the correct one being accessed.
+63 -63
Documentation/filesystems/ext4/group_descr.rst
··· 7 7 associated with it. As noted in the Layout section above, the group 8 8 descriptors (if present) are the second item in the block group. The 9 9 standard configuration is for each block group to contain a full copy of 10 - the block group descriptor table unless the sparse\_super feature flag 10 + the block group descriptor table unless the sparse_super feature flag 11 11 is set. 12 12 13 13 Notice how the group descriptor records the location of both bitmaps and 14 14 the inode table (i.e. they can float). This means that within a block 15 15 group, the only data structures with fixed locations are the superblock 16 - and the group descriptor table. The flex\_bg mechanism uses this 16 + and the group descriptor table. The flex_bg mechanism uses this 17 17 property to group several block groups into a flex group and lay out all 18 18 of the groups' bitmaps and inode tables into one long run in the first 19 19 group of the flex group. 20 20 21 - If the meta\_bg feature flag is set, then several block groups are 22 - grouped together into a meta group. Note that in the meta\_bg case, 21 + If the meta_bg feature flag is set, then several block groups are 22 + grouped together into a meta group. Note that in the meta_bg case, 23 23 however, the first and last two block groups within the larger meta 24 24 group contain only group descriptors for the groups inside the meta 25 25 group. 26 26 27 - flex\_bg and meta\_bg do not appear to be mutually exclusive features. 27 + flex_bg and meta_bg do not appear to be mutually exclusive features. 28 28 29 29 In ext2, ext3, and ext4 (when the 64bit feature is not enabled), the 30 30 block group descriptor was only 32 bytes long and therefore ends at 31 - bg\_checksum. On an ext4 filesystem with the 64bit feature enabled, the 31 + bg_checksum. On an ext4 filesystem with the 64bit feature enabled, the 32 32 block group descriptor expands to at least the 64 bytes described below; 33 33 the size is stored in the superblock. 34 34 35 - If gdt\_csum is set and metadata\_csum is not set, the block group 35 + If gdt_csum is set and metadata_csum is not set, the block group 36 36 checksum is the crc16 of the FS UUID, the group number, and the group 37 - descriptor structure. If metadata\_csum is set, then the block group 37 + descriptor structure. If metadata_csum is set, then the block group 38 38 checksum is the lower 16 bits of the checksum of the FS UUID, the group 39 39 number, and the group descriptor structure. Both block and inode bitmap 40 40 checksums are calculated against the FS UUID, the group number, and the ··· 51 51 - Name 52 52 - Description 53 53 * - 0x0 54 - - \_\_le32 55 - - bg\_block\_bitmap\_lo 54 + - __le32 55 + - bg_block_bitmap_lo 56 56 - Lower 32-bits of location of block bitmap. 57 57 * - 0x4 58 - - \_\_le32 59 - - bg\_inode\_bitmap\_lo 58 + - __le32 59 + - bg_inode_bitmap_lo 60 60 - Lower 32-bits of location of inode bitmap. 61 61 * - 0x8 62 - - \_\_le32 63 - - bg\_inode\_table\_lo 62 + - __le32 63 + - bg_inode_table_lo 64 64 - Lower 32-bits of location of inode table. 65 65 * - 0xC 66 - - \_\_le16 67 - - bg\_free\_blocks\_count\_lo 66 + - __le16 67 + - bg_free_blocks_count_lo 68 68 - Lower 16-bits of free block count. 69 69 * - 0xE 70 - - \_\_le16 71 - - bg\_free\_inodes\_count\_lo 70 + - __le16 71 + - bg_free_inodes_count_lo 72 72 - Lower 16-bits of free inode count. 73 73 * - 0x10 74 - - \_\_le16 75 - - bg\_used\_dirs\_count\_lo 74 + - __le16 75 + - bg_used_dirs_count_lo 76 76 - Lower 16-bits of directory count. 77 77 * - 0x12 78 - - \_\_le16 79 - - bg\_flags 78 + - __le16 79 + - bg_flags 80 80 - Block group flags. See the bgflags_ table below. 81 81 * - 0x14 82 - - \_\_le32 83 - - bg\_exclude\_bitmap\_lo 82 + - __le32 83 + - bg_exclude_bitmap_lo 84 84 - Lower 32-bits of location of snapshot exclusion bitmap. 85 85 * - 0x18 86 - - \_\_le16 87 - - bg\_block\_bitmap\_csum\_lo 86 + - __le16 87 + - bg_block_bitmap_csum_lo 88 88 - Lower 16-bits of the block bitmap checksum. 89 89 * - 0x1A 90 - - \_\_le16 91 - - bg\_inode\_bitmap\_csum\_lo 90 + - __le16 91 + - bg_inode_bitmap_csum_lo 92 92 - Lower 16-bits of the inode bitmap checksum. 93 93 * - 0x1C 94 - - \_\_le16 95 - - bg\_itable\_unused\_lo 94 + - __le16 95 + - bg_itable_unused_lo 96 96 - Lower 16-bits of unused inode count. If set, we needn't scan past the 97 - ``(sb.s_inodes_per_group - gdt.bg_itable_unused)``\ th entry in the 97 + ``(sb.s_inodes_per_group - gdt.bg_itable_unused)`` th entry in the 98 98 inode table for this group. 99 99 * - 0x1E 100 - - \_\_le16 101 - - bg\_checksum 102 - - Group descriptor checksum; crc16(sb\_uuid+group\_num+bg\_desc) if the 103 - RO\_COMPAT\_GDT\_CSUM feature is set, or 104 - crc32c(sb\_uuid+group\_num+bg\_desc) & 0xFFFF if the 105 - RO\_COMPAT\_METADATA\_CSUM feature is set. The bg\_checksum 106 - field in bg\_desc is skipped when calculating crc16 checksum, 100 + - __le16 101 + - bg_checksum 102 + - Group descriptor checksum; crc16(sb_uuid+group_num+bg_desc) if the 103 + RO_COMPAT_GDT_CSUM feature is set, or 104 + crc32c(sb_uuid+group_num+bg_desc) & 0xFFFF if the 105 + RO_COMPAT_METADATA_CSUM feature is set. The bg_checksum 106 + field in bg_desc is skipped when calculating crc16 checksum, 107 107 and set to zero if crc32c checksum is used. 108 108 * - 109 109 - ··· 111 111 - These fields only exist if the 64bit feature is enabled and s_desc_size 112 112 > 32. 113 113 * - 0x20 114 - - \_\_le32 115 - - bg\_block\_bitmap\_hi 114 + - __le32 115 + - bg_block_bitmap_hi 116 116 - Upper 32-bits of location of block bitmap. 117 117 * - 0x24 118 - - \_\_le32 119 - - bg\_inode\_bitmap\_hi 118 + - __le32 119 + - bg_inode_bitmap_hi 120 120 - Upper 32-bits of location of inodes bitmap. 121 121 * - 0x28 122 - - \_\_le32 123 - - bg\_inode\_table\_hi 122 + - __le32 123 + - bg_inode_table_hi 124 124 - Upper 32-bits of location of inodes table. 125 125 * - 0x2C 126 - - \_\_le16 127 - - bg\_free\_blocks\_count\_hi 126 + - __le16 127 + - bg_free_blocks_count_hi 128 128 - Upper 16-bits of free block count. 129 129 * - 0x2E 130 - - \_\_le16 131 - - bg\_free\_inodes\_count\_hi 130 + - __le16 131 + - bg_free_inodes_count_hi 132 132 - Upper 16-bits of free inode count. 133 133 * - 0x30 134 - - \_\_le16 135 - - bg\_used\_dirs\_count\_hi 134 + - __le16 135 + - bg_used_dirs_count_hi 136 136 - Upper 16-bits of directory count. 137 137 * - 0x32 138 - - \_\_le16 139 - - bg\_itable\_unused\_hi 138 + - __le16 139 + - bg_itable_unused_hi 140 140 - Upper 16-bits of unused inode count. 141 141 * - 0x34 142 - - \_\_le32 143 - - bg\_exclude\_bitmap\_hi 142 + - __le32 143 + - bg_exclude_bitmap_hi 144 144 - Upper 32-bits of location of snapshot exclusion bitmap. 145 145 * - 0x38 146 - - \_\_le16 147 - - bg\_block\_bitmap\_csum\_hi 146 + - __le16 147 + - bg_block_bitmap_csum_hi 148 148 - Upper 16-bits of the block bitmap checksum. 149 149 * - 0x3A 150 - - \_\_le16 151 - - bg\_inode\_bitmap\_csum\_hi 150 + - __le16 151 + - bg_inode_bitmap_csum_hi 152 152 - Upper 16-bits of the inode bitmap checksum. 153 153 * - 0x3C 154 - - \_\_u32 155 - - bg\_reserved 154 + - __u32 155 + - bg_reserved 156 156 - Padding to 64 bytes. 157 157 158 158 .. _bgflags: ··· 166 166 * - Value 167 167 - Description 168 168 * - 0x1 169 - - inode table and bitmap are not initialized (EXT4\_BG\_INODE\_UNINIT). 169 + - inode table and bitmap are not initialized (EXT4_BG_INODE_UNINIT). 170 170 * - 0x2 171 - - block bitmap is not initialized (EXT4\_BG\_BLOCK\_UNINIT). 171 + - block bitmap is not initialized (EXT4_BG_BLOCK_UNINIT). 172 172 * - 0x4 173 - - inode table is zeroed (EXT4\_BG\_INODE\_ZEROED). 173 + - inode table is zeroed (EXT4_BG_INODE_ZEROED).
+30 -30
Documentation/filesystems/ext4/ifork.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - The Contents of inode.i\_block 3 + The Contents of inode.i_block 4 4 ------------------------------ 5 5 6 6 Depending on the type of file an inode describes, the 60 bytes of ··· 47 47 tree. Under the old scheme, allocating a contiguous run of 1,000 blocks 48 48 requires an indirect block to map all 1,000 entries; with extents, the 49 49 mapping is reduced to a single ``struct ext4_extent`` with 50 - ``ee_len = 1000``. If flex\_bg is enabled, it is possible to allocate 50 + ``ee_len = 1000``. If flex_bg is enabled, it is possible to allocate 51 51 very large files with a single extent, at a considerable reduction in 52 52 metadata block use, and some improvement in disk efficiency. The inode 53 53 must have the extents flag (0x80000) flag set for this feature to be in ··· 76 76 - Name 77 77 - Description 78 78 * - 0x0 79 - - \_\_le16 80 - - eh\_magic 79 + - __le16 80 + - eh_magic 81 81 - Magic number, 0xF30A. 82 82 * - 0x2 83 - - \_\_le16 84 - - eh\_entries 83 + - __le16 84 + - eh_entries 85 85 - Number of valid entries following the header. 86 86 * - 0x4 87 - - \_\_le16 88 - - eh\_max 87 + - __le16 88 + - eh_max 89 89 - Maximum number of entries that could follow the header. 90 90 * - 0x6 91 - - \_\_le16 92 - - eh\_depth 91 + - __le16 92 + - eh_depth 93 93 - Depth of this extent node in the extent tree. 0 = this extent node 94 94 points to data blocks; otherwise, this extent node points to other 95 95 extent nodes. The extent tree can be at most 5 levels deep: a logical 96 96 block number can be at most ``2^32``, and the smallest ``n`` that 97 97 satisfies ``4*(((blocksize - 12)/12)^n) >= 2^32`` is 5. 98 98 * - 0x8 99 - - \_\_le32 100 - - eh\_generation 99 + - __le32 100 + - eh_generation 101 101 - Generation of the tree. (Used by Lustre, but not standard ext4). 102 102 103 103 Internal nodes of the extent tree, also known as index nodes, are ··· 112 112 - Name 113 113 - Description 114 114 * - 0x0 115 - - \_\_le32 116 - - ei\_block 115 + - __le32 116 + - ei_block 117 117 - This index node covers file blocks from 'block' onward. 118 118 * - 0x4 119 - - \_\_le32 120 - - ei\_leaf\_lo 119 + - __le32 120 + - ei_leaf_lo 121 121 - Lower 32-bits of the block number of the extent node that is the next 122 122 level lower in the tree. The tree node pointed to can be either another 123 123 internal node or a leaf node, described below. 124 124 * - 0x8 125 - - \_\_le16 126 - - ei\_leaf\_hi 125 + - __le16 126 + - ei_leaf_hi 127 127 - Upper 16-bits of the previous field. 128 128 * - 0xA 129 - - \_\_u16 130 - - ei\_unused 129 + - __u16 130 + - ei_unused 131 131 - 132 132 133 133 Leaf nodes of the extent tree are recorded as ``struct ext4_extent``, ··· 142 142 - Name 143 143 - Description 144 144 * - 0x0 145 - - \_\_le32 146 - - ee\_block 145 + - __le32 146 + - ee_block 147 147 - First file block number that this extent covers. 148 148 * - 0x4 149 - - \_\_le16 150 - - ee\_len 149 + - __le16 150 + - ee_len 151 151 - Number of blocks covered by extent. If the value of this field is <= 152 152 32768, the extent is initialized. If the value of the field is > 32768, 153 153 the extent is uninitialized and the actual extent length is ``ee_len`` - 154 154 32768. Therefore, the maximum length of a initialized extent is 32768 155 155 blocks, and the maximum length of an uninitialized extent is 32767. 156 156 * - 0x6 157 - - \_\_le16 158 - - ee\_start\_hi 157 + - __le16 158 + - ee_start_hi 159 159 - Upper 16-bits of the block number to which this extent points. 160 160 * - 0x8 161 - - \_\_le32 162 - - ee\_start\_lo 161 + - __le32 162 + - ee_start_lo 163 163 - Lower 32-bits of the block number to which this extent points. 164 164 165 165 Prior to the introduction of metadata checksums, the extent header + ··· 182 182 - Name 183 183 - Description 184 184 * - 0x0 185 - - \_\_le32 186 - - eb\_checksum 185 + - __le32 186 + - eb_checksum 187 187 - Checksum of the extent block, crc32c(uuid+inum+igeneration+extentblock) 188 188 189 189 Inline Data
+4 -4
Documentation/filesystems/ext4/inlinedata.rst
··· 11 11 attribute space, then it might be found as an extended attribute 12 12 “system.data” within the inode body (“ibody EA”). This of course 13 13 constrains the amount of extended attributes one can attach to an inode. 14 - If the data size increases beyond i\_block + ibody EA, a regular block 14 + If the data size increases beyond i_block + ibody EA, a regular block 15 15 is allocated and the contents moved to that block. 16 16 17 17 Pending a change to compact the extended attribute key used to store 18 18 inline data, one ought to be able to store 160 bytes of data in a 19 - 256-byte inode (as of June 2015, when i\_extra\_isize is 28). Prior to 19 + 256-byte inode (as of June 2015, when i_extra_isize is 28). Prior to 20 20 that, the limit was 156 bytes due to inefficient use of inode space. 21 21 22 22 The inline data feature requires the presence of an extended attribute ··· 25 25 Inline Directories 26 26 ~~~~~~~~~~~~~~~~~~ 27 27 28 - The first four bytes of i\_block are the inode number of the parent 28 + The first four bytes of i_block are the inode number of the parent 29 29 directory. Following that is a 56-byte space for an array of directory 30 30 entries; see ``struct ext4_dir_entry``. If there is a “system.data” 31 31 attribute in the inode body, the EA value is an array of 32 32 ``struct ext4_dir_entry`` as well. Note that for inline directories, the 33 - i\_block and EA space are treated as separate dirent blocks; directory 33 + i_block and EA space are treated as separate dirent blocks; directory 34 34 entries cannot span the two. 35 35 36 36 Inline directory entries are not checksummed, as the inode checksum
+153 -153
Documentation/filesystems/ext4/inodes.rst
··· 38 38 - Name 39 39 - Description 40 40 * - 0x0 41 - - \_\_le16 42 - - i\_mode 41 + - __le16 42 + - i_mode 43 43 - File mode. See the table i_mode_ below. 44 44 * - 0x2 45 - - \_\_le16 46 - - i\_uid 45 + - __le16 46 + - i_uid 47 47 - Lower 16-bits of Owner UID. 48 48 * - 0x4 49 - - \_\_le32 50 - - i\_size\_lo 49 + - __le32 50 + - i_size_lo 51 51 - Lower 32-bits of size in bytes. 52 52 * - 0x8 53 - - \_\_le32 54 - - i\_atime 55 - - Last access time, in seconds since the epoch. However, if the EA\_INODE 53 + - __le32 54 + - i_atime 55 + - Last access time, in seconds since the epoch. However, if the EA_INODE 56 56 inode flag is set, this inode stores an extended attribute value and 57 57 this field contains the checksum of the value. 58 58 * - 0xC 59 - - \_\_le32 60 - - i\_ctime 59 + - __le32 60 + - i_ctime 61 61 - Last inode change time, in seconds since the epoch. However, if the 62 - EA\_INODE inode flag is set, this inode stores an extended attribute 62 + EA_INODE inode flag is set, this inode stores an extended attribute 63 63 value and this field contains the lower 32 bits of the attribute value's 64 64 reference count. 65 65 * - 0x10 66 - - \_\_le32 67 - - i\_mtime 66 + - __le32 67 + - i_mtime 68 68 - Last data modification time, in seconds since the epoch. However, if the 69 - EA\_INODE inode flag is set, this inode stores an extended attribute 69 + EA_INODE inode flag is set, this inode stores an extended attribute 70 70 value and this field contains the number of the inode that owns the 71 71 extended attribute. 72 72 * - 0x14 73 - - \_\_le32 74 - - i\_dtime 73 + - __le32 74 + - i_dtime 75 75 - Deletion Time, in seconds since the epoch. 76 76 * - 0x18 77 - - \_\_le16 78 - - i\_gid 77 + - __le16 78 + - i_gid 79 79 - Lower 16-bits of GID. 80 80 * - 0x1A 81 - - \_\_le16 82 - - i\_links\_count 81 + - __le16 82 + - i_links_count 83 83 - Hard link count. Normally, ext4 does not permit an inode to have more 84 84 than 65,000 hard links. This applies to files as well as directories, 85 85 which means that there cannot be more than 64,998 subdirectories in a 86 86 directory (each subdirectory's '..' entry counts as a hard link, as does 87 - the '.' entry in the directory itself). With the DIR\_NLINK feature 87 + the '.' entry in the directory itself). With the DIR_NLINK feature 88 88 enabled, ext4 supports more than 64,998 subdirectories by setting this 89 89 field to 1 to indicate that the number of hard links is not known. 90 90 * - 0x1C 91 - - \_\_le32 92 - - i\_blocks\_lo 93 - - Lower 32-bits of “block” count. If the huge\_file feature flag is not 91 + - __le32 92 + - i_blocks_lo 93 + - Lower 32-bits of “block” count. If the huge_file feature flag is not 94 94 set on the filesystem, the file consumes ``i_blocks_lo`` 512-byte blocks 95 - on disk. If huge\_file is set and EXT4\_HUGE\_FILE\_FL is NOT set in 95 + on disk. If huge_file is set and EXT4_HUGE_FILE_FL is NOT set in 96 96 ``inode.i_flags``, then the file consumes ``i_blocks_lo + (i_blocks_hi 97 - << 32)`` 512-byte blocks on disk. If huge\_file is set and 98 - EXT4\_HUGE\_FILE\_FL IS set in ``inode.i_flags``, then this file 97 + << 32)`` 512-byte blocks on disk. If huge_file is set and 98 + EXT4_HUGE_FILE_FL IS set in ``inode.i_flags``, then this file 99 99 consumes (``i_blocks_lo + i_blocks_hi`` << 32) filesystem blocks on 100 100 disk. 101 101 * - 0x20 102 - - \_\_le32 103 - - i\_flags 102 + - __le32 103 + - i_flags 104 104 - Inode flags. See the table i_flags_ below. 105 105 * - 0x24 106 106 - 4 bytes 107 - - i\_osd1 107 + - i_osd1 108 108 - See the table i_osd1_ for more details. 109 109 * - 0x28 110 110 - 60 bytes 111 - - i\_block[EXT4\_N\_BLOCKS=15] 112 - - Block map or extent tree. See the section “The Contents of inode.i\_block”. 111 + - i_block[EXT4_N_BLOCKS=15] 112 + - Block map or extent tree. See the section “The Contents of inode.i_block”. 113 113 * - 0x64 114 - - \_\_le32 115 - - i\_generation 114 + - __le32 115 + - i_generation 116 116 - File version (for NFS). 117 117 * - 0x68 118 - - \_\_le32 119 - - i\_file\_acl\_lo 118 + - __le32 119 + - i_file_acl_lo 120 120 - Lower 32-bits of extended attribute block. ACLs are of course one of 121 121 many possible extended attributes; I think the name of this field is a 122 122 result of the first use of extended attributes being for ACLs. 123 123 * - 0x6C 124 - - \_\_le32 125 - - i\_size\_high / i\_dir\_acl 124 + - __le32 125 + - i_size_high / i_dir_acl 126 126 - Upper 32-bits of file/directory size. In ext2/3 this field was named 127 - i\_dir\_acl, though it was usually set to zero and never used. 127 + i_dir_acl, though it was usually set to zero and never used. 128 128 * - 0x70 129 - - \_\_le32 130 - - i\_obso\_faddr 129 + - __le32 130 + - i_obso_faddr 131 131 - (Obsolete) fragment address. 132 132 * - 0x74 133 133 - 12 bytes 134 - - i\_osd2 134 + - i_osd2 135 135 - See the table i_osd2_ for more details. 136 136 * - 0x80 137 - - \_\_le16 138 - - i\_extra\_isize 137 + - __le16 138 + - i_extra_isize 139 139 - Size of this inode - 128. Alternately, the size of the extended inode 140 140 fields beyond the original ext2 inode, including this field. 141 141 * - 0x82 142 - - \_\_le16 143 - - i\_checksum\_hi 142 + - __le16 143 + - i_checksum_hi 144 144 - Upper 16-bits of the inode checksum. 145 145 * - 0x84 146 - - \_\_le32 147 - - i\_ctime\_extra 146 + - __le32 147 + - i_ctime_extra 148 148 - Extra change time bits. This provides sub-second precision. See Inode 149 149 Timestamps section. 150 150 * - 0x88 151 - - \_\_le32 152 - - i\_mtime\_extra 151 + - __le32 152 + - i_mtime_extra 153 153 - Extra modification time bits. This provides sub-second precision. 154 154 * - 0x8C 155 - - \_\_le32 156 - - i\_atime\_extra 155 + - __le32 156 + - i_atime_extra 157 157 - Extra access time bits. This provides sub-second precision. 158 158 * - 0x90 159 - - \_\_le32 160 - - i\_crtime 159 + - __le32 160 + - i_crtime 161 161 - File creation time, in seconds since the epoch. 162 162 * - 0x94 163 - - \_\_le32 164 - - i\_crtime\_extra 163 + - __le32 164 + - i_crtime_extra 165 165 - Extra file creation time bits. This provides sub-second precision. 166 166 * - 0x98 167 - - \_\_le32 168 - - i\_version\_hi 167 + - __le32 168 + - i_version_hi 169 169 - Upper 32-bits for version number. 170 170 * - 0x9C 171 - - \_\_le32 172 - - i\_projid 171 + - __le32 172 + - i_projid 173 173 - Project ID. 174 174 175 175 .. _i_mode: ··· 183 183 * - Value 184 184 - Description 185 185 * - 0x1 186 - - S\_IXOTH (Others may execute) 186 + - S_IXOTH (Others may execute) 187 187 * - 0x2 188 - - S\_IWOTH (Others may write) 188 + - S_IWOTH (Others may write) 189 189 * - 0x4 190 - - S\_IROTH (Others may read) 190 + - S_IROTH (Others may read) 191 191 * - 0x8 192 - - S\_IXGRP (Group members may execute) 192 + - S_IXGRP (Group members may execute) 193 193 * - 0x10 194 - - S\_IWGRP (Group members may write) 194 + - S_IWGRP (Group members may write) 195 195 * - 0x20 196 - - S\_IRGRP (Group members may read) 196 + - S_IRGRP (Group members may read) 197 197 * - 0x40 198 - - S\_IXUSR (Owner may execute) 198 + - S_IXUSR (Owner may execute) 199 199 * - 0x80 200 - - S\_IWUSR (Owner may write) 200 + - S_IWUSR (Owner may write) 201 201 * - 0x100 202 - - S\_IRUSR (Owner may read) 202 + - S_IRUSR (Owner may read) 203 203 * - 0x200 204 - - S\_ISVTX (Sticky bit) 204 + - S_ISVTX (Sticky bit) 205 205 * - 0x400 206 - - S\_ISGID (Set GID) 206 + - S_ISGID (Set GID) 207 207 * - 0x800 208 - - S\_ISUID (Set UID) 208 + - S_ISUID (Set UID) 209 209 * - 210 210 - These are mutually-exclusive file types: 211 211 * - 0x1000 212 - - S\_IFIFO (FIFO) 212 + - S_IFIFO (FIFO) 213 213 * - 0x2000 214 - - S\_IFCHR (Character device) 214 + - S_IFCHR (Character device) 215 215 * - 0x4000 216 - - S\_IFDIR (Directory) 216 + - S_IFDIR (Directory) 217 217 * - 0x6000 218 - - S\_IFBLK (Block device) 218 + - S_IFBLK (Block device) 219 219 * - 0x8000 220 - - S\_IFREG (Regular file) 220 + - S_IFREG (Regular file) 221 221 * - 0xA000 222 - - S\_IFLNK (Symbolic link) 222 + - S_IFLNK (Symbolic link) 223 223 * - 0xC000 224 - - S\_IFSOCK (Socket) 224 + - S_IFSOCK (Socket) 225 225 226 226 .. _i_flags: 227 227 ··· 234 234 * - Value 235 235 - Description 236 236 * - 0x1 237 - - This file requires secure deletion (EXT4\_SECRM\_FL). (not implemented) 237 + - This file requires secure deletion (EXT4_SECRM_FL). (not implemented) 238 238 * - 0x2 239 239 - This file should be preserved, should undeletion be desired 240 - (EXT4\_UNRM\_FL). (not implemented) 240 + (EXT4_UNRM_FL). (not implemented) 241 241 * - 0x4 242 - - File is compressed (EXT4\_COMPR\_FL). (not really implemented) 242 + - File is compressed (EXT4_COMPR_FL). (not really implemented) 243 243 * - 0x8 244 - - All writes to the file must be synchronous (EXT4\_SYNC\_FL). 244 + - All writes to the file must be synchronous (EXT4_SYNC_FL). 245 245 * - 0x10 246 - - File is immutable (EXT4\_IMMUTABLE\_FL). 246 + - File is immutable (EXT4_IMMUTABLE_FL). 247 247 * - 0x20 248 - - File can only be appended (EXT4\_APPEND\_FL). 248 + - File can only be appended (EXT4_APPEND_FL). 249 249 * - 0x40 250 - - The dump(1) utility should not dump this file (EXT4\_NODUMP\_FL). 250 + - The dump(1) utility should not dump this file (EXT4_NODUMP_FL). 251 251 * - 0x80 252 - - Do not update access time (EXT4\_NOATIME\_FL). 252 + - Do not update access time (EXT4_NOATIME_FL). 253 253 * - 0x100 254 - - Dirty compressed file (EXT4\_DIRTY\_FL). (not used) 254 + - Dirty compressed file (EXT4_DIRTY_FL). (not used) 255 255 * - 0x200 256 - - File has one or more compressed clusters (EXT4\_COMPRBLK\_FL). (not used) 256 + - File has one or more compressed clusters (EXT4_COMPRBLK_FL). (not used) 257 257 * - 0x400 258 - - Do not compress file (EXT4\_NOCOMPR\_FL). (not used) 258 + - Do not compress file (EXT4_NOCOMPR_FL). (not used) 259 259 * - 0x800 260 - - Encrypted inode (EXT4\_ENCRYPT\_FL). This bit value previously was 261 - EXT4\_ECOMPR\_FL (compression error), which was never used. 260 + - Encrypted inode (EXT4_ENCRYPT_FL). This bit value previously was 261 + EXT4_ECOMPR_FL (compression error), which was never used. 262 262 * - 0x1000 263 - - Directory has hashed indexes (EXT4\_INDEX\_FL). 263 + - Directory has hashed indexes (EXT4_INDEX_FL). 264 264 * - 0x2000 265 - - AFS magic directory (EXT4\_IMAGIC\_FL). 265 + - AFS magic directory (EXT4_IMAGIC_FL). 266 266 * - 0x4000 267 267 - File data must always be written through the journal 268 - (EXT4\_JOURNAL\_DATA\_FL). 268 + (EXT4_JOURNAL_DATA_FL). 269 269 * - 0x8000 270 - - File tail should not be merged (EXT4\_NOTAIL\_FL). (not used by ext4) 270 + - File tail should not be merged (EXT4_NOTAIL_FL). (not used by ext4) 271 271 * - 0x10000 272 272 - All directory entry data should be written synchronously (see 273 - ``dirsync``) (EXT4\_DIRSYNC\_FL). 273 + ``dirsync``) (EXT4_DIRSYNC_FL). 274 274 * - 0x20000 275 - - Top of directory hierarchy (EXT4\_TOPDIR\_FL). 275 + - Top of directory hierarchy (EXT4_TOPDIR_FL). 276 276 * - 0x40000 277 - - This is a huge file (EXT4\_HUGE\_FILE\_FL). 277 + - This is a huge file (EXT4_HUGE_FILE_FL). 278 278 * - 0x80000 279 - - Inode uses extents (EXT4\_EXTENTS\_FL). 279 + - Inode uses extents (EXT4_EXTENTS_FL). 280 280 * - 0x100000 281 - - Verity protected file (EXT4\_VERITY\_FL). 281 + - Verity protected file (EXT4_VERITY_FL). 282 282 * - 0x200000 283 283 - Inode stores a large extended attribute value in its data blocks 284 - (EXT4\_EA\_INODE\_FL). 284 + (EXT4_EA_INODE_FL). 285 285 * - 0x400000 286 - - This file has blocks allocated past EOF (EXT4\_EOFBLOCKS\_FL). 286 + - This file has blocks allocated past EOF (EXT4_EOFBLOCKS_FL). 287 287 (deprecated) 288 288 * - 0x01000000 289 289 - Inode is a snapshot (``EXT4_SNAPFILE_FL``). (not in mainline) ··· 294 294 - Snapshot shrink has completed (``EXT4_SNAPFILE_SHRUNK_FL``). (not in 295 295 mainline) 296 296 * - 0x10000000 297 - - Inode has inline data (EXT4\_INLINE\_DATA\_FL). 297 + - Inode has inline data (EXT4_INLINE_DATA_FL). 298 298 * - 0x20000000 299 - - Create children with the same project ID (EXT4\_PROJINHERIT\_FL). 299 + - Create children with the same project ID (EXT4_PROJINHERIT_FL). 300 300 * - 0x80000000 301 - - Reserved for ext4 library (EXT4\_RESERVED\_FL). 301 + - Reserved for ext4 library (EXT4_RESERVED_FL). 302 302 * - 303 303 - Aggregate flags: 304 304 * - 0x705BDFFF 305 305 - User-visible flags. 306 306 * - 0x604BC0FF 307 - - User-modifiable flags. Note that while EXT4\_JOURNAL\_DATA\_FL and 308 - EXT4\_EXTENTS\_FL can be set with setattr, they are not in the kernel's 309 - EXT4\_FL\_USER\_MODIFIABLE mask, since it needs to handle the setting of 307 + - User-modifiable flags. Note that while EXT4_JOURNAL_DATA_FL and 308 + EXT4_EXTENTS_FL can be set with setattr, they are not in the kernel's 309 + EXT4_FL_USER_MODIFIABLE mask, since it needs to handle the setting of 310 310 these flags in a special manner and they are masked out of the set of 311 - flags that are saved directly to i\_flags. 311 + flags that are saved directly to i_flags. 312 312 313 313 .. _i_osd1: 314 314 ··· 325 325 - Name 326 326 - Description 327 327 * - 0x0 328 - - \_\_le32 329 - - l\_i\_version 330 - - Inode version. However, if the EA\_INODE inode flag is set, this inode 328 + - __le32 329 + - l_i_version 330 + - Inode version. However, if the EA_INODE inode flag is set, this inode 331 331 stores an extended attribute value and this field contains the upper 32 332 332 bits of the attribute value's reference count. 333 333 ··· 342 342 - Name 343 343 - Description 344 344 * - 0x0 345 - - \_\_le32 346 - - h\_i\_translator 345 + - __le32 346 + - h_i_translator 347 347 - ?? 348 348 349 349 Masix: ··· 357 357 - Name 358 358 - Description 359 359 * - 0x0 360 - - \_\_le32 361 - - m\_i\_reserved 360 + - __le32 361 + - m_i_reserved 362 362 - ?? 363 363 364 364 .. _i_osd2: ··· 376 376 - Name 377 377 - Description 378 378 * - 0x0 379 - - \_\_le16 380 - - l\_i\_blocks\_high 379 + - __le16 380 + - l_i_blocks_high 381 381 - Upper 16-bits of the block count. Please see the note attached to 382 - i\_blocks\_lo. 382 + i_blocks_lo. 383 383 * - 0x2 384 - - \_\_le16 385 - - l\_i\_file\_acl\_high 384 + - __le16 385 + - l_i_file_acl_high 386 386 - Upper 16-bits of the extended attribute block (historically, the file 387 387 ACL location). See the Extended Attributes section below. 388 388 * - 0x4 389 - - \_\_le16 390 - - l\_i\_uid\_high 389 + - __le16 390 + - l_i_uid_high 391 391 - Upper 16-bits of the Owner UID. 392 392 * - 0x6 393 - - \_\_le16 394 - - l\_i\_gid\_high 393 + - __le16 394 + - l_i_gid_high 395 395 - Upper 16-bits of the GID. 396 396 * - 0x8 397 - - \_\_le16 398 - - l\_i\_checksum\_lo 397 + - __le16 398 + - l_i_checksum_lo 399 399 - Lower 16-bits of the inode checksum. 400 400 * - 0xA 401 - - \_\_le16 402 - - l\_i\_reserved 401 + - __le16 402 + - l_i_reserved 403 403 - Unused. 404 404 405 405 Hurd: ··· 413 413 - Name 414 414 - Description 415 415 * - 0x0 416 - - \_\_le16 417 - - h\_i\_reserved1 416 + - __le16 417 + - h_i_reserved1 418 418 - ?? 419 419 * - 0x2 420 - - \_\_u16 421 - - h\_i\_mode\_high 420 + - __u16 421 + - h_i_mode_high 422 422 - Upper 16-bits of the file mode. 423 423 * - 0x4 424 - - \_\_le16 425 - - h\_i\_uid\_high 424 + - __le16 425 + - h_i_uid_high 426 426 - Upper 16-bits of the Owner UID. 427 427 * - 0x6 428 - - \_\_le16 429 - - h\_i\_gid\_high 428 + - __le16 429 + - h_i_gid_high 430 430 - Upper 16-bits of the GID. 431 431 * - 0x8 432 - - \_\_u32 433 - - h\_i\_author 432 + - __u32 433 + - h_i_author 434 434 - Author code? 435 435 436 436 Masix: ··· 444 444 - Name 445 445 - Description 446 446 * - 0x0 447 - - \_\_le16 448 - - h\_i\_reserved1 447 + - __le16 448 + - h_i_reserved1 449 449 - ?? 450 450 * - 0x2 451 - - \_\_u16 452 - - m\_i\_file\_acl\_high 451 + - __u16 452 + - m_i_file_acl_high 453 453 - Upper 16-bits of the extended attribute block (historically, the file 454 454 ACL location). 455 455 * - 0x4 456 - - \_\_u32 457 - - m\_i\_reserved2[2] 456 + - __u32 457 + - m_i_reserved2[2] 458 458 - ?? 459 459 460 460 Inode Size ··· 466 466 on-disk inode at format time for all inodes in the filesystem to provide 467 467 space beyond the end of the original ext2 inode. The on-disk inode 468 468 record size is recorded in the superblock as ``s_inode_size``. The 469 - number of bytes actually used by struct ext4\_inode beyond the original 469 + number of bytes actually used by struct ext4_inode beyond the original 470 470 128-byte ext2 inode is recorded in the ``i_extra_isize`` field for each 471 - inode, which allows struct ext4\_inode to grow for a new kernel without 471 + inode, which allows struct ext4_inode to grow for a new kernel without 472 472 having to upgrade all of the on-disk inodes. Access to fields beyond 473 - EXT2\_GOOD\_OLD\_INODE\_SIZE should be verified to be within 473 + EXT2_GOOD_OLD_INODE_SIZE should be verified to be within 474 474 ``i_extra_isize``. By default, ext4 inode records are 256 bytes, and (as 475 475 of August 2019) the inode structure is 160 bytes 476 476 (``i_extra_isize = 32``). The extra space between the end of the inode ··· 516 516 same manner as 64-bit [cma]time. Neither crtime nor dtime are accessible 517 517 through the regular stat() interface, though debugfs will report them. 518 518 519 - We use the 32-bit signed time value plus (2^32 \* (extra epoch bits)). 519 + We use the 32-bit signed time value plus (2^32 * (extra epoch bits)). 520 520 In other words: 521 521 522 522 .. list-table:: ··· 525 525 526 526 * - Extra epoch bits 527 527 - MSB of 32-bit time 528 - - Adjustment for signed 32-bit to 64-bit tv\_sec 529 - - Decoded 64-bit tv\_sec 528 + - Adjustment for signed 32-bit to 64-bit tv_sec 529 + - Decoded 64-bit tv_sec 530 530 - valid time range 531 531 * - 0 0 532 532 - 1
+107 -107
Documentation/filesystems/ext4/journal.rst
··· 63 63 :header-rows: 1 64 64 65 65 * - Superblock 66 - - descriptor\_block (data\_blocks or revocation\_block) [more data or 67 - revocations] commmit\_block 66 + - descriptor_block (data_blocks or revocation_block) [more data or 67 + revocations] commmit_block 68 68 - [more transactions...] 69 69 * - 70 70 - One transaction ··· 93 93 * - 1024 bytes of padding 94 94 - ext4 Superblock 95 95 - Journal Superblock 96 - - descriptor\_block (data\_blocks or revocation\_block) [more data or 97 - revocations] commmit\_block 96 + - descriptor_block (data_blocks or revocation_block) [more data or 97 + revocations] commmit_block 98 98 - [more transactions...] 99 99 * - 100 100 - ··· 117 117 - Name 118 118 - Description 119 119 * - 0x0 120 - - \_\_be32 121 - - h\_magic 120 + - __be32 121 + - h_magic 122 122 - jbd2 magic number, 0xC03B3998. 123 123 * - 0x4 124 - - \_\_be32 125 - - h\_blocktype 124 + - __be32 125 + - h_blocktype 126 126 - Description of what this block contains. See the jbd2_blocktype_ table 127 127 below. 128 128 * - 0x8 129 - - \_\_be32 130 - - h\_sequence 129 + - __be32 130 + - h_sequence 131 131 - The transaction ID that goes with this block. 132 132 133 133 .. _jbd2_blocktype: ··· 177 177 - 178 178 - Static information describing the journal. 179 179 * - 0x0 180 - - journal\_header\_t (12 bytes) 181 - - s\_header 180 + - journal_header_t (12 bytes) 181 + - s_header 182 182 - Common header identifying this as a superblock. 183 183 * - 0xC 184 - - \_\_be32 185 - - s\_blocksize 184 + - __be32 185 + - s_blocksize 186 186 - Journal device block size. 187 187 * - 0x10 188 - - \_\_be32 189 - - s\_maxlen 188 + - __be32 189 + - s_maxlen 190 190 - Total number of blocks in this journal. 191 191 * - 0x14 192 - - \_\_be32 193 - - s\_first 192 + - __be32 193 + - s_first 194 194 - First block of log information. 195 195 * - 196 196 - 197 197 - 198 198 - Dynamic information describing the current state of the log. 199 199 * - 0x18 200 - - \_\_be32 201 - - s\_sequence 200 + - __be32 201 + - s_sequence 202 202 - First commit ID expected in log. 203 203 * - 0x1C 204 - - \_\_be32 205 - - s\_start 204 + - __be32 205 + - s_start 206 206 - Block number of the start of log. Contrary to the comments, this field 207 207 being zero does not imply that the journal is clean! 208 208 * - 0x20 209 - - \_\_be32 210 - - s\_errno 211 - - Error value, as set by jbd2\_journal\_abort(). 209 + - __be32 210 + - s_errno 211 + - Error value, as set by jbd2_journal_abort(). 212 212 * - 213 213 - 214 214 - 215 215 - The remaining fields are only valid in a v2 superblock. 216 216 * - 0x24 217 - - \_\_be32 218 - - s\_feature\_compat; 217 + - __be32 218 + - s_feature_compat; 219 219 - Compatible feature set. See the table jbd2_compat_ below. 220 220 * - 0x28 221 - - \_\_be32 222 - - s\_feature\_incompat 221 + - __be32 222 + - s_feature_incompat 223 223 - Incompatible feature set. See the table jbd2_incompat_ below. 224 224 * - 0x2C 225 - - \_\_be32 226 - - s\_feature\_ro\_compat 225 + - __be32 226 + - s_feature_ro_compat 227 227 - Read-only compatible feature set. There aren't any of these currently. 228 228 * - 0x30 229 - - \_\_u8 230 - - s\_uuid[16] 229 + - __u8 230 + - s_uuid[16] 231 231 - 128-bit uuid for journal. This is compared against the copy in the ext4 232 232 super block at mount time. 233 233 * - 0x40 234 - - \_\_be32 235 - - s\_nr\_users 234 + - __be32 235 + - s_nr_users 236 236 - Number of file systems sharing this journal. 237 237 * - 0x44 238 - - \_\_be32 239 - - s\_dynsuper 238 + - __be32 239 + - s_dynsuper 240 240 - Location of dynamic super block copy. (Not used?) 241 241 * - 0x48 242 - - \_\_be32 243 - - s\_max\_transaction 242 + - __be32 243 + - s_max_transaction 244 244 - Limit of journal blocks per transaction. (Not used?) 245 245 * - 0x4C 246 - - \_\_be32 247 - - s\_max\_trans\_data 246 + - __be32 247 + - s_max_trans_data 248 248 - Limit of data blocks per transaction. (Not used?) 249 249 * - 0x50 250 - - \_\_u8 251 - - s\_checksum\_type 250 + - __u8 251 + - s_checksum_type 252 252 - Checksum algorithm used for the journal. See jbd2_checksum_type_ for 253 253 more info. 254 254 * - 0x51 255 - - \_\_u8[3] 256 - - s\_padding2 255 + - __u8[3] 256 + - s_padding2 257 257 - 258 258 * - 0x54 259 - - \_\_be32 260 - - s\_num\_fc\_blocks 259 + - __be32 260 + - s_num_fc_blocks 261 261 - Number of fast commit blocks in the journal. 262 262 * - 0x58 263 - - \_\_u32 264 - - s\_padding[42] 263 + - __u32 264 + - s_padding[42] 265 265 - 266 266 * - 0xFC 267 - - \_\_be32 268 - - s\_checksum 267 + - __be32 268 + - s_checksum 269 269 - Checksum of the entire superblock, with this field set to zero. 270 270 * - 0x100 271 - - \_\_u8 272 - - s\_users[16\*48] 271 + - __u8 272 + - s_users[16*48] 273 273 - ids of all file systems sharing the log. e2fsprogs/Linux don't allow 274 274 shared external journals, but I imagine Lustre (or ocfs2?), which use 275 275 the jbd2 code, might. ··· 286 286 - Description 287 287 * - 0x1 288 288 - Journal maintains checksums on the data blocks. 289 - (JBD2\_FEATURE\_COMPAT\_CHECKSUM) 289 + (JBD2_FEATURE_COMPAT_CHECKSUM) 290 290 291 291 .. _jbd2_incompat: 292 292 ··· 299 299 * - Value 300 300 - Description 301 301 * - 0x1 302 - - Journal has block revocation records. (JBD2\_FEATURE\_INCOMPAT\_REVOKE) 302 + - Journal has block revocation records. (JBD2_FEATURE_INCOMPAT_REVOKE) 303 303 * - 0x2 304 304 - Journal can deal with 64-bit block numbers. 305 - (JBD2\_FEATURE\_INCOMPAT\_64BIT) 305 + (JBD2_FEATURE_INCOMPAT_64BIT) 306 306 * - 0x4 307 - - Journal commits asynchronously. (JBD2\_FEATURE\_INCOMPAT\_ASYNC\_COMMIT) 307 + - Journal commits asynchronously. (JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) 308 308 * - 0x8 309 309 - This journal uses v2 of the checksum on-disk format. Each journal 310 310 metadata block gets its own checksum, and the block tags in the 311 311 descriptor table contain checksums for each of the data blocks in the 312 - journal. (JBD2\_FEATURE\_INCOMPAT\_CSUM\_V2) 312 + journal. (JBD2_FEATURE_INCOMPAT_CSUM_V2) 313 313 * - 0x10 314 314 - This journal uses v3 of the checksum on-disk format. This is the same as 315 315 v2, but the journal block tag size is fixed regardless of the size of 316 - block numbers. (JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3) 316 + block numbers. (JBD2_FEATURE_INCOMPAT_CSUM_V3) 317 317 * - 0x20 318 - - Journal has fast commit blocks. (JBD2\_FEATURE\_INCOMPAT\_FAST\_COMMIT) 318 + - Journal has fast commit blocks. (JBD2_FEATURE_INCOMPAT_FAST_COMMIT) 319 319 320 320 .. _jbd2_checksum_type: 321 321 ··· 355 355 - Name 356 356 - Descriptor 357 357 * - 0x0 358 - - journal\_header\_t 358 + - journal_header_t 359 359 - (open coded) 360 360 - Common block header. 361 361 * - 0xC 362 - - struct journal\_block\_tag\_s 362 + - struct journal_block_tag_s 363 363 - open coded array[] 364 364 - Enough tags either to fill up the block or to describe all the data 365 365 blocks that follow this descriptor block. ··· 367 367 Journal block tags have any of the following formats, depending on which 368 368 journal feature and block tag flags are set. 369 369 370 - If JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3 is set, the journal block tag is 370 + If JBD2_FEATURE_INCOMPAT_CSUM_V3 is set, the journal block tag is 371 371 defined as ``struct journal_block_tag3_s``, which looks like the 372 372 following. The size is 16 or 32 bytes. 373 373 ··· 380 380 - Name 381 381 - Descriptor 382 382 * - 0x0 383 - - \_\_be32 384 - - t\_blocknr 383 + - __be32 384 + - t_blocknr 385 385 - Lower 32-bits of the location of where the corresponding data block 386 386 should end up on disk. 387 387 * - 0x4 388 - - \_\_be32 389 - - t\_flags 388 + - __be32 389 + - t_flags 390 390 - Flags that go with the descriptor. See the table jbd2_tag_flags_ for 391 391 more info. 392 392 * - 0x8 393 - - \_\_be32 394 - - t\_blocknr\_high 393 + - __be32 394 + - t_blocknr_high 395 395 - Upper 32-bits of the location of where the corresponding data block 396 - should end up on disk. This is zero if JBD2\_FEATURE\_INCOMPAT\_64BIT is 396 + should end up on disk. This is zero if JBD2_FEATURE_INCOMPAT_64BIT is 397 397 not enabled. 398 398 * - 0xC 399 - - \_\_be32 400 - - t\_checksum 399 + - __be32 400 + - t_checksum 401 401 - Checksum of the journal UUID, the sequence number, and the data block. 402 402 * - 403 403 - ··· 433 433 * - 0x8 434 434 - This is the last tag in this descriptor block. 435 435 436 - If JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3 is NOT set, the journal block tag 436 + If JBD2_FEATURE_INCOMPAT_CSUM_V3 is NOT set, the journal block tag 437 437 is defined as ``struct journal_block_tag_s``, which looks like the 438 438 following. The size is 8, 12, 24, or 28 bytes: 439 439 ··· 446 446 - Name 447 447 - Descriptor 448 448 * - 0x0 449 - - \_\_be32 450 - - t\_blocknr 449 + - __be32 450 + - t_blocknr 451 451 - Lower 32-bits of the location of where the corresponding data block 452 452 should end up on disk. 453 453 * - 0x4 454 - - \_\_be16 455 - - t\_checksum 454 + - __be16 455 + - t_checksum 456 456 - Checksum of the journal UUID, the sequence number, and the data block. 457 457 Note that only the lower 16 bits are stored. 458 458 * - 0x6 459 - - \_\_be16 460 - - t\_flags 459 + - __be16 460 + - t_flags 461 461 - Flags that go with the descriptor. See the table jbd2_tag_flags_ for 462 462 more info. 463 463 * - ··· 466 466 - This next field is only present if the super block indicates support for 467 467 64-bit block numbers. 468 468 * - 0x8 469 - - \_\_be32 470 - - t\_blocknr\_high 469 + - __be32 470 + - t_blocknr_high 471 471 - Upper 32-bits of the location of where the corresponding data block 472 472 should end up on disk. 473 473 * - ··· 483 483 ``j_uuid`` field in ``struct journal_s``, but only tune2fs touches that 484 484 field. 485 485 486 - If JBD2\_FEATURE\_INCOMPAT\_CSUM\_V2 or 487 - JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3 are set, the end of the block is a 486 + If JBD2_FEATURE_INCOMPAT_CSUM_V2 or 487 + JBD2_FEATURE_INCOMPAT_CSUM_V3 are set, the end of the block is a 488 488 ``struct jbd2_journal_block_tail``, which looks like this: 489 489 490 490 .. list-table:: ··· 496 496 - Name 497 497 - Descriptor 498 498 * - 0x0 499 - - \_\_be32 500 - - t\_checksum 499 + - __be32 500 + - t_checksum 501 501 - Checksum of the journal UUID + the descriptor block, with this field set 502 502 to zero. 503 503 ··· 538 538 - Name 539 539 - Description 540 540 * - 0x0 541 - - journal\_header\_t 542 - - r\_header 541 + - journal_header_t 542 + - r_header 543 543 - Common block header. 544 544 * - 0xC 545 - - \_\_be32 546 - - r\_count 545 + - __be32 546 + - r_count 547 547 - Number of bytes used in this block. 548 548 * - 0x10 549 - - \_\_be32 or \_\_be64 549 + - __be32 or __be64 550 550 - blocks[0] 551 551 - Blocks to revoke. 552 552 553 - After r\_count is a linear array of block numbers that are effectively 553 + After r_count is a linear array of block numbers that are effectively 554 554 revoked by this transaction. The size of each block number is 8 bytes if 555 555 the superblock advertises 64-bit block number support, or 4 bytes 556 556 otherwise. 557 557 558 - If JBD2\_FEATURE\_INCOMPAT\_CSUM\_V2 or 559 - JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3 are set, the end of the revocation 558 + If JBD2_FEATURE_INCOMPAT_CSUM_V2 or 559 + JBD2_FEATURE_INCOMPAT_CSUM_V3 are set, the end of the revocation 560 560 block is a ``struct jbd2_journal_revoke_tail``, which has this format: 561 561 562 562 .. list-table:: ··· 568 568 - Name 569 569 - Description 570 570 * - 0x0 571 - - \_\_be32 572 - - r\_checksum 571 + - __be32 572 + - r_checksum 573 573 - Checksum of the journal UUID + revocation block 574 574 575 575 Commit Block ··· 592 592 - Name 593 593 - Descriptor 594 594 * - 0x0 595 - - journal\_header\_s 595 + - journal_header_s 596 596 - (open coded) 597 597 - Common block header. 598 598 * - 0xC 599 599 - unsigned char 600 - - h\_chksum\_type 600 + - h_chksum_type 601 601 - The type of checksum to use to verify the integrity of the data blocks 602 602 in the transaction. See jbd2_checksum_type_ for more info. 603 603 * - 0xD 604 604 - unsigned char 605 - - h\_chksum\_size 605 + - h_chksum_size 606 606 - The number of bytes used by the checksum. Most likely 4. 607 607 * - 0xE 608 608 - unsigned char 609 - - h\_padding[2] 609 + - h_padding[2] 610 610 - 611 611 * - 0x10 612 - - \_\_be32 613 - - h\_chksum[JBD2\_CHECKSUM\_BYTES] 612 + - __be32 613 + - h_chksum[JBD2_CHECKSUM_BYTES] 614 614 - 32 bytes of space to store checksums. If 615 - JBD2\_FEATURE\_INCOMPAT\_CSUM\_V2 or JBD2\_FEATURE\_INCOMPAT\_CSUM\_V3 615 + JBD2_FEATURE_INCOMPAT_CSUM_V2 or JBD2_FEATURE_INCOMPAT_CSUM_V3 616 616 are set, the first ``__be32`` is the checksum of the journal UUID and 617 617 the entire commit block, with this field zeroed. If 618 - JBD2\_FEATURE\_COMPAT\_CHECKSUM is set, the first ``__be32`` is the 618 + JBD2_FEATURE_COMPAT_CHECKSUM is set, the first ``__be32`` is the 619 619 crc32 of all the blocks already written to the transaction. 620 620 * - 0x30 621 - - \_\_be64 622 - - h\_commit\_sec 621 + - __be64 622 + - h_commit_sec 623 623 - The time that the transaction was committed, in seconds since the epoch. 624 624 * - 0x38 625 - - \_\_be32 626 - - h\_commit\_nsec 625 + - __be32 626 + - h_commit_nsec 627 627 - Nanoseconds component of the above timestamp. 628 628 629 629 Fast commits
+18 -18
Documentation/filesystems/ext4/mmp.rst
··· 7 7 filesystem against multiple hosts trying to use the filesystem 8 8 simultaneously. When a filesystem is opened (for mounting, or fsck, 9 9 etc.), the MMP code running on the node (call it node A) checks a 10 - sequence number. If the sequence number is EXT4\_MMP\_SEQ\_CLEAN, the 11 - open continues. If the sequence number is EXT4\_MMP\_SEQ\_FSCK, then 10 + sequence number. If the sequence number is EXT4_MMP_SEQ_CLEAN, the 11 + open continues. If the sequence number is EXT4_MMP_SEQ_FSCK, then 12 12 fsck is (hopefully) running, and open fails immediately. Otherwise, the 13 13 open code will wait for twice the specified MMP check interval and check 14 14 the sequence number again. If the sequence number has changed, then the ··· 40 40 - Name 41 41 - Description 42 42 * - 0x0 43 - - \_\_le32 44 - - mmp\_magic 43 + - __le32 44 + - mmp_magic 45 45 - Magic number for MMP, 0x004D4D50 (“MMP”). 46 46 * - 0x4 47 - - \_\_le32 48 - - mmp\_seq 47 + - __le32 48 + - mmp_seq 49 49 - Sequence number, updated periodically. 50 50 * - 0x8 51 - - \_\_le64 52 - - mmp\_time 51 + - __le64 52 + - mmp_time 53 53 - Time that the MMP block was last updated. 54 54 * - 0x10 55 55 - char[64] 56 - - mmp\_nodename 56 + - mmp_nodename 57 57 - Hostname of the node that opened the filesystem. 58 58 * - 0x50 59 59 - char[32] 60 - - mmp\_bdevname 60 + - mmp_bdevname 61 61 - Block device name of the filesystem. 62 62 * - 0x70 63 - - \_\_le16 64 - - mmp\_check\_interval 63 + - __le16 64 + - mmp_check_interval 65 65 - The MMP re-check interval, in seconds. 66 66 * - 0x72 67 - - \_\_le16 68 - - mmp\_pad1 67 + - __le16 68 + - mmp_pad1 69 69 - Zero. 70 70 * - 0x74 71 - - \_\_le32[226] 72 - - mmp\_pad2 71 + - __le32[226] 72 + - mmp_pad2 73 73 - Zero. 74 74 * - 0x3FC 75 - - \_\_le32 76 - - mmp\_checksum 75 + - __le32 76 + - mmp_checksum 77 77 - Checksum of the MMP block.
+1 -1
Documentation/filesystems/ext4/overview.rst
··· 7 7 performance difficulties due to fragmentation, the block allocator tries 8 8 very hard to keep each file's blocks within the same group, thereby 9 9 reducing seek times. The size of a block group is specified in 10 - ``sb.s_blocks_per_group`` blocks, though it can also calculated as 8 \* 10 + ``sb.s_blocks_per_group`` blocks, though it can also calculated as 8 * 11 11 ``block_size_in_bytes``. With the default block size of 4KiB, each group 12 12 will contain 32,768 blocks, for a length of 128MiB. The number of block 13 13 groups is the size of the device divided by the size of a block group.
+4 -4
Documentation/filesystems/ext4/special_inodes.rst
··· 34 34 * - 10 35 35 - Replica inode, used for some non-upstream feature? 36 36 * - 11 37 - - Traditional first non-reserved inode. Usually this is the lost+found directory. See s\_first\_ino in the superblock. 37 + - Traditional first non-reserved inode. Usually this is the lost+found directory. See s_first_ino in the superblock. 38 38 39 39 Note that there are also some inodes allocated from non-reserved inode numbers 40 40 for other filesystem features which are not referenced from standard directory ··· 47 47 * - Superblock field 48 48 - Description 49 49 50 - * - s\_lpf\_ino 50 + * - s_lpf_ino 51 51 - Inode number of lost+found directory. 52 - * - s\_prj\_quota\_inum 52 + * - s_prj_quota_inum 53 53 - Inode number of quota file tracking project quotas 54 - * - s\_orphan\_file\_inum 54 + * - s_orphan_file_inum 55 55 - Inode number of file tracking orphan inodes.
+275 -275
Documentation/filesystems/ext4/super.rst
··· 7 7 filesystem, such as block counts, inode counts, supported features, 8 8 maintenance information, and more. 9 9 10 - If the sparse\_super feature flag is set, redundant copies of the 10 + If the sparse_super feature flag is set, redundant copies of the 11 11 superblock and group descriptors are kept only in the groups whose group 12 12 number is either 0 or a power of 3, 5, or 7. If the flag is not set, 13 13 redundant copies are kept in all groups. ··· 27 27 - Name 28 28 - Description 29 29 * - 0x0 30 - - \_\_le32 31 - - s\_inodes\_count 30 + - __le32 31 + - s_inodes_count 32 32 - Total inode count. 33 33 * - 0x4 34 - - \_\_le32 35 - - s\_blocks\_count\_lo 34 + - __le32 35 + - s_blocks_count_lo 36 36 - Total block count. 37 37 * - 0x8 38 - - \_\_le32 39 - - s\_r\_blocks\_count\_lo 38 + - __le32 39 + - s_r_blocks_count_lo 40 40 - This number of blocks can only be allocated by the super-user. 41 41 * - 0xC 42 - - \_\_le32 43 - - s\_free\_blocks\_count\_lo 42 + - __le32 43 + - s_free_blocks_count_lo 44 44 - Free block count. 45 45 * - 0x10 46 - - \_\_le32 47 - - s\_free\_inodes\_count 46 + - __le32 47 + - s_free_inodes_count 48 48 - Free inode count. 49 49 * - 0x14 50 - - \_\_le32 51 - - s\_first\_data\_block 50 + - __le32 51 + - s_first_data_block 52 52 - First data block. This must be at least 1 for 1k-block filesystems and 53 53 is typically 0 for all other block sizes. 54 54 * - 0x18 55 - - \_\_le32 56 - - s\_log\_block\_size 57 - - Block size is 2 ^ (10 + s\_log\_block\_size). 55 + - __le32 56 + - s_log_block_size 57 + - Block size is 2 ^ (10 + s_log_block_size). 58 58 * - 0x1C 59 - - \_\_le32 60 - - s\_log\_cluster\_size 61 - - Cluster size is 2 ^ (10 + s\_log\_cluster\_size) blocks if bigalloc is 62 - enabled. Otherwise s\_log\_cluster\_size must equal s\_log\_block\_size. 59 + - __le32 60 + - s_log_cluster_size 61 + - Cluster size is 2 ^ (10 + s_log_cluster_size) blocks if bigalloc is 62 + enabled. Otherwise s_log_cluster_size must equal s_log_block_size. 63 63 * - 0x20 64 - - \_\_le32 65 - - s\_blocks\_per\_group 64 + - __le32 65 + - s_blocks_per_group 66 66 - Blocks per group. 67 67 * - 0x24 68 - - \_\_le32 69 - - s\_clusters\_per\_group 68 + - __le32 69 + - s_clusters_per_group 70 70 - Clusters per group, if bigalloc is enabled. Otherwise 71 - s\_clusters\_per\_group must equal s\_blocks\_per\_group. 71 + s_clusters_per_group must equal s_blocks_per_group. 72 72 * - 0x28 73 - - \_\_le32 74 - - s\_inodes\_per\_group 73 + - __le32 74 + - s_inodes_per_group 75 75 - Inodes per group. 76 76 * - 0x2C 77 - - \_\_le32 78 - - s\_mtime 77 + - __le32 78 + - s_mtime 79 79 - Mount time, in seconds since the epoch. 80 80 * - 0x30 81 - - \_\_le32 82 - - s\_wtime 81 + - __le32 82 + - s_wtime 83 83 - Write time, in seconds since the epoch. 84 84 * - 0x34 85 - - \_\_le16 86 - - s\_mnt\_count 85 + - __le16 86 + - s_mnt_count 87 87 - Number of mounts since the last fsck. 88 88 * - 0x36 89 - - \_\_le16 90 - - s\_max\_mnt\_count 89 + - __le16 90 + - s_max_mnt_count 91 91 - Number of mounts beyond which a fsck is needed. 92 92 * - 0x38 93 - - \_\_le16 94 - - s\_magic 93 + - __le16 94 + - s_magic 95 95 - Magic signature, 0xEF53 96 96 * - 0x3A 97 - - \_\_le16 98 - - s\_state 97 + - __le16 98 + - s_state 99 99 - File system state. See super_state_ for more info. 100 100 * - 0x3C 101 - - \_\_le16 102 - - s\_errors 101 + - __le16 102 + - s_errors 103 103 - Behaviour when detecting errors. See super_errors_ for more info. 104 104 * - 0x3E 105 - - \_\_le16 106 - - s\_minor\_rev\_level 105 + - __le16 106 + - s_minor_rev_level 107 107 - Minor revision level. 108 108 * - 0x40 109 - - \_\_le32 110 - - s\_lastcheck 109 + - __le32 110 + - s_lastcheck 111 111 - Time of last check, in seconds since the epoch. 112 112 * - 0x44 113 - - \_\_le32 114 - - s\_checkinterval 113 + - __le32 114 + - s_checkinterval 115 115 - Maximum time between checks, in seconds. 116 116 * - 0x48 117 - - \_\_le32 118 - - s\_creator\_os 117 + - __le32 118 + - s_creator_os 119 119 - Creator OS. See the table super_creator_ for more info. 120 120 * - 0x4C 121 - - \_\_le32 122 - - s\_rev\_level 121 + - __le32 122 + - s_rev_level 123 123 - Revision level. See the table super_revision_ for more info. 124 124 * - 0x50 125 - - \_\_le16 126 - - s\_def\_resuid 125 + - __le16 126 + - s_def_resuid 127 127 - Default uid for reserved blocks. 128 128 * - 0x52 129 - - \_\_le16 130 - - s\_def\_resgid 129 + - __le16 130 + - s_def_resgid 131 131 - Default gid for reserved blocks. 132 132 * - 133 133 - ··· 143 143 about a feature in either the compatible or incompatible feature set, it 144 144 must abort and not try to meddle with things it doesn't understand... 145 145 * - 0x54 146 - - \_\_le32 147 - - s\_first\_ino 146 + - __le32 147 + - s_first_ino 148 148 - First non-reserved inode. 149 149 * - 0x58 150 - - \_\_le16 151 - - s\_inode\_size 150 + - __le16 151 + - s_inode_size 152 152 - Size of inode structure, in bytes. 153 153 * - 0x5A 154 - - \_\_le16 155 - - s\_block\_group\_nr 154 + - __le16 155 + - s_block_group_nr 156 156 - Block group # of this superblock. 157 157 * - 0x5C 158 - - \_\_le32 159 - - s\_feature\_compat 158 + - __le32 159 + - s_feature_compat 160 160 - Compatible feature set flags. Kernel can still read/write this fs even 161 161 if it doesn't understand a flag; fsck should not do that. See the 162 162 super_compat_ table for more info. 163 163 * - 0x60 164 - - \_\_le32 165 - - s\_feature\_incompat 164 + - __le32 165 + - s_feature_incompat 166 166 - Incompatible feature set. If the kernel or fsck doesn't understand one 167 167 of these bits, it should stop. See the super_incompat_ table for more 168 168 info. 169 169 * - 0x64 170 - - \_\_le32 171 - - s\_feature\_ro\_compat 170 + - __le32 171 + - s_feature_ro_compat 172 172 - Readonly-compatible feature set. If the kernel doesn't understand one of 173 173 these bits, it can still mount read-only. See the super_rocompat_ table 174 174 for more info. 175 175 * - 0x68 176 - - \_\_u8 177 - - s\_uuid[16] 176 + - __u8 177 + - s_uuid[16] 178 178 - 128-bit UUID for volume. 179 179 * - 0x78 180 180 - char 181 - - s\_volume\_name[16] 181 + - s_volume_name[16] 182 182 - Volume label. 183 183 * - 0x88 184 184 - char 185 - - s\_last\_mounted[64] 185 + - s_last_mounted[64] 186 186 - Directory where filesystem was last mounted. 187 187 * - 0xC8 188 - - \_\_le32 189 - - s\_algorithm\_usage\_bitmap 188 + - __le32 189 + - s_algorithm_usage_bitmap 190 190 - For compression (Not used in e2fsprogs/Linux) 191 191 * - 192 192 - ··· 194 194 - Performance hints. Directory preallocation should only happen if the 195 195 EXT4_FEATURE_COMPAT_DIR_PREALLOC flag is on. 196 196 * - 0xCC 197 - - \_\_u8 198 - - s\_prealloc\_blocks 197 + - __u8 198 + - s_prealloc_blocks 199 199 - #. of blocks to try to preallocate for ... files? (Not used in 200 200 e2fsprogs/Linux) 201 201 * - 0xCD 202 - - \_\_u8 203 - - s\_prealloc\_dir\_blocks 202 + - __u8 203 + - s_prealloc_dir_blocks 204 204 - #. of blocks to preallocate for directories. (Not used in 205 205 e2fsprogs/Linux) 206 206 * - 0xCE 207 - - \_\_le16 208 - - s\_reserved\_gdt\_blocks 207 + - __le16 208 + - s_reserved_gdt_blocks 209 209 - Number of reserved GDT entries for future filesystem expansion. 210 210 * - 211 211 - ··· 213 213 - Journalling support is valid only if EXT4_FEATURE_COMPAT_HAS_JOURNAL is 214 214 set. 215 215 * - 0xD0 216 - - \_\_u8 217 - - s\_journal\_uuid[16] 216 + - __u8 217 + - s_journal_uuid[16] 218 218 - UUID of journal superblock 219 219 * - 0xE0 220 - - \_\_le32 221 - - s\_journal\_inum 220 + - __le32 221 + - s_journal_inum 222 222 - inode number of journal file. 223 223 * - 0xE4 224 - - \_\_le32 225 - - s\_journal\_dev 224 + - __le32 225 + - s_journal_dev 226 226 - Device number of journal file, if the external journal feature flag is 227 227 set. 228 228 * - 0xE8 229 - - \_\_le32 230 - - s\_last\_orphan 229 + - __le32 230 + - s_last_orphan 231 231 - Start of list of orphaned inodes to delete. 232 232 * - 0xEC 233 - - \_\_le32 234 - - s\_hash\_seed[4] 233 + - __le32 234 + - s_hash_seed[4] 235 235 - HTREE hash seed. 236 236 * - 0xFC 237 - - \_\_u8 238 - - s\_def\_hash\_version 237 + - __u8 238 + - s_def_hash_version 239 239 - Default hash algorithm to use for directory hashes. See super_def_hash_ 240 240 for more info. 241 241 * - 0xFD 242 - - \_\_u8 243 - - s\_jnl\_backup\_type 244 - - If this value is 0 or EXT3\_JNL\_BACKUP\_BLOCKS (1), then the 242 + - __u8 243 + - s_jnl_backup_type 244 + - If this value is 0 or EXT3_JNL_BACKUP_BLOCKS (1), then the 245 245 ``s_jnl_blocks`` field contains a duplicate copy of the inode's 246 246 ``i_block[]`` array and ``i_size``. 247 247 * - 0xFE 248 - - \_\_le16 249 - - s\_desc\_size 248 + - __le16 249 + - s_desc_size 250 250 - Size of group descriptors, in bytes, if the 64bit incompat feature flag 251 251 is set. 252 252 * - 0x100 253 - - \_\_le32 254 - - s\_default\_mount\_opts 253 + - __le32 254 + - s_default_mount_opts 255 255 - Default mount options. See the super_mountopts_ table for more info. 256 256 * - 0x104 257 - - \_\_le32 258 - - s\_first\_meta\_bg 259 - - First metablock block group, if the meta\_bg feature is enabled. 257 + - __le32 258 + - s_first_meta_bg 259 + - First metablock block group, if the meta_bg feature is enabled. 260 260 * - 0x108 261 - - \_\_le32 262 - - s\_mkfs\_time 261 + - __le32 262 + - s_mkfs_time 263 263 - When the filesystem was created, in seconds since the epoch. 264 264 * - 0x10C 265 - - \_\_le32 266 - - s\_jnl\_blocks[17] 265 + - __le32 266 + - s_jnl_blocks[17] 267 267 - Backup copy of the journal inode's ``i_block[]`` array in the first 15 268 - elements and i\_size\_high and i\_size in the 16th and 17th elements, 268 + elements and i_size_high and i_size in the 16th and 17th elements, 269 269 respectively. 270 270 * - 271 271 - 272 272 - 273 273 - 64bit support is valid only if EXT4_FEATURE_COMPAT_64BIT is set. 274 274 * - 0x150 275 - - \_\_le32 276 - - s\_blocks\_count\_hi 275 + - __le32 276 + - s_blocks_count_hi 277 277 - High 32-bits of the block count. 278 278 * - 0x154 279 - - \_\_le32 280 - - s\_r\_blocks\_count\_hi 279 + - __le32 280 + - s_r_blocks_count_hi 281 281 - High 32-bits of the reserved block count. 282 282 * - 0x158 283 - - \_\_le32 284 - - s\_free\_blocks\_count\_hi 283 + - __le32 284 + - s_free_blocks_count_hi 285 285 - High 32-bits of the free block count. 286 286 * - 0x15C 287 - - \_\_le16 288 - - s\_min\_extra\_isize 287 + - __le16 288 + - s_min_extra_isize 289 289 - All inodes have at least # bytes. 290 290 * - 0x15E 291 - - \_\_le16 292 - - s\_want\_extra\_isize 291 + - __le16 292 + - s_want_extra_isize 293 293 - New inodes should reserve # bytes. 294 294 * - 0x160 295 - - \_\_le32 296 - - s\_flags 295 + - __le32 296 + - s_flags 297 297 - Miscellaneous flags. See the super_flags_ table for more info. 298 298 * - 0x164 299 - - \_\_le16 300 - - s\_raid\_stride 299 + - __le16 300 + - s_raid_stride 301 301 - RAID stride. This is the number of logical blocks read from or written 302 302 to the disk before moving to the next disk. This affects the placement 303 303 of filesystem metadata, which will hopefully make RAID storage faster. 304 304 * - 0x166 305 - - \_\_le16 306 - - s\_mmp\_interval 305 + - __le16 306 + - s_mmp_interval 307 307 - #. seconds to wait in multi-mount prevention (MMP) checking. In theory, 308 308 MMP is a mechanism to record in the superblock which host and device 309 309 have mounted the filesystem, in order to prevent multiple mounts. This 310 310 feature does not seem to be implemented... 311 311 * - 0x168 312 - - \_\_le64 313 - - s\_mmp\_block 312 + - __le64 313 + - s_mmp_block 314 314 - Block # for multi-mount protection data. 315 315 * - 0x170 316 - - \_\_le32 317 - - s\_raid\_stripe\_width 316 + - __le32 317 + - s_raid_stripe_width 318 318 - RAID stripe width. This is the number of logical blocks read from or 319 319 written to the disk before coming back to the current disk. This is used 320 320 by the block allocator to try to reduce the number of read-modify-write 321 321 operations in a RAID5/6. 322 322 * - 0x174 323 - - \_\_u8 324 - - s\_log\_groups\_per\_flex 323 + - __u8 324 + - s_log_groups_per_flex 325 325 - Size of a flexible block group is 2 ^ ``s_log_groups_per_flex``. 326 326 * - 0x175 327 - - \_\_u8 328 - - s\_checksum\_type 327 + - __u8 328 + - s_checksum_type 329 329 - Metadata checksum algorithm type. The only valid value is 1 (crc32c). 330 330 * - 0x176 331 - - \_\_le16 332 - - s\_reserved\_pad 331 + - __le16 332 + - s_reserved_pad 333 333 - 334 334 * - 0x178 335 - - \_\_le64 336 - - s\_kbytes\_written 335 + - __le64 336 + - s_kbytes_written 337 337 - Number of KiB written to this filesystem over its lifetime. 338 338 * - 0x180 339 - - \_\_le32 340 - - s\_snapshot\_inum 339 + - __le32 340 + - s_snapshot_inum 341 341 - inode number of active snapshot. (Not used in e2fsprogs/Linux.) 342 342 * - 0x184 343 - - \_\_le32 344 - - s\_snapshot\_id 343 + - __le32 344 + - s_snapshot_id 345 345 - Sequential ID of active snapshot. (Not used in e2fsprogs/Linux.) 346 346 * - 0x188 347 - - \_\_le64 348 - - s\_snapshot\_r\_blocks\_count 347 + - __le64 348 + - s_snapshot_r_blocks_count 349 349 - Number of blocks reserved for active snapshot's future use. (Not used in 350 350 e2fsprogs/Linux.) 351 351 * - 0x190 352 - - \_\_le32 353 - - s\_snapshot\_list 352 + - __le32 353 + - s_snapshot_list 354 354 - inode number of the head of the on-disk snapshot list. (Not used in 355 355 e2fsprogs/Linux.) 356 356 * - 0x194 357 - - \_\_le32 358 - - s\_error\_count 357 + - __le32 358 + - s_error_count 359 359 - Number of errors seen. 360 360 * - 0x198 361 - - \_\_le32 362 - - s\_first\_error\_time 361 + - __le32 362 + - s_first_error_time 363 363 - First time an error happened, in seconds since the epoch. 364 364 * - 0x19C 365 - - \_\_le32 366 - - s\_first\_error\_ino 365 + - __le32 366 + - s_first_error_ino 367 367 - inode involved in first error. 368 368 * - 0x1A0 369 - - \_\_le64 370 - - s\_first\_error\_block 369 + - __le64 370 + - s_first_error_block 371 371 - Number of block involved of first error. 372 372 * - 0x1A8 373 - - \_\_u8 374 - - s\_first\_error\_func[32] 373 + - __u8 374 + - s_first_error_func[32] 375 375 - Name of function where the error happened. 376 376 * - 0x1C8 377 - - \_\_le32 378 - - s\_first\_error\_line 377 + - __le32 378 + - s_first_error_line 379 379 - Line number where error happened. 380 380 * - 0x1CC 381 - - \_\_le32 382 - - s\_last\_error\_time 381 + - __le32 382 + - s_last_error_time 383 383 - Time of most recent error, in seconds since the epoch. 384 384 * - 0x1D0 385 - - \_\_le32 386 - - s\_last\_error\_ino 385 + - __le32 386 + - s_last_error_ino 387 387 - inode involved in most recent error. 388 388 * - 0x1D4 389 - - \_\_le32 390 - - s\_last\_error\_line 389 + - __le32 390 + - s_last_error_line 391 391 - Line number where most recent error happened. 392 392 * - 0x1D8 393 - - \_\_le64 394 - - s\_last\_error\_block 393 + - __le64 394 + - s_last_error_block 395 395 - Number of block involved in most recent error. 396 396 * - 0x1E0 397 - - \_\_u8 398 - - s\_last\_error\_func[32] 397 + - __u8 398 + - s_last_error_func[32] 399 399 - Name of function where the most recent error happened. 400 400 * - 0x200 401 - - \_\_u8 402 - - s\_mount\_opts[64] 401 + - __u8 402 + - s_mount_opts[64] 403 403 - ASCIIZ string of mount options. 404 404 * - 0x240 405 - - \_\_le32 406 - - s\_usr\_quota\_inum 405 + - __le32 406 + - s_usr_quota_inum 407 407 - Inode number of user `quota <quota>`__ file. 408 408 * - 0x244 409 - - \_\_le32 410 - - s\_grp\_quota\_inum 409 + - __le32 410 + - s_grp_quota_inum 411 411 - Inode number of group `quota <quota>`__ file. 412 412 * - 0x248 413 - - \_\_le32 414 - - s\_overhead\_blocks 413 + - __le32 414 + - s_overhead_blocks 415 415 - Overhead blocks/clusters in fs. (Huh? This field is always zero, which 416 416 means that the kernel calculates it dynamically.) 417 417 * - 0x24C 418 - - \_\_le32 419 - - s\_backup\_bgs[2] 420 - - Block groups containing superblock backups (if sparse\_super2) 418 + - __le32 419 + - s_backup_bgs[2] 420 + - Block groups containing superblock backups (if sparse_super2) 421 421 * - 0x254 422 - - \_\_u8 423 - - s\_encrypt\_algos[4] 422 + - __u8 423 + - s_encrypt_algos[4] 424 424 - Encryption algorithms in use. There can be up to four algorithms in use 425 425 at any time; valid algorithm codes are given in the super_encrypt_ table 426 426 below. 427 427 * - 0x258 428 - - \_\_u8 429 - - s\_encrypt\_pw\_salt[16] 428 + - __u8 429 + - s_encrypt_pw_salt[16] 430 430 - Salt for the string2key algorithm for encryption. 431 431 * - 0x268 432 - - \_\_le32 433 - - s\_lpf\_ino 432 + - __le32 433 + - s_lpf_ino 434 434 - Inode number of lost+found 435 435 * - 0x26C 436 - - \_\_le32 437 - - s\_prj\_quota\_inum 436 + - __le32 437 + - s_prj_quota_inum 438 438 - Inode that tracks project quotas. 439 439 * - 0x270 440 - - \_\_le32 441 - - s\_checksum\_seed 442 - - Checksum seed used for metadata\_csum calculations. This value is 443 - crc32c(~0, $orig\_fs\_uuid). 440 + - __le32 441 + - s_checksum_seed 442 + - Checksum seed used for metadata_csum calculations. This value is 443 + crc32c(~0, $orig_fs_uuid). 444 444 * - 0x274 445 - - \_\_u8 446 - - s\_wtime_hi 445 + - __u8 446 + - s_wtime_hi 447 447 - Upper 8 bits of the s_wtime field. 448 448 * - 0x275 449 - - \_\_u8 450 - - s\_mtime_hi 449 + - __u8 450 + - s_mtime_hi 451 451 - Upper 8 bits of the s_mtime field. 452 452 * - 0x276 453 - - \_\_u8 454 - - s\_mkfs_time_hi 453 + - __u8 454 + - s_mkfs_time_hi 455 455 - Upper 8 bits of the s_mkfs_time field. 456 456 * - 0x277 457 - - \_\_u8 458 - - s\_lastcheck_hi 457 + - __u8 458 + - s_lastcheck_hi 459 459 - Upper 8 bits of the s_lastcheck_hi field. 460 460 * - 0x278 461 - - \_\_u8 462 - - s\_first_error_time_hi 461 + - __u8 462 + - s_first_error_time_hi 463 463 - Upper 8 bits of the s_first_error_time_hi field. 464 464 * - 0x279 465 - - \_\_u8 466 - - s\_last_error_time_hi 465 + - __u8 466 + - s_last_error_time_hi 467 467 - Upper 8 bits of the s_last_error_time_hi field. 468 468 * - 0x27A 469 - - \_\_u8 470 - - s\_pad[2] 469 + - __u8 470 + - s_pad[2] 471 471 - Zero padding. 472 472 * - 0x27C 473 - - \_\_le16 474 - - s\_encoding 473 + - __le16 474 + - s_encoding 475 475 - Filename charset encoding. 476 476 * - 0x27E 477 - - \_\_le16 478 - - s\_encoding_flags 477 + - __le16 478 + - s_encoding_flags 479 479 - Filename charset encoding flags. 480 480 * - 0x280 481 - - \_\_le32 482 - - s\_orphan\_file\_inum 481 + - __le32 482 + - s_orphan_file_inum 483 483 - Orphan file inode number. 484 484 * - 0x284 485 - - \_\_le32 486 - - s\_reserved[94] 485 + - __le32 486 + - s_reserved[94] 487 487 - Padding to the end of the block. 488 488 * - 0x3FC 489 - - \_\_le32 490 - - s\_checksum 489 + - __le32 490 + - s_checksum 491 491 - Superblock checksum. 492 492 493 493 .. _super_state: ··· 574 574 * - Value 575 575 - Description 576 576 * - 0x1 577 - - Directory preallocation (COMPAT\_DIR\_PREALLOC). 577 + - Directory preallocation (COMPAT_DIR_PREALLOC). 578 578 * - 0x2 579 579 - “imagic inodes”. Not clear from the code what this does 580 - (COMPAT\_IMAGIC\_INODES). 580 + (COMPAT_IMAGIC_INODES). 581 581 * - 0x4 582 - - Has a journal (COMPAT\_HAS\_JOURNAL). 582 + - Has a journal (COMPAT_HAS_JOURNAL). 583 583 * - 0x8 584 - - Supports extended attributes (COMPAT\_EXT\_ATTR). 584 + - Supports extended attributes (COMPAT_EXT_ATTR). 585 585 * - 0x10 586 586 - Has reserved GDT blocks for filesystem expansion 587 - (COMPAT\_RESIZE\_INODE). Requires RO\_COMPAT\_SPARSE\_SUPER. 587 + (COMPAT_RESIZE_INODE). Requires RO_COMPAT_SPARSE_SUPER. 588 588 * - 0x20 589 - - Has directory indices (COMPAT\_DIR\_INDEX). 589 + - Has directory indices (COMPAT_DIR_INDEX). 590 590 * - 0x40 591 591 - “Lazy BG”. Not in Linux kernel, seems to have been for uninitialized 592 - block groups? (COMPAT\_LAZY\_BG) 592 + block groups? (COMPAT_LAZY_BG) 593 593 * - 0x80 594 - - “Exclude inode”. Not used. (COMPAT\_EXCLUDE\_INODE). 594 + - “Exclude inode”. Not used. (COMPAT_EXCLUDE_INODE). 595 595 * - 0x100 596 596 - “Exclude bitmap”. Seems to be used to indicate the presence of 597 597 snapshot-related exclude bitmaps? Not defined in kernel or used in 598 - e2fsprogs (COMPAT\_EXCLUDE\_BITMAP). 598 + e2fsprogs (COMPAT_EXCLUDE_BITMAP). 599 599 * - 0x200 600 - - Sparse Super Block, v2. If this flag is set, the SB field s\_backup\_bgs 600 + - Sparse Super Block, v2. If this flag is set, the SB field s_backup_bgs 601 601 points to the two block groups that contain backup superblocks 602 - (COMPAT\_SPARSE\_SUPER2). 602 + (COMPAT_SPARSE_SUPER2). 603 603 * - 0x400 604 604 - Fast commits supported. Although fast commits blocks are 605 605 backward incompatible, fast commit blocks are not always 606 606 present in the journal. If fast commit blocks are present in 607 607 the journal, JBD2 incompat feature 608 - (JBD2\_FEATURE\_INCOMPAT\_FAST\_COMMIT) gets 609 - set (COMPAT\_FAST\_COMMIT). 608 + (JBD2_FEATURE_INCOMPAT_FAST_COMMIT) gets 609 + set (COMPAT_FAST_COMMIT). 610 610 * - 0x1000 611 611 - Orphan file allocated. This is the special file for more efficient 612 612 tracking of unlinked but still open inodes. When there may be any 613 613 entries in the file, we additionally set proper rocompat feature 614 - (RO\_COMPAT\_ORPHAN\_PRESENT). 614 + (RO_COMPAT_ORPHAN_PRESENT). 615 615 616 616 .. _super_incompat: 617 617 ··· 625 625 * - Value 626 626 - Description 627 627 * - 0x1 628 - - Compression (INCOMPAT\_COMPRESSION). 628 + - Compression (INCOMPAT_COMPRESSION). 629 629 * - 0x2 630 - - Directory entries record the file type. See ext4\_dir\_entry\_2 below 631 - (INCOMPAT\_FILETYPE). 630 + - Directory entries record the file type. See ext4_dir_entry_2 below 631 + (INCOMPAT_FILETYPE). 632 632 * - 0x4 633 - - Filesystem needs recovery (INCOMPAT\_RECOVER). 633 + - Filesystem needs recovery (INCOMPAT_RECOVER). 634 634 * - 0x8 635 - - Filesystem has a separate journal device (INCOMPAT\_JOURNAL\_DEV). 635 + - Filesystem has a separate journal device (INCOMPAT_JOURNAL_DEV). 636 636 * - 0x10 637 637 - Meta block groups. See the earlier discussion of this feature 638 - (INCOMPAT\_META\_BG). 638 + (INCOMPAT_META_BG). 639 639 * - 0x40 640 - - Files in this filesystem use extents (INCOMPAT\_EXTENTS). 640 + - Files in this filesystem use extents (INCOMPAT_EXTENTS). 641 641 * - 0x80 642 - - Enable a filesystem size of 2^64 blocks (INCOMPAT\_64BIT). 642 + - Enable a filesystem size of 2^64 blocks (INCOMPAT_64BIT). 643 643 * - 0x100 644 - - Multiple mount protection (INCOMPAT\_MMP). 644 + - Multiple mount protection (INCOMPAT_MMP). 645 645 * - 0x200 646 646 - Flexible block groups. See the earlier discussion of this feature 647 - (INCOMPAT\_FLEX\_BG). 647 + (INCOMPAT_FLEX_BG). 648 648 * - 0x400 649 649 - Inodes can be used to store large extended attribute values 650 - (INCOMPAT\_EA\_INODE). 650 + (INCOMPAT_EA_INODE). 651 651 * - 0x1000 652 - - Data in directory entry (INCOMPAT\_DIRDATA). (Not implemented?) 652 + - Data in directory entry (INCOMPAT_DIRDATA). (Not implemented?) 653 653 * - 0x2000 654 654 - Metadata checksum seed is stored in the superblock. This feature enables 655 - the administrator to change the UUID of a metadata\_csum filesystem 655 + the administrator to change the UUID of a metadata_csum filesystem 656 656 while the filesystem is mounted; without it, the checksum definition 657 - requires all metadata blocks to be rewritten (INCOMPAT\_CSUM\_SEED). 657 + requires all metadata blocks to be rewritten (INCOMPAT_CSUM_SEED). 658 658 * - 0x4000 659 - - Large directory >2GB or 3-level htree (INCOMPAT\_LARGEDIR). Prior to 659 + - Large directory >2GB or 3-level htree (INCOMPAT_LARGEDIR). Prior to 660 660 this feature, directories could not be larger than 4GiB and could not 661 661 have an htree more than 2 levels deep. If this feature is enabled, 662 662 directories can be larger than 4GiB and have a maximum htree depth of 3. 663 663 * - 0x8000 664 - - Data in inode (INCOMPAT\_INLINE\_DATA). 664 + - Data in inode (INCOMPAT_INLINE_DATA). 665 665 * - 0x10000 666 - - Encrypted inodes are present on the filesystem. (INCOMPAT\_ENCRYPT). 666 + - Encrypted inodes are present on the filesystem. (INCOMPAT_ENCRYPT). 667 667 668 668 .. _super_rocompat: 669 669 ··· 678 678 - Description 679 679 * - 0x1 680 680 - Sparse superblocks. See the earlier discussion of this feature 681 - (RO\_COMPAT\_SPARSE\_SUPER). 681 + (RO_COMPAT_SPARSE_SUPER). 682 682 * - 0x2 683 683 - This filesystem has been used to store a file greater than 2GiB 684 - (RO\_COMPAT\_LARGE\_FILE). 684 + (RO_COMPAT_LARGE_FILE). 685 685 * - 0x4 686 - - Not used in kernel or e2fsprogs (RO\_COMPAT\_BTREE\_DIR). 686 + - Not used in kernel or e2fsprogs (RO_COMPAT_BTREE_DIR). 687 687 * - 0x8 688 688 - This filesystem has files whose sizes are represented in units of 689 689 logical blocks, not 512-byte sectors. This implies a very large file 690 - indeed! (RO\_COMPAT\_HUGE\_FILE) 690 + indeed! (RO_COMPAT_HUGE_FILE) 691 691 * - 0x10 692 692 - Group descriptors have checksums. In addition to detecting corruption, 693 693 this is useful for lazy formatting with uninitialized groups 694 - (RO\_COMPAT\_GDT\_CSUM). 694 + (RO_COMPAT_GDT_CSUM). 695 695 * - 0x20 696 696 - Indicates that the old ext3 32,000 subdirectory limit no longer applies 697 - (RO\_COMPAT\_DIR\_NLINK). A directory's i\_links\_count will be set to 1 697 + (RO_COMPAT_DIR_NLINK). A directory's i_links_count will be set to 1 698 698 if it is incremented past 64,999. 699 699 * - 0x40 700 700 - Indicates that large inodes exist on this filesystem 701 - (RO\_COMPAT\_EXTRA\_ISIZE). 701 + (RO_COMPAT_EXTRA_ISIZE). 702 702 * - 0x80 703 - - This filesystem has a snapshot (RO\_COMPAT\_HAS\_SNAPSHOT). 703 + - This filesystem has a snapshot (RO_COMPAT_HAS_SNAPSHOT). 704 704 * - 0x100 705 - - `Quota <Quota>`__ (RO\_COMPAT\_QUOTA). 705 + - `Quota <Quota>`__ (RO_COMPAT_QUOTA). 706 706 * - 0x200 707 707 - This filesystem supports “bigalloc”, which means that file extents are 708 708 tracked in units of clusters (of blocks) instead of blocks 709 - (RO\_COMPAT\_BIGALLOC). 709 + (RO_COMPAT_BIGALLOC). 710 710 * - 0x400 711 711 - This filesystem supports metadata checksumming. 712 - (RO\_COMPAT\_METADATA\_CSUM; implies RO\_COMPAT\_GDT\_CSUM, though 713 - GDT\_CSUM must not be set) 712 + (RO_COMPAT_METADATA_CSUM; implies RO_COMPAT_GDT_CSUM, though 713 + GDT_CSUM must not be set) 714 714 * - 0x800 715 715 - Filesystem supports replicas. This feature is neither in the kernel nor 716 - e2fsprogs. (RO\_COMPAT\_REPLICA) 716 + e2fsprogs. (RO_COMPAT_REPLICA) 717 717 * - 0x1000 718 718 - Read-only filesystem image; the kernel will not mount this image 719 719 read-write and most tools will refuse to write to the image. 720 - (RO\_COMPAT\_READONLY) 720 + (RO_COMPAT_READONLY) 721 721 * - 0x2000 722 - - Filesystem tracks project quotas. (RO\_COMPAT\_PROJECT) 722 + - Filesystem tracks project quotas. (RO_COMPAT_PROJECT) 723 723 * - 0x8000 724 - - Verity inodes may be present on the filesystem. (RO\_COMPAT\_VERITY) 724 + - Verity inodes may be present on the filesystem. (RO_COMPAT_VERITY) 725 725 * - 0x10000 726 726 - Indicates orphan file may have valid orphan entries and thus we need 727 727 to clean them up when mounting the filesystem 728 - (RO\_COMPAT\_ORPHAN\_PRESENT). 728 + (RO_COMPAT_ORPHAN_PRESENT). 729 729 730 730 .. _super_def_hash: 731 731 ··· 761 761 * - Value 762 762 - Description 763 763 * - 0x0001 764 - - Print debugging info upon (re)mount. (EXT4\_DEFM\_DEBUG) 764 + - Print debugging info upon (re)mount. (EXT4_DEFM_DEBUG) 765 765 * - 0x0002 766 766 - New files take the gid of the containing directory (instead of the fsgid 767 - of the current process). (EXT4\_DEFM\_BSDGROUPS) 767 + of the current process). (EXT4_DEFM_BSDGROUPS) 768 768 * - 0x0004 769 - - Support userspace-provided extended attributes. (EXT4\_DEFM\_XATTR\_USER) 769 + - Support userspace-provided extended attributes. (EXT4_DEFM_XATTR_USER) 770 770 * - 0x0008 771 - - Support POSIX access control lists (ACLs). (EXT4\_DEFM\_ACL) 771 + - Support POSIX access control lists (ACLs). (EXT4_DEFM_ACL) 772 772 * - 0x0010 773 - - Do not support 32-bit UIDs. (EXT4\_DEFM\_UID16) 773 + - Do not support 32-bit UIDs. (EXT4_DEFM_UID16) 774 774 * - 0x0020 775 775 - All data and metadata are commited to the journal. 776 - (EXT4\_DEFM\_JMODE\_DATA) 776 + (EXT4_DEFM_JMODE_DATA) 777 777 * - 0x0040 778 778 - All data are flushed to the disk before metadata are committed to the 779 - journal. (EXT4\_DEFM\_JMODE\_ORDERED) 779 + journal. (EXT4_DEFM_JMODE_ORDERED) 780 780 * - 0x0060 781 781 - Data ordering is not preserved; data may be written after the metadata 782 - has been written. (EXT4\_DEFM\_JMODE\_WBACK) 782 + has been written. (EXT4_DEFM_JMODE_WBACK) 783 783 * - 0x0100 784 - - Disable write flushes. (EXT4\_DEFM\_NOBARRIER) 784 + - Disable write flushes. (EXT4_DEFM_NOBARRIER) 785 785 * - 0x0200 786 786 - Track which blocks in a filesystem are metadata and therefore should not 787 787 be used as data blocks. This option will be enabled by default on 3.18, 788 - hopefully. (EXT4\_DEFM\_BLOCK\_VALIDITY) 788 + hopefully. (EXT4_DEFM_BLOCK_VALIDITY) 789 789 * - 0x0400 790 790 - Enable DISCARD support, where the storage device is told about blocks 791 - becoming unused. (EXT4\_DEFM\_DISCARD) 791 + becoming unused. (EXT4_DEFM_DISCARD) 792 792 * - 0x0800 793 - - Disable delayed allocation. (EXT4\_DEFM\_NODELALLOC) 793 + - Disable delayed allocation. (EXT4_DEFM_NODELALLOC) 794 794 795 795 .. _super_flags: 796 796 ··· 820 820 * - Value 821 821 - Description 822 822 * - 0 823 - - Invalid algorithm (ENCRYPTION\_MODE\_INVALID). 823 + - Invalid algorithm (ENCRYPTION_MODE_INVALID). 824 824 * - 1 825 - - 256-bit AES in XTS mode (ENCRYPTION\_MODE\_AES\_256\_XTS). 825 + - 256-bit AES in XTS mode (ENCRYPTION_MODE_AES_256_XTS). 826 826 * - 2 827 - - 256-bit AES in GCM mode (ENCRYPTION\_MODE\_AES\_256\_GCM). 827 + - 256-bit AES in GCM mode (ENCRYPTION_MODE_AES_256_GCM). 828 828 * - 3 829 - - 256-bit AES in CBC mode (ENCRYPTION\_MODE\_AES\_256\_CBC). 829 + - 256-bit AES in CBC mode (ENCRYPTION_MODE_AES_256_CBC). 830 830 831 831 Total size of the superblock is 1024 bytes.