xref: /openbmc/linux/Documentation/filesystems/ext4/super.rst (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
18a98ec7cSDarrick J. Wong.. SPDX-License-Identifier: GPL-2.0
28a98ec7cSDarrick J. Wong
38a98ec7cSDarrick J. WongSuper Block
48a98ec7cSDarrick J. Wong-----------
58a98ec7cSDarrick J. Wong
68a98ec7cSDarrick J. WongThe superblock records various information about the enclosing
78a98ec7cSDarrick J. Wongfilesystem, such as block counts, inode counts, supported features,
88a98ec7cSDarrick J. Wongmaintenance information, and more.
98a98ec7cSDarrick J. Wong
103103084aSWang JianjianIf the sparse_super feature flag is set, redundant copies of the
118a98ec7cSDarrick J. Wongsuperblock and group descriptors are kept only in the groups whose group
128a98ec7cSDarrick J. Wongnumber is either 0 or a power of 3, 5, or 7. If the flag is not set,
138a98ec7cSDarrick J. Wongredundant copies are kept in all groups.
148a98ec7cSDarrick J. Wong
158a98ec7cSDarrick J. WongThe superblock checksum is calculated against the superblock structure,
168a98ec7cSDarrick J. Wongwhich includes the FS UUID.
178a98ec7cSDarrick J. Wong
188a98ec7cSDarrick J. WongThe ext4 superblock is laid out as follows in
198a98ec7cSDarrick J. Wong``struct ext4_super_block``:
208a98ec7cSDarrick J. Wong
218a98ec7cSDarrick J. Wong.. list-table::
228a98ec7cSDarrick J. Wong   :widths: 8 8 24 40
238a98ec7cSDarrick J. Wong   :header-rows: 1
248a98ec7cSDarrick J. Wong
258a98ec7cSDarrick J. Wong   * - Offset
268a98ec7cSDarrick J. Wong     - Size
278a98ec7cSDarrick J. Wong     - Name
288a98ec7cSDarrick J. Wong     - Description
298a98ec7cSDarrick J. Wong   * - 0x0
303103084aSWang Jianjian     - __le32
313103084aSWang Jianjian     - s_inodes_count
328a98ec7cSDarrick J. Wong     - Total inode count.
338a98ec7cSDarrick J. Wong   * - 0x4
343103084aSWang Jianjian     - __le32
353103084aSWang Jianjian     - s_blocks_count_lo
368a98ec7cSDarrick J. Wong     - Total block count.
378a98ec7cSDarrick J. Wong   * - 0x8
383103084aSWang Jianjian     - __le32
393103084aSWang Jianjian     - s_r_blocks_count_lo
408a98ec7cSDarrick J. Wong     - This number of blocks can only be allocated by the super-user.
418a98ec7cSDarrick J. Wong   * - 0xC
423103084aSWang Jianjian     - __le32
433103084aSWang Jianjian     - s_free_blocks_count_lo
448a98ec7cSDarrick J. Wong     - Free block count.
458a98ec7cSDarrick J. Wong   * - 0x10
463103084aSWang Jianjian     - __le32
473103084aSWang Jianjian     - s_free_inodes_count
488a98ec7cSDarrick J. Wong     - Free inode count.
498a98ec7cSDarrick J. Wong   * - 0x14
503103084aSWang Jianjian     - __le32
513103084aSWang Jianjian     - s_first_data_block
528a98ec7cSDarrick J. Wong     - First data block. This must be at least 1 for 1k-block filesystems and
538a98ec7cSDarrick J. Wong       is typically 0 for all other block sizes.
548a98ec7cSDarrick J. Wong   * - 0x18
553103084aSWang Jianjian     - __le32
563103084aSWang Jianjian     - s_log_block_size
573103084aSWang Jianjian     - Block size is 2 ^ (10 + s_log_block_size).
588a98ec7cSDarrick J. Wong   * - 0x1C
593103084aSWang Jianjian     - __le32
603103084aSWang Jianjian     - s_log_cluster_size
613103084aSWang Jianjian     - Cluster size is 2 ^ (10 + s_log_cluster_size) blocks if bigalloc is
623103084aSWang Jianjian       enabled. Otherwise s_log_cluster_size must equal s_log_block_size.
638a98ec7cSDarrick J. Wong   * - 0x20
643103084aSWang Jianjian     - __le32
653103084aSWang Jianjian     - s_blocks_per_group
668a98ec7cSDarrick J. Wong     - Blocks per group.
678a98ec7cSDarrick J. Wong   * - 0x24
683103084aSWang Jianjian     - __le32
693103084aSWang Jianjian     - s_clusters_per_group
708a98ec7cSDarrick J. Wong     - Clusters per group, if bigalloc is enabled. Otherwise
713103084aSWang Jianjian       s_clusters_per_group must equal s_blocks_per_group.
728a98ec7cSDarrick J. Wong   * - 0x28
733103084aSWang Jianjian     - __le32
743103084aSWang Jianjian     - s_inodes_per_group
758a98ec7cSDarrick J. Wong     - Inodes per group.
768a98ec7cSDarrick J. Wong   * - 0x2C
773103084aSWang Jianjian     - __le32
783103084aSWang Jianjian     - s_mtime
798a98ec7cSDarrick J. Wong     - Mount time, in seconds since the epoch.
808a98ec7cSDarrick J. Wong   * - 0x30
813103084aSWang Jianjian     - __le32
823103084aSWang Jianjian     - s_wtime
838a98ec7cSDarrick J. Wong     - Write time, in seconds since the epoch.
848a98ec7cSDarrick J. Wong   * - 0x34
853103084aSWang Jianjian     - __le16
863103084aSWang Jianjian     - s_mnt_count
878a98ec7cSDarrick J. Wong     - Number of mounts since the last fsck.
888a98ec7cSDarrick J. Wong   * - 0x36
893103084aSWang Jianjian     - __le16
903103084aSWang Jianjian     - s_max_mnt_count
918a98ec7cSDarrick J. Wong     - Number of mounts beyond which a fsck is needed.
928a98ec7cSDarrick J. Wong   * - 0x38
933103084aSWang Jianjian     - __le16
943103084aSWang Jianjian     - s_magic
958a98ec7cSDarrick J. Wong     - Magic signature, 0xEF53
968a98ec7cSDarrick J. Wong   * - 0x3A
973103084aSWang Jianjian     - __le16
983103084aSWang Jianjian     - s_state
998a98ec7cSDarrick J. Wong     - File system state. See super_state_ for more info.
1008a98ec7cSDarrick J. Wong   * - 0x3C
1013103084aSWang Jianjian     - __le16
1023103084aSWang Jianjian     - s_errors
1038a98ec7cSDarrick J. Wong     - Behaviour when detecting errors. See super_errors_ for more info.
1048a98ec7cSDarrick J. Wong   * - 0x3E
1053103084aSWang Jianjian     - __le16
1063103084aSWang Jianjian     - s_minor_rev_level
1078a98ec7cSDarrick J. Wong     - Minor revision level.
1088a98ec7cSDarrick J. Wong   * - 0x40
1093103084aSWang Jianjian     - __le32
1103103084aSWang Jianjian     - s_lastcheck
1118a98ec7cSDarrick J. Wong     - Time of last check, in seconds since the epoch.
1128a98ec7cSDarrick J. Wong   * - 0x44
1133103084aSWang Jianjian     - __le32
1143103084aSWang Jianjian     - s_checkinterval
1158a98ec7cSDarrick J. Wong     - Maximum time between checks, in seconds.
1168a98ec7cSDarrick J. Wong   * - 0x48
1173103084aSWang Jianjian     - __le32
1183103084aSWang Jianjian     - s_creator_os
1198a98ec7cSDarrick J. Wong     - Creator OS. See the table super_creator_ for more info.
1208a98ec7cSDarrick J. Wong   * - 0x4C
1213103084aSWang Jianjian     - __le32
1223103084aSWang Jianjian     - s_rev_level
1238a98ec7cSDarrick J. Wong     - Revision level. See the table super_revision_ for more info.
1248a98ec7cSDarrick J. Wong   * - 0x50
1253103084aSWang Jianjian     - __le16
1263103084aSWang Jianjian     - s_def_resuid
1278a98ec7cSDarrick J. Wong     - Default uid for reserved blocks.
1288a98ec7cSDarrick J. Wong   * - 0x52
1293103084aSWang Jianjian     - __le16
1303103084aSWang Jianjian     - s_def_resgid
1318a98ec7cSDarrick J. Wong     - Default gid for reserved blocks.
1328a98ec7cSDarrick J. Wong   * -
1338a98ec7cSDarrick J. Wong     -
1348a98ec7cSDarrick J. Wong     -
1358a98ec7cSDarrick J. Wong     - These fields are for EXT4_DYNAMIC_REV superblocks only.
1368a98ec7cSDarrick J. Wong
1378a98ec7cSDarrick J. Wong       Note: the difference between the compatible feature set and the
1388a98ec7cSDarrick J. Wong       incompatible feature set is that if there is a bit set in the
1398a98ec7cSDarrick J. Wong       incompatible feature set that the kernel doesn't know about, it should
1408a98ec7cSDarrick J. Wong       refuse to mount the filesystem.
1418a98ec7cSDarrick J. Wong
1428a98ec7cSDarrick J. Wong       e2fsck's requirements are more strict; if it doesn't know
1438a98ec7cSDarrick J. Wong       about a feature in either the compatible or incompatible feature set, it
1448a98ec7cSDarrick J. Wong       must abort and not try to meddle with things it doesn't understand...
1458a98ec7cSDarrick J. Wong   * - 0x54
1463103084aSWang Jianjian     - __le32
1473103084aSWang Jianjian     - s_first_ino
1488a98ec7cSDarrick J. Wong     - First non-reserved inode.
1498a98ec7cSDarrick J. Wong   * - 0x58
1503103084aSWang Jianjian     - __le16
1513103084aSWang Jianjian     - s_inode_size
1528a98ec7cSDarrick J. Wong     - Size of inode structure, in bytes.
1538a98ec7cSDarrick J. Wong   * - 0x5A
1543103084aSWang Jianjian     - __le16
1553103084aSWang Jianjian     - s_block_group_nr
1568a98ec7cSDarrick J. Wong     - Block group # of this superblock.
1578a98ec7cSDarrick J. Wong   * - 0x5C
1583103084aSWang Jianjian     - __le32
1593103084aSWang Jianjian     - s_feature_compat
1608a98ec7cSDarrick J. Wong     - Compatible feature set flags. Kernel can still read/write this fs even
1618a98ec7cSDarrick J. Wong       if it doesn't understand a flag; fsck should not do that. See the
1628a98ec7cSDarrick J. Wong       super_compat_ table for more info.
1638a98ec7cSDarrick J. Wong   * - 0x60
1643103084aSWang Jianjian     - __le32
1653103084aSWang Jianjian     - s_feature_incompat
1668a98ec7cSDarrick J. Wong     - Incompatible feature set. If the kernel or fsck doesn't understand one
1678a98ec7cSDarrick J. Wong       of these bits, it should stop. See the super_incompat_ table for more
1688a98ec7cSDarrick J. Wong       info.
1698a98ec7cSDarrick J. Wong   * - 0x64
1703103084aSWang Jianjian     - __le32
1713103084aSWang Jianjian     - s_feature_ro_compat
1728a98ec7cSDarrick J. Wong     - Readonly-compatible feature set. If the kernel doesn't understand one of
1738a98ec7cSDarrick J. Wong       these bits, it can still mount read-only. See the super_rocompat_ table
1748a98ec7cSDarrick J. Wong       for more info.
1758a98ec7cSDarrick J. Wong   * - 0x68
1763103084aSWang Jianjian     - __u8
1773103084aSWang Jianjian     - s_uuid[16]
1788a98ec7cSDarrick J. Wong     - 128-bit UUID for volume.
1798a98ec7cSDarrick J. Wong   * - 0x78
1808a98ec7cSDarrick J. Wong     - char
1813103084aSWang Jianjian     - s_volume_name[16]
1828a98ec7cSDarrick J. Wong     - Volume label.
1838a98ec7cSDarrick J. Wong   * - 0x88
1848a98ec7cSDarrick J. Wong     - char
1853103084aSWang Jianjian     - s_last_mounted[64]
1868a98ec7cSDarrick J. Wong     - Directory where filesystem was last mounted.
1878a98ec7cSDarrick J. Wong   * - 0xC8
1883103084aSWang Jianjian     - __le32
1893103084aSWang Jianjian     - s_algorithm_usage_bitmap
1908a98ec7cSDarrick J. Wong     - For compression (Not used in e2fsprogs/Linux)
1918a98ec7cSDarrick J. Wong   * -
1928a98ec7cSDarrick J. Wong     -
1938a98ec7cSDarrick J. Wong     -
1948a98ec7cSDarrick J. Wong     - Performance hints.  Directory preallocation should only happen if the
1958a98ec7cSDarrick J. Wong       EXT4_FEATURE_COMPAT_DIR_PREALLOC flag is on.
1968a98ec7cSDarrick J. Wong   * - 0xCC
1973103084aSWang Jianjian     - __u8
1983103084aSWang Jianjian     - s_prealloc_blocks
1998a98ec7cSDarrick J. Wong     - #. of blocks to try to preallocate for ... files? (Not used in
2008a98ec7cSDarrick J. Wong       e2fsprogs/Linux)
2018a98ec7cSDarrick J. Wong   * - 0xCD
2023103084aSWang Jianjian     - __u8
2033103084aSWang Jianjian     - s_prealloc_dir_blocks
2048a98ec7cSDarrick J. Wong     - #. of blocks to preallocate for directories. (Not used in
2058a98ec7cSDarrick J. Wong       e2fsprogs/Linux)
2068a98ec7cSDarrick J. Wong   * - 0xCE
2073103084aSWang Jianjian     - __le16
2083103084aSWang Jianjian     - s_reserved_gdt_blocks
2098a98ec7cSDarrick J. Wong     - Number of reserved GDT entries for future filesystem expansion.
2108a98ec7cSDarrick J. Wong   * -
2118a98ec7cSDarrick J. Wong     -
2128a98ec7cSDarrick J. Wong     -
2138a98ec7cSDarrick J. Wong     - Journalling support is valid only if EXT4_FEATURE_COMPAT_HAS_JOURNAL is
2148a98ec7cSDarrick J. Wong       set.
2158a98ec7cSDarrick J. Wong   * - 0xD0
2163103084aSWang Jianjian     - __u8
2173103084aSWang Jianjian     - s_journal_uuid[16]
2188a98ec7cSDarrick J. Wong     - UUID of journal superblock
2198a98ec7cSDarrick J. Wong   * - 0xE0
2203103084aSWang Jianjian     - __le32
2213103084aSWang Jianjian     - s_journal_inum
2228a98ec7cSDarrick J. Wong     - inode number of journal file.
2238a98ec7cSDarrick J. Wong   * - 0xE4
2243103084aSWang Jianjian     - __le32
2253103084aSWang Jianjian     - s_journal_dev
2268a98ec7cSDarrick J. Wong     - Device number of journal file, if the external journal feature flag is
2278a98ec7cSDarrick J. Wong       set.
2288a98ec7cSDarrick J. Wong   * - 0xE8
2293103084aSWang Jianjian     - __le32
2303103084aSWang Jianjian     - s_last_orphan
2318a98ec7cSDarrick J. Wong     - Start of list of orphaned inodes to delete.
2328a98ec7cSDarrick J. Wong   * - 0xEC
2333103084aSWang Jianjian     - __le32
2343103084aSWang Jianjian     - s_hash_seed[4]
2358a98ec7cSDarrick J. Wong     - HTREE hash seed.
2368a98ec7cSDarrick J. Wong   * - 0xFC
2373103084aSWang Jianjian     - __u8
2383103084aSWang Jianjian     - s_def_hash_version
2398a98ec7cSDarrick J. Wong     - Default hash algorithm to use for directory hashes. See super_def_hash_
2408a98ec7cSDarrick J. Wong       for more info.
2418a98ec7cSDarrick J. Wong   * - 0xFD
2423103084aSWang Jianjian     - __u8
2433103084aSWang Jianjian     - s_jnl_backup_type
2443103084aSWang Jianjian     - If this value is 0 or EXT3_JNL_BACKUP_BLOCKS (1), then the
2458a98ec7cSDarrick J. Wong       ``s_jnl_blocks`` field contains a duplicate copy of the inode's
2468a98ec7cSDarrick J. Wong       ``i_block[]`` array and ``i_size``.
2478a98ec7cSDarrick J. Wong   * - 0xFE
2483103084aSWang Jianjian     - __le16
2493103084aSWang Jianjian     - s_desc_size
2508a98ec7cSDarrick J. Wong     - Size of group descriptors, in bytes, if the 64bit incompat feature flag
2518a98ec7cSDarrick J. Wong       is set.
2528a98ec7cSDarrick J. Wong   * - 0x100
2533103084aSWang Jianjian     - __le32
2543103084aSWang Jianjian     - s_default_mount_opts
2558a98ec7cSDarrick J. Wong     - Default mount options. See the super_mountopts_ table for more info.
2568a98ec7cSDarrick J. Wong   * - 0x104
2573103084aSWang Jianjian     - __le32
2583103084aSWang Jianjian     - s_first_meta_bg
2593103084aSWang Jianjian     - First metablock block group, if the meta_bg feature is enabled.
2608a98ec7cSDarrick J. Wong   * - 0x108
2613103084aSWang Jianjian     - __le32
2623103084aSWang Jianjian     - s_mkfs_time
2638a98ec7cSDarrick J. Wong     - When the filesystem was created, in seconds since the epoch.
2648a98ec7cSDarrick J. Wong   * - 0x10C
2653103084aSWang Jianjian     - __le32
2663103084aSWang Jianjian     - s_jnl_blocks[17]
2678a98ec7cSDarrick J. Wong     - Backup copy of the journal inode's ``i_block[]`` array in the first 15
2683103084aSWang Jianjian       elements and i_size_high and i_size in the 16th and 17th elements,
2698a98ec7cSDarrick J. Wong       respectively.
2708a98ec7cSDarrick J. Wong   * -
2718a98ec7cSDarrick J. Wong     -
2728a98ec7cSDarrick J. Wong     -
2738a98ec7cSDarrick J. Wong     - 64bit support is valid only if EXT4_FEATURE_COMPAT_64BIT is set.
2748a98ec7cSDarrick J. Wong   * - 0x150
2753103084aSWang Jianjian     - __le32
2763103084aSWang Jianjian     - s_blocks_count_hi
2778a98ec7cSDarrick J. Wong     - High 32-bits of the block count.
2788a98ec7cSDarrick J. Wong   * - 0x154
2793103084aSWang Jianjian     - __le32
2803103084aSWang Jianjian     - s_r_blocks_count_hi
2818a98ec7cSDarrick J. Wong     - High 32-bits of the reserved block count.
2828a98ec7cSDarrick J. Wong   * - 0x158
2833103084aSWang Jianjian     - __le32
2843103084aSWang Jianjian     - s_free_blocks_count_hi
2858a98ec7cSDarrick J. Wong     - High 32-bits of the free block count.
2868a98ec7cSDarrick J. Wong   * - 0x15C
2873103084aSWang Jianjian     - __le16
2883103084aSWang Jianjian     - s_min_extra_isize
2898a98ec7cSDarrick J. Wong     - All inodes have at least # bytes.
2908a98ec7cSDarrick J. Wong   * - 0x15E
2913103084aSWang Jianjian     - __le16
2923103084aSWang Jianjian     - s_want_extra_isize
2938a98ec7cSDarrick J. Wong     - New inodes should reserve # bytes.
2948a98ec7cSDarrick J. Wong   * - 0x160
2953103084aSWang Jianjian     - __le32
2963103084aSWang Jianjian     - s_flags
2978a98ec7cSDarrick J. Wong     - Miscellaneous flags. See the super_flags_ table for more info.
2988a98ec7cSDarrick J. Wong   * - 0x164
2993103084aSWang Jianjian     - __le16
3003103084aSWang Jianjian     - s_raid_stride
3018a98ec7cSDarrick J. Wong     - RAID stride. This is the number of logical blocks read from or written
3028a98ec7cSDarrick J. Wong       to the disk before moving to the next disk. This affects the placement
3038a98ec7cSDarrick J. Wong       of filesystem metadata, which will hopefully make RAID storage faster.
3048a98ec7cSDarrick J. Wong   * - 0x166
3053103084aSWang Jianjian     - __le16
3063103084aSWang Jianjian     - s_mmp_interval
3078a98ec7cSDarrick J. Wong     - #. seconds to wait in multi-mount prevention (MMP) checking. In theory,
3088a98ec7cSDarrick J. Wong       MMP is a mechanism to record in the superblock which host and device
3098a98ec7cSDarrick J. Wong       have mounted the filesystem, in order to prevent multiple mounts. This
3108a98ec7cSDarrick J. Wong       feature does not seem to be implemented...
3118a98ec7cSDarrick J. Wong   * - 0x168
3123103084aSWang Jianjian     - __le64
3133103084aSWang Jianjian     - s_mmp_block
3148a98ec7cSDarrick J. Wong     - Block # for multi-mount protection data.
3158a98ec7cSDarrick J. Wong   * - 0x170
3163103084aSWang Jianjian     - __le32
3173103084aSWang Jianjian     - s_raid_stripe_width
3188a98ec7cSDarrick J. Wong     - RAID stripe width. This is the number of logical blocks read from or
3198a98ec7cSDarrick J. Wong       written to the disk before coming back to the current disk. This is used
3208a98ec7cSDarrick J. Wong       by the block allocator to try to reduce the number of read-modify-write
3218a98ec7cSDarrick J. Wong       operations in a RAID5/6.
3228a98ec7cSDarrick J. Wong   * - 0x174
3233103084aSWang Jianjian     - __u8
3243103084aSWang Jianjian     - s_log_groups_per_flex
3258a98ec7cSDarrick J. Wong     - Size of a flexible block group is 2 ^ ``s_log_groups_per_flex``.
3268a98ec7cSDarrick J. Wong   * - 0x175
3273103084aSWang Jianjian     - __u8
3283103084aSWang Jianjian     - s_checksum_type
3298a98ec7cSDarrick J. Wong     - Metadata checksum algorithm type. The only valid value is 1 (crc32c).
3308a98ec7cSDarrick J. Wong   * - 0x176
3313103084aSWang Jianjian     - __le16
3323103084aSWang Jianjian     - s_reserved_pad
3338a98ec7cSDarrick J. Wong     -
3348a98ec7cSDarrick J. Wong   * - 0x178
3353103084aSWang Jianjian     - __le64
3363103084aSWang Jianjian     - s_kbytes_written
3378a98ec7cSDarrick J. Wong     - Number of KiB written to this filesystem over its lifetime.
3388a98ec7cSDarrick J. Wong   * - 0x180
3393103084aSWang Jianjian     - __le32
3403103084aSWang Jianjian     - s_snapshot_inum
3418a98ec7cSDarrick J. Wong     - inode number of active snapshot. (Not used in e2fsprogs/Linux.)
3428a98ec7cSDarrick J. Wong   * - 0x184
3433103084aSWang Jianjian     - __le32
3443103084aSWang Jianjian     - s_snapshot_id
3458a98ec7cSDarrick J. Wong     - Sequential ID of active snapshot. (Not used in e2fsprogs/Linux.)
3468a98ec7cSDarrick J. Wong   * - 0x188
3473103084aSWang Jianjian     - __le64
3483103084aSWang Jianjian     - s_snapshot_r_blocks_count
3498a98ec7cSDarrick J. Wong     - Number of blocks reserved for active snapshot's future use. (Not used in
3508a98ec7cSDarrick J. Wong       e2fsprogs/Linux.)
3518a98ec7cSDarrick J. Wong   * - 0x190
3523103084aSWang Jianjian     - __le32
3533103084aSWang Jianjian     - s_snapshot_list
3548a98ec7cSDarrick J. Wong     - inode number of the head of the on-disk snapshot list. (Not used in
3558a98ec7cSDarrick J. Wong       e2fsprogs/Linux.)
3568a98ec7cSDarrick J. Wong   * - 0x194
3573103084aSWang Jianjian     - __le32
3583103084aSWang Jianjian     - s_error_count
3598a98ec7cSDarrick J. Wong     - Number of errors seen.
3608a98ec7cSDarrick J. Wong   * - 0x198
3613103084aSWang Jianjian     - __le32
3623103084aSWang Jianjian     - s_first_error_time
3638a98ec7cSDarrick J. Wong     - First time an error happened, in seconds since the epoch.
3648a98ec7cSDarrick J. Wong   * - 0x19C
3653103084aSWang Jianjian     - __le32
3663103084aSWang Jianjian     - s_first_error_ino
3678a98ec7cSDarrick J. Wong     - inode involved in first error.
3688a98ec7cSDarrick J. Wong   * - 0x1A0
3693103084aSWang Jianjian     - __le64
3703103084aSWang Jianjian     - s_first_error_block
3718a98ec7cSDarrick J. Wong     - Number of block involved of first error.
3728a98ec7cSDarrick J. Wong   * - 0x1A8
3733103084aSWang Jianjian     - __u8
3743103084aSWang Jianjian     - s_first_error_func[32]
3758a98ec7cSDarrick J. Wong     - Name of function where the error happened.
3768a98ec7cSDarrick J. Wong   * - 0x1C8
3773103084aSWang Jianjian     - __le32
3783103084aSWang Jianjian     - s_first_error_line
3798a98ec7cSDarrick J. Wong     - Line number where error happened.
3808a98ec7cSDarrick J. Wong   * - 0x1CC
3813103084aSWang Jianjian     - __le32
3823103084aSWang Jianjian     - s_last_error_time
3838a98ec7cSDarrick J. Wong     - Time of most recent error, in seconds since the epoch.
3848a98ec7cSDarrick J. Wong   * - 0x1D0
3853103084aSWang Jianjian     - __le32
3863103084aSWang Jianjian     - s_last_error_ino
3878a98ec7cSDarrick J. Wong     - inode involved in most recent error.
3888a98ec7cSDarrick J. Wong   * - 0x1D4
3893103084aSWang Jianjian     - __le32
3903103084aSWang Jianjian     - s_last_error_line
3918a98ec7cSDarrick J. Wong     - Line number where most recent error happened.
3928a98ec7cSDarrick J. Wong   * - 0x1D8
3933103084aSWang Jianjian     - __le64
3943103084aSWang Jianjian     - s_last_error_block
3958a98ec7cSDarrick J. Wong     - Number of block involved in most recent error.
3968a98ec7cSDarrick J. Wong   * - 0x1E0
3973103084aSWang Jianjian     - __u8
3983103084aSWang Jianjian     - s_last_error_func[32]
3998a98ec7cSDarrick J. Wong     - Name of function where the most recent error happened.
4008a98ec7cSDarrick J. Wong   * - 0x200
4013103084aSWang Jianjian     - __u8
4023103084aSWang Jianjian     - s_mount_opts[64]
4038a98ec7cSDarrick J. Wong     - ASCIIZ string of mount options.
4048a98ec7cSDarrick J. Wong   * - 0x240
4053103084aSWang Jianjian     - __le32
4063103084aSWang Jianjian     - s_usr_quota_inum
4078a98ec7cSDarrick J. Wong     - Inode number of user `quota <quota>`__ file.
4088a98ec7cSDarrick J. Wong   * - 0x244
4093103084aSWang Jianjian     - __le32
4103103084aSWang Jianjian     - s_grp_quota_inum
4118a98ec7cSDarrick J. Wong     - Inode number of group `quota <quota>`__ file.
4128a98ec7cSDarrick J. Wong   * - 0x248
4133103084aSWang Jianjian     - __le32
4143103084aSWang Jianjian     - s_overhead_blocks
4158a98ec7cSDarrick J. Wong     - Overhead blocks/clusters in fs. (Huh? This field is always zero, which
4168a98ec7cSDarrick J. Wong       means that the kernel calculates it dynamically.)
4178a98ec7cSDarrick J. Wong   * - 0x24C
4183103084aSWang Jianjian     - __le32
4193103084aSWang Jianjian     - s_backup_bgs[2]
4203103084aSWang Jianjian     - Block groups containing superblock backups (if sparse_super2)
4218a98ec7cSDarrick J. Wong   * - 0x254
4223103084aSWang Jianjian     - __u8
4233103084aSWang Jianjian     - s_encrypt_algos[4]
4248a98ec7cSDarrick J. Wong     - Encryption algorithms in use. There can be up to four algorithms in use
4258a98ec7cSDarrick J. Wong       at any time; valid algorithm codes are given in the super_encrypt_ table
4268a98ec7cSDarrick J. Wong       below.
4278a98ec7cSDarrick J. Wong   * - 0x258
4283103084aSWang Jianjian     - __u8
4293103084aSWang Jianjian     - s_encrypt_pw_salt[16]
4308a98ec7cSDarrick J. Wong     - Salt for the string2key algorithm for encryption.
4318a98ec7cSDarrick J. Wong   * - 0x268
4323103084aSWang Jianjian     - __le32
4333103084aSWang Jianjian     - s_lpf_ino
4348a98ec7cSDarrick J. Wong     - Inode number of lost+found
4358a98ec7cSDarrick J. Wong   * - 0x26C
4363103084aSWang Jianjian     - __le32
4373103084aSWang Jianjian     - s_prj_quota_inum
4388a98ec7cSDarrick J. Wong     - Inode that tracks project quotas.
4398a98ec7cSDarrick J. Wong   * - 0x270
4403103084aSWang Jianjian     - __le32
4413103084aSWang Jianjian     - s_checksum_seed
4423103084aSWang Jianjian     - Checksum seed used for metadata_csum calculations. This value is
4433103084aSWang Jianjian       crc32c(~0, $orig_fs_uuid).
4448a98ec7cSDarrick J. Wong   * - 0x274
4453103084aSWang Jianjian     - __u8
4463103084aSWang Jianjian     - s_wtime_hi
4478a98ec7cSDarrick J. Wong     - Upper 8 bits of the s_wtime field.
4488a98ec7cSDarrick J. Wong   * - 0x275
4493103084aSWang Jianjian     - __u8
4503103084aSWang Jianjian     - s_mtime_hi
4518a98ec7cSDarrick J. Wong     - Upper 8 bits of the s_mtime field.
4528a98ec7cSDarrick J. Wong   * - 0x276
4533103084aSWang Jianjian     - __u8
4543103084aSWang Jianjian     - s_mkfs_time_hi
4558a98ec7cSDarrick J. Wong     - Upper 8 bits of the s_mkfs_time field.
4568a98ec7cSDarrick J. Wong   * - 0x277
4573103084aSWang Jianjian     - __u8
4583103084aSWang Jianjian     - s_lastcheck_hi
4596cf3116dSJunChao Sun     - Upper 8 bits of the s_lastcheck field.
4608a98ec7cSDarrick J. Wong   * - 0x278
4613103084aSWang Jianjian     - __u8
4623103084aSWang Jianjian     - s_first_error_time_hi
4636cf3116dSJunChao Sun     - Upper 8 bits of the s_first_error_time field.
4648a98ec7cSDarrick J. Wong   * - 0x279
4653103084aSWang Jianjian     - __u8
4663103084aSWang Jianjian     - s_last_error_time_hi
4676cf3116dSJunChao Sun     - Upper 8 bits of the s_last_error_time field.
4688a98ec7cSDarrick J. Wong   * - 0x27A
4693103084aSWang Jianjian     - __u8
4703103084aSWang Jianjian     - s_pad[2]
4718a98ec7cSDarrick J. Wong     - Zero padding.
4728a98ec7cSDarrick J. Wong   * - 0x27C
4733103084aSWang Jianjian     - __le16
4743103084aSWang Jianjian     - s_encoding
475219db95bSAyush Ranjan     - Filename charset encoding.
476219db95bSAyush Ranjan   * - 0x27E
4773103084aSWang Jianjian     - __le16
4783103084aSWang Jianjian     - s_encoding_flags
479219db95bSAyush Ranjan     - Filename charset encoding flags.
480219db95bSAyush Ranjan   * - 0x280
4813103084aSWang Jianjian     - __le32
4823103084aSWang Jianjian     - s_orphan_file_inum
4833a6541e9SJan Kara     - Orphan file inode number.
4843a6541e9SJan Kara   * - 0x284
4853103084aSWang Jianjian     - __le32
4863103084aSWang Jianjian     - s_reserved[94]
4878a98ec7cSDarrick J. Wong     - Padding to the end of the block.
4888a98ec7cSDarrick J. Wong   * - 0x3FC
4893103084aSWang Jianjian     - __le32
4903103084aSWang Jianjian     - s_checksum
4918a98ec7cSDarrick J. Wong     - Superblock checksum.
4928a98ec7cSDarrick J. Wong
4938a98ec7cSDarrick J. Wong.. _super_state:
4948a98ec7cSDarrick J. Wong
4958a98ec7cSDarrick J. WongThe superblock state is some combination of the following:
4968a98ec7cSDarrick J. Wong
4978a98ec7cSDarrick J. Wong.. list-table::
4988a98ec7cSDarrick J. Wong   :widths: 8 72
4998a98ec7cSDarrick J. Wong   :header-rows: 1
5008a98ec7cSDarrick J. Wong
5018a98ec7cSDarrick J. Wong   * - Value
5028a98ec7cSDarrick J. Wong     - Description
5038a98ec7cSDarrick J. Wong   * - 0x0001
5048a98ec7cSDarrick J. Wong     - Cleanly umounted
5058a98ec7cSDarrick J. Wong   * - 0x0002
5068a98ec7cSDarrick J. Wong     - Errors detected
5078a98ec7cSDarrick J. Wong   * - 0x0004
5088a98ec7cSDarrick J. Wong     - Orphans being recovered
5098a98ec7cSDarrick J. Wong
5108a98ec7cSDarrick J. Wong.. _super_errors:
5118a98ec7cSDarrick J. Wong
5128a98ec7cSDarrick J. WongThe superblock error policy is one of the following:
5138a98ec7cSDarrick J. Wong
5148a98ec7cSDarrick J. Wong.. list-table::
5158a98ec7cSDarrick J. Wong   :widths: 8 72
5168a98ec7cSDarrick J. Wong   :header-rows: 1
5178a98ec7cSDarrick J. Wong
5188a98ec7cSDarrick J. Wong   * - Value
5198a98ec7cSDarrick J. Wong     - Description
5208a98ec7cSDarrick J. Wong   * - 1
5218a98ec7cSDarrick J. Wong     - Continue
5228a98ec7cSDarrick J. Wong   * - 2
5238a98ec7cSDarrick J. Wong     - Remount read-only
5248a98ec7cSDarrick J. Wong   * - 3
5258a98ec7cSDarrick J. Wong     - Panic
5268a98ec7cSDarrick J. Wong
5278a98ec7cSDarrick J. Wong.. _super_creator:
5288a98ec7cSDarrick J. Wong
5298a98ec7cSDarrick J. WongThe filesystem creator is one of the following:
5308a98ec7cSDarrick J. Wong
5318a98ec7cSDarrick J. Wong.. list-table::
5328a98ec7cSDarrick J. Wong   :widths: 8 72
5338a98ec7cSDarrick J. Wong   :header-rows: 1
5348a98ec7cSDarrick J. Wong
5358a98ec7cSDarrick J. Wong   * - Value
5368a98ec7cSDarrick J. Wong     - Description
5378a98ec7cSDarrick J. Wong   * - 0
5388a98ec7cSDarrick J. Wong     - Linux
5398a98ec7cSDarrick J. Wong   * - 1
5408a98ec7cSDarrick J. Wong     - Hurd
5418a98ec7cSDarrick J. Wong   * - 2
5428a98ec7cSDarrick J. Wong     - Masix
5438a98ec7cSDarrick J. Wong   * - 3
5448a98ec7cSDarrick J. Wong     - FreeBSD
5458a98ec7cSDarrick J. Wong   * - 4
5468a98ec7cSDarrick J. Wong     - Lites
5478a98ec7cSDarrick J. Wong
5488a98ec7cSDarrick J. Wong.. _super_revision:
5498a98ec7cSDarrick J. Wong
5508a98ec7cSDarrick J. WongThe superblock revision is one of the following:
5518a98ec7cSDarrick J. Wong
5528a98ec7cSDarrick J. Wong.. list-table::
5538a98ec7cSDarrick J. Wong   :widths: 8 72
5548a98ec7cSDarrick J. Wong   :header-rows: 1
5558a98ec7cSDarrick J. Wong
5568a98ec7cSDarrick J. Wong   * - Value
5578a98ec7cSDarrick J. Wong     - Description
5588a98ec7cSDarrick J. Wong   * - 0
5598a98ec7cSDarrick J. Wong     - Original format
5608a98ec7cSDarrick J. Wong   * - 1
5618a98ec7cSDarrick J. Wong     - v2 format w/ dynamic inode sizes
5628a98ec7cSDarrick J. Wong
5638a98ec7cSDarrick J. WongNote that ``EXT4_DYNAMIC_REV`` refers to a revision 1 or newer filesystem.
5648a98ec7cSDarrick J. Wong
5658a98ec7cSDarrick J. Wong.. _super_compat:
5668a98ec7cSDarrick J. Wong
5678a98ec7cSDarrick J. WongThe superblock compatible features field is a combination of any of the
5688a98ec7cSDarrick J. Wongfollowing:
5698a98ec7cSDarrick J. Wong
5708a98ec7cSDarrick J. Wong.. list-table::
5718a98ec7cSDarrick J. Wong   :widths: 16 64
5728a98ec7cSDarrick J. Wong   :header-rows: 1
5738a98ec7cSDarrick J. Wong
5748a98ec7cSDarrick J. Wong   * - Value
5758a98ec7cSDarrick J. Wong     - Description
5768a98ec7cSDarrick J. Wong   * - 0x1
5773103084aSWang Jianjian     - Directory preallocation (COMPAT_DIR_PREALLOC).
5788a98ec7cSDarrick J. Wong   * - 0x2
5798a98ec7cSDarrick J. Wong     - “imagic inodes”. Not clear from the code what this does
5803103084aSWang Jianjian       (COMPAT_IMAGIC_INODES).
5818a98ec7cSDarrick J. Wong   * - 0x4
5823103084aSWang Jianjian     - Has a journal (COMPAT_HAS_JOURNAL).
5838a98ec7cSDarrick J. Wong   * - 0x8
5843103084aSWang Jianjian     - Supports extended attributes (COMPAT_EXT_ATTR).
5858a98ec7cSDarrick J. Wong   * - 0x10
5868a98ec7cSDarrick J. Wong     - Has reserved GDT blocks for filesystem expansion
5873103084aSWang Jianjian       (COMPAT_RESIZE_INODE). Requires RO_COMPAT_SPARSE_SUPER.
5888a98ec7cSDarrick J. Wong   * - 0x20
5893103084aSWang Jianjian     - Has directory indices (COMPAT_DIR_INDEX).
5908a98ec7cSDarrick J. Wong   * - 0x40
5918a98ec7cSDarrick J. Wong     - “Lazy BG”. Not in Linux kernel, seems to have been for uninitialized
5923103084aSWang Jianjian       block groups? (COMPAT_LAZY_BG)
5938a98ec7cSDarrick J. Wong   * - 0x80
5943103084aSWang Jianjian     - “Exclude inode”. Not used. (COMPAT_EXCLUDE_INODE).
5958a98ec7cSDarrick J. Wong   * - 0x100
5968a98ec7cSDarrick J. Wong     - “Exclude bitmap”. Seems to be used to indicate the presence of
5978a98ec7cSDarrick J. Wong       snapshot-related exclude bitmaps? Not defined in kernel or used in
5983103084aSWang Jianjian       e2fsprogs (COMPAT_EXCLUDE_BITMAP).
5998a98ec7cSDarrick J. Wong   * - 0x200
6003103084aSWang Jianjian     - Sparse Super Block, v2. If this flag is set, the SB field s_backup_bgs
6018a98ec7cSDarrick J. Wong       points to the two block groups that contain backup superblocks
6023103084aSWang Jianjian       (COMPAT_SPARSE_SUPER2).
603a44ad683SHarshad Shirwadkar   * - 0x400
604a44ad683SHarshad Shirwadkar     - Fast commits supported. Although fast commits blocks are
605a44ad683SHarshad Shirwadkar       backward incompatible, fast commit blocks are not always
606a44ad683SHarshad Shirwadkar       present in the journal. If fast commit blocks are present in
607a44ad683SHarshad Shirwadkar       the journal, JBD2 incompat feature
6083103084aSWang Jianjian       (JBD2_FEATURE_INCOMPAT_FAST_COMMIT) gets
6093103084aSWang Jianjian       set (COMPAT_FAST_COMMIT).
6103a6541e9SJan Kara   * - 0x1000
6113a6541e9SJan Kara     - Orphan file allocated. This is the special file for more efficient
6123a6541e9SJan Kara       tracking of unlinked but still open inodes. When there may be any
6133a6541e9SJan Kara       entries in the file, we additionally set proper rocompat feature
6143103084aSWang Jianjian       (RO_COMPAT_ORPHAN_PRESENT).
6158a98ec7cSDarrick J. Wong
6168a98ec7cSDarrick J. Wong.. _super_incompat:
6178a98ec7cSDarrick J. Wong
6188a98ec7cSDarrick J. WongThe superblock incompatible features field is a combination of any of the
6198a98ec7cSDarrick J. Wongfollowing:
6208a98ec7cSDarrick J. Wong
6218a98ec7cSDarrick J. Wong.. list-table::
6228a98ec7cSDarrick J. Wong   :widths: 16 64
6238a98ec7cSDarrick J. Wong   :header-rows: 1
6248a98ec7cSDarrick J. Wong
6258a98ec7cSDarrick J. Wong   * - Value
6268a98ec7cSDarrick J. Wong     - Description
6278a98ec7cSDarrick J. Wong   * - 0x1
6283103084aSWang Jianjian     - Compression (INCOMPAT_COMPRESSION).
6298a98ec7cSDarrick J. Wong   * - 0x2
6303103084aSWang Jianjian     - Directory entries record the file type. See ext4_dir_entry_2 below
6313103084aSWang Jianjian       (INCOMPAT_FILETYPE).
6328a98ec7cSDarrick J. Wong   * - 0x4
6333103084aSWang Jianjian     - Filesystem needs recovery (INCOMPAT_RECOVER).
6348a98ec7cSDarrick J. Wong   * - 0x8
6353103084aSWang Jianjian     - Filesystem has a separate journal device (INCOMPAT_JOURNAL_DEV).
6368a98ec7cSDarrick J. Wong   * - 0x10
6378a98ec7cSDarrick J. Wong     - Meta block groups. See the earlier discussion of this feature
6383103084aSWang Jianjian       (INCOMPAT_META_BG).
6398a98ec7cSDarrick J. Wong   * - 0x40
6403103084aSWang Jianjian     - Files in this filesystem use extents (INCOMPAT_EXTENTS).
6418a98ec7cSDarrick J. Wong   * - 0x80
6423103084aSWang Jianjian     - Enable a filesystem size of 2^64 blocks (INCOMPAT_64BIT).
6438a98ec7cSDarrick J. Wong   * - 0x100
6443103084aSWang Jianjian     - Multiple mount protection (INCOMPAT_MMP).
6458a98ec7cSDarrick J. Wong   * - 0x200
6468a98ec7cSDarrick J. Wong     - Flexible block groups. See the earlier discussion of this feature
6473103084aSWang Jianjian       (INCOMPAT_FLEX_BG).
6488a98ec7cSDarrick J. Wong   * - 0x400
6498a98ec7cSDarrick J. Wong     - Inodes can be used to store large extended attribute values
6503103084aSWang Jianjian       (INCOMPAT_EA_INODE).
6518a98ec7cSDarrick J. Wong   * - 0x1000
6523103084aSWang Jianjian     - Data in directory entry (INCOMPAT_DIRDATA). (Not implemented?)
6538a98ec7cSDarrick J. Wong   * - 0x2000
6548a98ec7cSDarrick J. Wong     - Metadata checksum seed is stored in the superblock. This feature enables
6553103084aSWang Jianjian       the administrator to change the UUID of a metadata_csum filesystem
6568a98ec7cSDarrick J. Wong       while the filesystem is mounted; without it, the checksum definition
6573103084aSWang Jianjian       requires all metadata blocks to be rewritten (INCOMPAT_CSUM_SEED).
6588a98ec7cSDarrick J. Wong   * - 0x4000
6593103084aSWang Jianjian     - Large directory >2GB or 3-level htree (INCOMPAT_LARGEDIR). Prior to
6608a98ec7cSDarrick J. Wong       this feature, directories could not be larger than 4GiB and could not
6618a98ec7cSDarrick J. Wong       have an htree more than 2 levels deep. If this feature is enabled,
6628a98ec7cSDarrick J. Wong       directories can be larger than 4GiB and have a maximum htree depth of 3.
6638a98ec7cSDarrick J. Wong   * - 0x8000
6643103084aSWang Jianjian     - Data in inode (INCOMPAT_INLINE_DATA).
6658a98ec7cSDarrick J. Wong   * - 0x10000
6663103084aSWang Jianjian     - Encrypted inodes are present on the filesystem. (INCOMPAT_ENCRYPT).
6678a98ec7cSDarrick J. Wong
6688a98ec7cSDarrick J. Wong.. _super_rocompat:
6698a98ec7cSDarrick J. Wong
6708a98ec7cSDarrick J. WongThe superblock read-only compatible features field is a combination of any of
6718a98ec7cSDarrick J. Wongthe following:
6728a98ec7cSDarrick J. Wong
6738a98ec7cSDarrick J. Wong.. list-table::
6748a98ec7cSDarrick J. Wong   :widths: 16 64
6758a98ec7cSDarrick J. Wong   :header-rows: 1
6768a98ec7cSDarrick J. Wong
6778a98ec7cSDarrick J. Wong   * - Value
6788a98ec7cSDarrick J. Wong     - Description
6798a98ec7cSDarrick J. Wong   * - 0x1
6808a98ec7cSDarrick J. Wong     - Sparse superblocks. See the earlier discussion of this feature
6813103084aSWang Jianjian       (RO_COMPAT_SPARSE_SUPER).
6828a98ec7cSDarrick J. Wong   * - 0x2
6838a98ec7cSDarrick J. Wong     - This filesystem has been used to store a file greater than 2GiB
6843103084aSWang Jianjian       (RO_COMPAT_LARGE_FILE).
6858a98ec7cSDarrick J. Wong   * - 0x4
6863103084aSWang Jianjian     - Not used in kernel or e2fsprogs (RO_COMPAT_BTREE_DIR).
6878a98ec7cSDarrick J. Wong   * - 0x8
6888a98ec7cSDarrick J. Wong     - This filesystem has files whose sizes are represented in units of
6898a98ec7cSDarrick J. Wong       logical blocks, not 512-byte sectors. This implies a very large file
6903103084aSWang Jianjian       indeed! (RO_COMPAT_HUGE_FILE)
6918a98ec7cSDarrick J. Wong   * - 0x10
6928a98ec7cSDarrick J. Wong     - Group descriptors have checksums. In addition to detecting corruption,
6938a98ec7cSDarrick J. Wong       this is useful for lazy formatting with uninitialized groups
6943103084aSWang Jianjian       (RO_COMPAT_GDT_CSUM).
6958a98ec7cSDarrick J. Wong   * - 0x20
6968a98ec7cSDarrick J. Wong     - Indicates that the old ext3 32,000 subdirectory limit no longer applies
6973103084aSWang Jianjian       (RO_COMPAT_DIR_NLINK). A directory's i_links_count will be set to 1
6988a98ec7cSDarrick J. Wong       if it is incremented past 64,999.
6998a98ec7cSDarrick J. Wong   * - 0x40
7008a98ec7cSDarrick J. Wong     - Indicates that large inodes exist on this filesystem
7013103084aSWang Jianjian       (RO_COMPAT_EXTRA_ISIZE).
7028a98ec7cSDarrick J. Wong   * - 0x80
7033103084aSWang Jianjian     - This filesystem has a snapshot (RO_COMPAT_HAS_SNAPSHOT).
7048a98ec7cSDarrick J. Wong   * - 0x100
7053103084aSWang Jianjian     - `Quota <Quota>`__ (RO_COMPAT_QUOTA).
7068a98ec7cSDarrick J. Wong   * - 0x200
7078a98ec7cSDarrick J. Wong     - This filesystem supports “bigalloc”, which means that file extents are
7088a98ec7cSDarrick J. Wong       tracked in units of clusters (of blocks) instead of blocks
7093103084aSWang Jianjian       (RO_COMPAT_BIGALLOC).
7108a98ec7cSDarrick J. Wong   * - 0x400
7118a98ec7cSDarrick J. Wong     - This filesystem supports metadata checksumming.
7123103084aSWang Jianjian       (RO_COMPAT_METADATA_CSUM; implies RO_COMPAT_GDT_CSUM, though
7133103084aSWang Jianjian       GDT_CSUM must not be set)
7148a98ec7cSDarrick J. Wong   * - 0x800
7158a98ec7cSDarrick J. Wong     - Filesystem supports replicas. This feature is neither in the kernel nor
7163103084aSWang Jianjian       e2fsprogs. (RO_COMPAT_REPLICA)
7178a98ec7cSDarrick J. Wong   * - 0x1000
7188a98ec7cSDarrick J. Wong     - Read-only filesystem image; the kernel will not mount this image
7198a98ec7cSDarrick J. Wong       read-write and most tools will refuse to write to the image.
7203103084aSWang Jianjian       (RO_COMPAT_READONLY)
7218a98ec7cSDarrick J. Wong   * - 0x2000
7223103084aSWang Jianjian     - Filesystem tracks project quotas. (RO_COMPAT_PROJECT)
72384fb7ca4SEric Biggers   * - 0x8000
7243103084aSWang Jianjian     - Verity inodes may be present on the filesystem. (RO_COMPAT_VERITY)
7253a6541e9SJan Kara   * - 0x10000
7263a6541e9SJan Kara     - Indicates orphan file may have valid orphan entries and thus we need
7273a6541e9SJan Kara       to clean them up when mounting the filesystem
7283103084aSWang Jianjian       (RO_COMPAT_ORPHAN_PRESENT).
7298a98ec7cSDarrick J. Wong
7308a98ec7cSDarrick J. Wong.. _super_def_hash:
7318a98ec7cSDarrick J. Wong
7328a98ec7cSDarrick J. WongThe ``s_def_hash_version`` field is one of the following:
7338a98ec7cSDarrick J. Wong
7348a98ec7cSDarrick J. Wong.. list-table::
7358a98ec7cSDarrick J. Wong   :widths: 8 72
7368a98ec7cSDarrick J. Wong   :header-rows: 1
7378a98ec7cSDarrick J. Wong
7388a98ec7cSDarrick J. Wong   * - Value
7398a98ec7cSDarrick J. Wong     - Description
7408a98ec7cSDarrick J. Wong   * - 0x0
7418a98ec7cSDarrick J. Wong     - Legacy.
7428a98ec7cSDarrick J. Wong   * - 0x1
7438a98ec7cSDarrick J. Wong     - Half MD4.
7448a98ec7cSDarrick J. Wong   * - 0x2
7458a98ec7cSDarrick J. Wong     - Tea.
7468a98ec7cSDarrick J. Wong   * - 0x3
7478a98ec7cSDarrick J. Wong     - Legacy, unsigned.
7488a98ec7cSDarrick J. Wong   * - 0x4
7498a98ec7cSDarrick J. Wong     - Half MD4, unsigned.
7508a98ec7cSDarrick J. Wong   * - 0x5
7518a98ec7cSDarrick J. Wong     - Tea, unsigned.
7528a98ec7cSDarrick J. Wong
7538a98ec7cSDarrick J. Wong.. _super_mountopts:
7548a98ec7cSDarrick J. Wong
7558a98ec7cSDarrick J. WongThe ``s_default_mount_opts`` field is any combination of the following:
7568a98ec7cSDarrick J. Wong
7578a98ec7cSDarrick J. Wong.. list-table::
7588a98ec7cSDarrick J. Wong   :widths: 8 72
7598a98ec7cSDarrick J. Wong   :header-rows: 1
7608a98ec7cSDarrick J. Wong
7618a98ec7cSDarrick J. Wong   * - Value
7628a98ec7cSDarrick J. Wong     - Description
7638a98ec7cSDarrick J. Wong   * - 0x0001
7643103084aSWang Jianjian     - Print debugging info upon (re)mount. (EXT4_DEFM_DEBUG)
7658a98ec7cSDarrick J. Wong   * - 0x0002
7668a98ec7cSDarrick J. Wong     - New files take the gid of the containing directory (instead of the fsgid
7673103084aSWang Jianjian       of the current process). (EXT4_DEFM_BSDGROUPS)
7688a98ec7cSDarrick J. Wong   * - 0x0004
7693103084aSWang Jianjian     - Support userspace-provided extended attributes. (EXT4_DEFM_XATTR_USER)
7708a98ec7cSDarrick J. Wong   * - 0x0008
7713103084aSWang Jianjian     - Support POSIX access control lists (ACLs). (EXT4_DEFM_ACL)
7728a98ec7cSDarrick J. Wong   * - 0x0010
7733103084aSWang Jianjian     - Do not support 32-bit UIDs. (EXT4_DEFM_UID16)
7748a98ec7cSDarrick J. Wong   * - 0x0020
775*d56b699dSBjorn Helgaas     - All data and metadata are committed to the journal.
7763103084aSWang Jianjian       (EXT4_DEFM_JMODE_DATA)
7778a98ec7cSDarrick J. Wong   * - 0x0040
7788a98ec7cSDarrick J. Wong     - All data are flushed to the disk before metadata are committed to the
7793103084aSWang Jianjian       journal. (EXT4_DEFM_JMODE_ORDERED)
7808a98ec7cSDarrick J. Wong   * - 0x0060
7818a98ec7cSDarrick J. Wong     - Data ordering is not preserved; data may be written after the metadata
7823103084aSWang Jianjian       has been written. (EXT4_DEFM_JMODE_WBACK)
7838a98ec7cSDarrick J. Wong   * - 0x0100
7843103084aSWang Jianjian     - Disable write flushes. (EXT4_DEFM_NOBARRIER)
7858a98ec7cSDarrick J. Wong   * - 0x0200
7868a98ec7cSDarrick J. Wong     - Track which blocks in a filesystem are metadata and therefore should not
7878a98ec7cSDarrick J. Wong       be used as data blocks. This option will be enabled by default on 3.18,
7883103084aSWang Jianjian       hopefully. (EXT4_DEFM_BLOCK_VALIDITY)
7898a98ec7cSDarrick J. Wong   * - 0x0400
7908a98ec7cSDarrick J. Wong     - Enable DISCARD support, where the storage device is told about blocks
7913103084aSWang Jianjian       becoming unused. (EXT4_DEFM_DISCARD)
7928a98ec7cSDarrick J. Wong   * - 0x0800
7933103084aSWang Jianjian     - Disable delayed allocation. (EXT4_DEFM_NODELALLOC)
7948a98ec7cSDarrick J. Wong
7958a98ec7cSDarrick J. Wong.. _super_flags:
7968a98ec7cSDarrick J. Wong
7978a98ec7cSDarrick J. WongThe ``s_flags`` field is any combination of the following:
7988a98ec7cSDarrick J. Wong
7998a98ec7cSDarrick J. Wong.. list-table::
8008a98ec7cSDarrick J. Wong   :widths: 8 72
8018a98ec7cSDarrick J. Wong   :header-rows: 1
8028a98ec7cSDarrick J. Wong
8038a98ec7cSDarrick J. Wong   * - Value
8048a98ec7cSDarrick J. Wong     - Description
8058a98ec7cSDarrick J. Wong   * - 0x0001
8068a98ec7cSDarrick J. Wong     - Signed directory hash in use.
8078a98ec7cSDarrick J. Wong   * - 0x0002
8088a98ec7cSDarrick J. Wong     - Unsigned directory hash in use.
8098a98ec7cSDarrick J. Wong   * - 0x0004
8108a98ec7cSDarrick J. Wong     - To test development code.
8118a98ec7cSDarrick J. Wong
8128a98ec7cSDarrick J. Wong.. _super_encrypt:
8138a98ec7cSDarrick J. Wong
8148a98ec7cSDarrick J. WongThe ``s_encrypt_algos`` list can contain any of the following:
8158a98ec7cSDarrick J. Wong
8168a98ec7cSDarrick J. Wong.. list-table::
8178a98ec7cSDarrick J. Wong   :widths: 8 72
8188a98ec7cSDarrick J. Wong   :header-rows: 1
8198a98ec7cSDarrick J. Wong
8208a98ec7cSDarrick J. Wong   * - Value
8218a98ec7cSDarrick J. Wong     - Description
8228a98ec7cSDarrick J. Wong   * - 0
8233103084aSWang Jianjian     - Invalid algorithm (ENCRYPTION_MODE_INVALID).
8248a98ec7cSDarrick J. Wong   * - 1
8253103084aSWang Jianjian     - 256-bit AES in XTS mode (ENCRYPTION_MODE_AES_256_XTS).
8268a98ec7cSDarrick J. Wong   * - 2
8273103084aSWang Jianjian     - 256-bit AES in GCM mode (ENCRYPTION_MODE_AES_256_GCM).
8288a98ec7cSDarrick J. Wong   * - 3
8293103084aSWang Jianjian     - 256-bit AES in CBC mode (ENCRYPTION_MODE_AES_256_CBC).
8308a98ec7cSDarrick J. Wong
8318a98ec7cSDarrick J. WongTotal size of the superblock is 1024 bytes.
832