0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 Super Block
0004 -----------
0005
0006 The superblock records various information about the enclosing
0007 filesystem, such as block counts, inode counts, supported features,
0008 maintenance information, and more.
0009
0010 If the sparse_super feature flag is set, redundant copies of the
0011 superblock and group descriptors are kept only in the groups whose group
0012 number is either 0 or a power of 3, 5, or 7. If the flag is not set,
0013 redundant copies are kept in all groups.
0014
0015 The superblock checksum is calculated against the superblock structure,
0016 which includes the FS UUID.
0017
0018 The ext4 superblock is laid out as follows in
0019 ``struct ext4_super_block``:
0020
0021 .. list-table::
0022 :widths: 8 8 24 40
0023 :header-rows: 1
0024
0025 * - Offset
0026 - Size
0027 - Name
0028 - Description
0029 * - 0x0
0030 - __le32
0031 - s_inodes_count
0032 - Total inode count.
0033 * - 0x4
0034 - __le32
0035 - s_blocks_count_lo
0036 - Total block count.
0037 * - 0x8
0038 - __le32
0039 - s_r_blocks_count_lo
0040 - This number of blocks can only be allocated by the super-user.
0041 * - 0xC
0042 - __le32
0043 - s_free_blocks_count_lo
0044 - Free block count.
0045 * - 0x10
0046 - __le32
0047 - s_free_inodes_count
0048 - Free inode count.
0049 * - 0x14
0050 - __le32
0051 - s_first_data_block
0052 - First data block. This must be at least 1 for 1k-block filesystems and
0053 is typically 0 for all other block sizes.
0054 * - 0x18
0055 - __le32
0056 - s_log_block_size
0057 - Block size is 2 ^ (10 + s_log_block_size).
0058 * - 0x1C
0059 - __le32
0060 - s_log_cluster_size
0061 - Cluster size is 2 ^ (10 + s_log_cluster_size) blocks if bigalloc is
0062 enabled. Otherwise s_log_cluster_size must equal s_log_block_size.
0063 * - 0x20
0064 - __le32
0065 - s_blocks_per_group
0066 - Blocks per group.
0067 * - 0x24
0068 - __le32
0069 - s_clusters_per_group
0070 - Clusters per group, if bigalloc is enabled. Otherwise
0071 s_clusters_per_group must equal s_blocks_per_group.
0072 * - 0x28
0073 - __le32
0074 - s_inodes_per_group
0075 - Inodes per group.
0076 * - 0x2C
0077 - __le32
0078 - s_mtime
0079 - Mount time, in seconds since the epoch.
0080 * - 0x30
0081 - __le32
0082 - s_wtime
0083 - Write time, in seconds since the epoch.
0084 * - 0x34
0085 - __le16
0086 - s_mnt_count
0087 - Number of mounts since the last fsck.
0088 * - 0x36
0089 - __le16
0090 - s_max_mnt_count
0091 - Number of mounts beyond which a fsck is needed.
0092 * - 0x38
0093 - __le16
0094 - s_magic
0095 - Magic signature, 0xEF53
0096 * - 0x3A
0097 - __le16
0098 - s_state
0099 - File system state. See super_state_ for more info.
0100 * - 0x3C
0101 - __le16
0102 - s_errors
0103 - Behaviour when detecting errors. See super_errors_ for more info.
0104 * - 0x3E
0105 - __le16
0106 - s_minor_rev_level
0107 - Minor revision level.
0108 * - 0x40
0109 - __le32
0110 - s_lastcheck
0111 - Time of last check, in seconds since the epoch.
0112 * - 0x44
0113 - __le32
0114 - s_checkinterval
0115 - Maximum time between checks, in seconds.
0116 * - 0x48
0117 - __le32
0118 - s_creator_os
0119 - Creator OS. See the table super_creator_ for more info.
0120 * - 0x4C
0121 - __le32
0122 - s_rev_level
0123 - Revision level. See the table super_revision_ for more info.
0124 * - 0x50
0125 - __le16
0126 - s_def_resuid
0127 - Default uid for reserved blocks.
0128 * - 0x52
0129 - __le16
0130 - s_def_resgid
0131 - Default gid for reserved blocks.
0132 * -
0133 -
0134 -
0135 - These fields are for EXT4_DYNAMIC_REV superblocks only.
0136
0137 Note: the difference between the compatible feature set and the
0138 incompatible feature set is that if there is a bit set in the
0139 incompatible feature set that the kernel doesn't know about, it should
0140 refuse to mount the filesystem.
0141
0142 e2fsck's requirements are more strict; if it doesn't know
0143 about a feature in either the compatible or incompatible feature set, it
0144 must abort and not try to meddle with things it doesn't understand...
0145 * - 0x54
0146 - __le32
0147 - s_first_ino
0148 - First non-reserved inode.
0149 * - 0x58
0150 - __le16
0151 - s_inode_size
0152 - Size of inode structure, in bytes.
0153 * - 0x5A
0154 - __le16
0155 - s_block_group_nr
0156 - Block group # of this superblock.
0157 * - 0x5C
0158 - __le32
0159 - s_feature_compat
0160 - Compatible feature set flags. Kernel can still read/write this fs even
0161 if it doesn't understand a flag; fsck should not do that. See the
0162 super_compat_ table for more info.
0163 * - 0x60
0164 - __le32
0165 - s_feature_incompat
0166 - Incompatible feature set. If the kernel or fsck doesn't understand one
0167 of these bits, it should stop. See the super_incompat_ table for more
0168 info.
0169 * - 0x64
0170 - __le32
0171 - s_feature_ro_compat
0172 - Readonly-compatible feature set. If the kernel doesn't understand one of
0173 these bits, it can still mount read-only. See the super_rocompat_ table
0174 for more info.
0175 * - 0x68
0176 - __u8
0177 - s_uuid[16]
0178 - 128-bit UUID for volume.
0179 * - 0x78
0180 - char
0181 - s_volume_name[16]
0182 - Volume label.
0183 * - 0x88
0184 - char
0185 - s_last_mounted[64]
0186 - Directory where filesystem was last mounted.
0187 * - 0xC8
0188 - __le32
0189 - s_algorithm_usage_bitmap
0190 - For compression (Not used in e2fsprogs/Linux)
0191 * -
0192 -
0193 -
0194 - Performance hints. Directory preallocation should only happen if the
0195 EXT4_FEATURE_COMPAT_DIR_PREALLOC flag is on.
0196 * - 0xCC
0197 - __u8
0198 - s_prealloc_blocks
0199 - #. of blocks to try to preallocate for ... files? (Not used in
0200 e2fsprogs/Linux)
0201 * - 0xCD
0202 - __u8
0203 - s_prealloc_dir_blocks
0204 - #. of blocks to preallocate for directories. (Not used in
0205 e2fsprogs/Linux)
0206 * - 0xCE
0207 - __le16
0208 - s_reserved_gdt_blocks
0209 - Number of reserved GDT entries for future filesystem expansion.
0210 * -
0211 -
0212 -
0213 - Journalling support is valid only if EXT4_FEATURE_COMPAT_HAS_JOURNAL is
0214 set.
0215 * - 0xD0
0216 - __u8
0217 - s_journal_uuid[16]
0218 - UUID of journal superblock
0219 * - 0xE0
0220 - __le32
0221 - s_journal_inum
0222 - inode number of journal file.
0223 * - 0xE4
0224 - __le32
0225 - s_journal_dev
0226 - Device number of journal file, if the external journal feature flag is
0227 set.
0228 * - 0xE8
0229 - __le32
0230 - s_last_orphan
0231 - Start of list of orphaned inodes to delete.
0232 * - 0xEC
0233 - __le32
0234 - s_hash_seed[4]
0235 - HTREE hash seed.
0236 * - 0xFC
0237 - __u8
0238 - s_def_hash_version
0239 - Default hash algorithm to use for directory hashes. See super_def_hash_
0240 for more info.
0241 * - 0xFD
0242 - __u8
0243 - s_jnl_backup_type
0244 - If this value is 0 or EXT3_JNL_BACKUP_BLOCKS (1), then the
0245 ``s_jnl_blocks`` field contains a duplicate copy of the inode's
0246 ``i_block[]`` array and ``i_size``.
0247 * - 0xFE
0248 - __le16
0249 - s_desc_size
0250 - Size of group descriptors, in bytes, if the 64bit incompat feature flag
0251 is set.
0252 * - 0x100
0253 - __le32
0254 - s_default_mount_opts
0255 - Default mount options. See the super_mountopts_ table for more info.
0256 * - 0x104
0257 - __le32
0258 - s_first_meta_bg
0259 - First metablock block group, if the meta_bg feature is enabled.
0260 * - 0x108
0261 - __le32
0262 - s_mkfs_time
0263 - When the filesystem was created, in seconds since the epoch.
0264 * - 0x10C
0265 - __le32
0266 - s_jnl_blocks[17]
0267 - Backup copy of the journal inode's ``i_block[]`` array in the first 15
0268 elements and i_size_high and i_size in the 16th and 17th elements,
0269 respectively.
0270 * -
0271 -
0272 -
0273 - 64bit support is valid only if EXT4_FEATURE_COMPAT_64BIT is set.
0274 * - 0x150
0275 - __le32
0276 - s_blocks_count_hi
0277 - High 32-bits of the block count.
0278 * - 0x154
0279 - __le32
0280 - s_r_blocks_count_hi
0281 - High 32-bits of the reserved block count.
0282 * - 0x158
0283 - __le32
0284 - s_free_blocks_count_hi
0285 - High 32-bits of the free block count.
0286 * - 0x15C
0287 - __le16
0288 - s_min_extra_isize
0289 - All inodes have at least # bytes.
0290 * - 0x15E
0291 - __le16
0292 - s_want_extra_isize
0293 - New inodes should reserve # bytes.
0294 * - 0x160
0295 - __le32
0296 - s_flags
0297 - Miscellaneous flags. See the super_flags_ table for more info.
0298 * - 0x164
0299 - __le16
0300 - s_raid_stride
0301 - RAID stride. This is the number of logical blocks read from or written
0302 to the disk before moving to the next disk. This affects the placement
0303 of filesystem metadata, which will hopefully make RAID storage faster.
0304 * - 0x166
0305 - __le16
0306 - s_mmp_interval
0307 - #. seconds to wait in multi-mount prevention (MMP) checking. In theory,
0308 MMP is a mechanism to record in the superblock which host and device
0309 have mounted the filesystem, in order to prevent multiple mounts. This
0310 feature does not seem to be implemented...
0311 * - 0x168
0312 - __le64
0313 - s_mmp_block
0314 - Block # for multi-mount protection data.
0315 * - 0x170
0316 - __le32
0317 - s_raid_stripe_width
0318 - RAID stripe width. This is the number of logical blocks read from or
0319 written to the disk before coming back to the current disk. This is used
0320 by the block allocator to try to reduce the number of read-modify-write
0321 operations in a RAID5/6.
0322 * - 0x174
0323 - __u8
0324 - s_log_groups_per_flex
0325 - Size of a flexible block group is 2 ^ ``s_log_groups_per_flex``.
0326 * - 0x175
0327 - __u8
0328 - s_checksum_type
0329 - Metadata checksum algorithm type. The only valid value is 1 (crc32c).
0330 * - 0x176
0331 - __le16
0332 - s_reserved_pad
0333 -
0334 * - 0x178
0335 - __le64
0336 - s_kbytes_written
0337 - Number of KiB written to this filesystem over its lifetime.
0338 * - 0x180
0339 - __le32
0340 - s_snapshot_inum
0341 - inode number of active snapshot. (Not used in e2fsprogs/Linux.)
0342 * - 0x184
0343 - __le32
0344 - s_snapshot_id
0345 - Sequential ID of active snapshot. (Not used in e2fsprogs/Linux.)
0346 * - 0x188
0347 - __le64
0348 - s_snapshot_r_blocks_count
0349 - Number of blocks reserved for active snapshot's future use. (Not used in
0350 e2fsprogs/Linux.)
0351 * - 0x190
0352 - __le32
0353 - s_snapshot_list
0354 - inode number of the head of the on-disk snapshot list. (Not used in
0355 e2fsprogs/Linux.)
0356 * - 0x194
0357 - __le32
0358 - s_error_count
0359 - Number of errors seen.
0360 * - 0x198
0361 - __le32
0362 - s_first_error_time
0363 - First time an error happened, in seconds since the epoch.
0364 * - 0x19C
0365 - __le32
0366 - s_first_error_ino
0367 - inode involved in first error.
0368 * - 0x1A0
0369 - __le64
0370 - s_first_error_block
0371 - Number of block involved of first error.
0372 * - 0x1A8
0373 - __u8
0374 - s_first_error_func[32]
0375 - Name of function where the error happened.
0376 * - 0x1C8
0377 - __le32
0378 - s_first_error_line
0379 - Line number where error happened.
0380 * - 0x1CC
0381 - __le32
0382 - s_last_error_time
0383 - Time of most recent error, in seconds since the epoch.
0384 * - 0x1D0
0385 - __le32
0386 - s_last_error_ino
0387 - inode involved in most recent error.
0388 * - 0x1D4
0389 - __le32
0390 - s_last_error_line
0391 - Line number where most recent error happened.
0392 * - 0x1D8
0393 - __le64
0394 - s_last_error_block
0395 - Number of block involved in most recent error.
0396 * - 0x1E0
0397 - __u8
0398 - s_last_error_func[32]
0399 - Name of function where the most recent error happened.
0400 * - 0x200
0401 - __u8
0402 - s_mount_opts[64]
0403 - ASCIIZ string of mount options.
0404 * - 0x240
0405 - __le32
0406 - s_usr_quota_inum
0407 - Inode number of user `quota <quota>`__ file.
0408 * - 0x244
0409 - __le32
0410 - s_grp_quota_inum
0411 - Inode number of group `quota <quota>`__ file.
0412 * - 0x248
0413 - __le32
0414 - s_overhead_blocks
0415 - Overhead blocks/clusters in fs. (Huh? This field is always zero, which
0416 means that the kernel calculates it dynamically.)
0417 * - 0x24C
0418 - __le32
0419 - s_backup_bgs[2]
0420 - Block groups containing superblock backups (if sparse_super2)
0421 * - 0x254
0422 - __u8
0423 - s_encrypt_algos[4]
0424 - Encryption algorithms in use. There can be up to four algorithms in use
0425 at any time; valid algorithm codes are given in the super_encrypt_ table
0426 below.
0427 * - 0x258
0428 - __u8
0429 - s_encrypt_pw_salt[16]
0430 - Salt for the string2key algorithm for encryption.
0431 * - 0x268
0432 - __le32
0433 - s_lpf_ino
0434 - Inode number of lost+found
0435 * - 0x26C
0436 - __le32
0437 - s_prj_quota_inum
0438 - Inode that tracks project quotas.
0439 * - 0x270
0440 - __le32
0441 - s_checksum_seed
0442 - Checksum seed used for metadata_csum calculations. This value is
0443 crc32c(~0, $orig_fs_uuid).
0444 * - 0x274
0445 - __u8
0446 - s_wtime_hi
0447 - Upper 8 bits of the s_wtime field.
0448 * - 0x275
0449 - __u8
0450 - s_mtime_hi
0451 - Upper 8 bits of the s_mtime field.
0452 * - 0x276
0453 - __u8
0454 - s_mkfs_time_hi
0455 - Upper 8 bits of the s_mkfs_time field.
0456 * - 0x277
0457 - __u8
0458 - s_lastcheck_hi
0459 - Upper 8 bits of the s_lastcheck_hi field.
0460 * - 0x278
0461 - __u8
0462 - s_first_error_time_hi
0463 - Upper 8 bits of the s_first_error_time_hi field.
0464 * - 0x279
0465 - __u8
0466 - s_last_error_time_hi
0467 - Upper 8 bits of the s_last_error_time_hi field.
0468 * - 0x27A
0469 - __u8
0470 - s_pad[2]
0471 - Zero padding.
0472 * - 0x27C
0473 - __le16
0474 - s_encoding
0475 - Filename charset encoding.
0476 * - 0x27E
0477 - __le16
0478 - s_encoding_flags
0479 - Filename charset encoding flags.
0480 * - 0x280
0481 - __le32
0482 - s_orphan_file_inum
0483 - Orphan file inode number.
0484 * - 0x284
0485 - __le32
0486 - s_reserved[94]
0487 - Padding to the end of the block.
0488 * - 0x3FC
0489 - __le32
0490 - s_checksum
0491 - Superblock checksum.
0492
0493 .. _super_state:
0494
0495 The superblock state is some combination of the following:
0496
0497 .. list-table::
0498 :widths: 8 72
0499 :header-rows: 1
0500
0501 * - Value
0502 - Description
0503 * - 0x0001
0504 - Cleanly umounted
0505 * - 0x0002
0506 - Errors detected
0507 * - 0x0004
0508 - Orphans being recovered
0509
0510 .. _super_errors:
0511
0512 The superblock error policy is one of the following:
0513
0514 .. list-table::
0515 :widths: 8 72
0516 :header-rows: 1
0517
0518 * - Value
0519 - Description
0520 * - 1
0521 - Continue
0522 * - 2
0523 - Remount read-only
0524 * - 3
0525 - Panic
0526
0527 .. _super_creator:
0528
0529 The filesystem creator is one of the following:
0530
0531 .. list-table::
0532 :widths: 8 72
0533 :header-rows: 1
0534
0535 * - Value
0536 - Description
0537 * - 0
0538 - Linux
0539 * - 1
0540 - Hurd
0541 * - 2
0542 - Masix
0543 * - 3
0544 - FreeBSD
0545 * - 4
0546 - Lites
0547
0548 .. _super_revision:
0549
0550 The superblock revision is one of the following:
0551
0552 .. list-table::
0553 :widths: 8 72
0554 :header-rows: 1
0555
0556 * - Value
0557 - Description
0558 * - 0
0559 - Original format
0560 * - 1
0561 - v2 format w/ dynamic inode sizes
0562
0563 Note that ``EXT4_DYNAMIC_REV`` refers to a revision 1 or newer filesystem.
0564
0565 .. _super_compat:
0566
0567 The superblock compatible features field is a combination of any of the
0568 following:
0569
0570 .. list-table::
0571 :widths: 16 64
0572 :header-rows: 1
0573
0574 * - Value
0575 - Description
0576 * - 0x1
0577 - Directory preallocation (COMPAT_DIR_PREALLOC).
0578 * - 0x2
0579 - “imagic inodes”. Not clear from the code what this does
0580 (COMPAT_IMAGIC_INODES).
0581 * - 0x4
0582 - Has a journal (COMPAT_HAS_JOURNAL).
0583 * - 0x8
0584 - Supports extended attributes (COMPAT_EXT_ATTR).
0585 * - 0x10
0586 - Has reserved GDT blocks for filesystem expansion
0587 (COMPAT_RESIZE_INODE). Requires RO_COMPAT_SPARSE_SUPER.
0588 * - 0x20
0589 - Has directory indices (COMPAT_DIR_INDEX).
0590 * - 0x40
0591 - “Lazy BG”. Not in Linux kernel, seems to have been for uninitialized
0592 block groups? (COMPAT_LAZY_BG)
0593 * - 0x80
0594 - “Exclude inode”. Not used. (COMPAT_EXCLUDE_INODE).
0595 * - 0x100
0596 - “Exclude bitmap”. Seems to be used to indicate the presence of
0597 snapshot-related exclude bitmaps? Not defined in kernel or used in
0598 e2fsprogs (COMPAT_EXCLUDE_BITMAP).
0599 * - 0x200
0600 - Sparse Super Block, v2. If this flag is set, the SB field s_backup_bgs
0601 points to the two block groups that contain backup superblocks
0602 (COMPAT_SPARSE_SUPER2).
0603 * - 0x400
0604 - Fast commits supported. Although fast commits blocks are
0605 backward incompatible, fast commit blocks are not always
0606 present in the journal. If fast commit blocks are present in
0607 the journal, JBD2 incompat feature
0608 (JBD2_FEATURE_INCOMPAT_FAST_COMMIT) gets
0609 set (COMPAT_FAST_COMMIT).
0610 * - 0x1000
0611 - Orphan file allocated. This is the special file for more efficient
0612 tracking of unlinked but still open inodes. When there may be any
0613 entries in the file, we additionally set proper rocompat feature
0614 (RO_COMPAT_ORPHAN_PRESENT).
0615
0616 .. _super_incompat:
0617
0618 The superblock incompatible features field is a combination of any of the
0619 following:
0620
0621 .. list-table::
0622 :widths: 16 64
0623 :header-rows: 1
0624
0625 * - Value
0626 - Description
0627 * - 0x1
0628 - Compression (INCOMPAT_COMPRESSION).
0629 * - 0x2
0630 - Directory entries record the file type. See ext4_dir_entry_2 below
0631 (INCOMPAT_FILETYPE).
0632 * - 0x4
0633 - Filesystem needs recovery (INCOMPAT_RECOVER).
0634 * - 0x8
0635 - Filesystem has a separate journal device (INCOMPAT_JOURNAL_DEV).
0636 * - 0x10
0637 - Meta block groups. See the earlier discussion of this feature
0638 (INCOMPAT_META_BG).
0639 * - 0x40
0640 - Files in this filesystem use extents (INCOMPAT_EXTENTS).
0641 * - 0x80
0642 - Enable a filesystem size of 2^64 blocks (INCOMPAT_64BIT).
0643 * - 0x100
0644 - Multiple mount protection (INCOMPAT_MMP).
0645 * - 0x200
0646 - Flexible block groups. See the earlier discussion of this feature
0647 (INCOMPAT_FLEX_BG).
0648 * - 0x400
0649 - Inodes can be used to store large extended attribute values
0650 (INCOMPAT_EA_INODE).
0651 * - 0x1000
0652 - Data in directory entry (INCOMPAT_DIRDATA). (Not implemented?)
0653 * - 0x2000
0654 - Metadata checksum seed is stored in the superblock. This feature enables
0655 the administrator to change the UUID of a metadata_csum filesystem
0656 while the filesystem is mounted; without it, the checksum definition
0657 requires all metadata blocks to be rewritten (INCOMPAT_CSUM_SEED).
0658 * - 0x4000
0659 - Large directory >2GB or 3-level htree (INCOMPAT_LARGEDIR). Prior to
0660 this feature, directories could not be larger than 4GiB and could not
0661 have an htree more than 2 levels deep. If this feature is enabled,
0662 directories can be larger than 4GiB and have a maximum htree depth of 3.
0663 * - 0x8000
0664 - Data in inode (INCOMPAT_INLINE_DATA).
0665 * - 0x10000
0666 - Encrypted inodes are present on the filesystem. (INCOMPAT_ENCRYPT).
0667
0668 .. _super_rocompat:
0669
0670 The superblock read-only compatible features field is a combination of any of
0671 the following:
0672
0673 .. list-table::
0674 :widths: 16 64
0675 :header-rows: 1
0676
0677 * - Value
0678 - Description
0679 * - 0x1
0680 - Sparse superblocks. See the earlier discussion of this feature
0681 (RO_COMPAT_SPARSE_SUPER).
0682 * - 0x2
0683 - This filesystem has been used to store a file greater than 2GiB
0684 (RO_COMPAT_LARGE_FILE).
0685 * - 0x4
0686 - Not used in kernel or e2fsprogs (RO_COMPAT_BTREE_DIR).
0687 * - 0x8
0688 - This filesystem has files whose sizes are represented in units of
0689 logical blocks, not 512-byte sectors. This implies a very large file
0690 indeed! (RO_COMPAT_HUGE_FILE)
0691 * - 0x10
0692 - Group descriptors have checksums. In addition to detecting corruption,
0693 this is useful for lazy formatting with uninitialized groups
0694 (RO_COMPAT_GDT_CSUM).
0695 * - 0x20
0696 - Indicates that the old ext3 32,000 subdirectory limit no longer applies
0697 (RO_COMPAT_DIR_NLINK). A directory's i_links_count will be set to 1
0698 if it is incremented past 64,999.
0699 * - 0x40
0700 - Indicates that large inodes exist on this filesystem
0701 (RO_COMPAT_EXTRA_ISIZE).
0702 * - 0x80
0703 - This filesystem has a snapshot (RO_COMPAT_HAS_SNAPSHOT).
0704 * - 0x100
0705 - `Quota <Quota>`__ (RO_COMPAT_QUOTA).
0706 * - 0x200
0707 - This filesystem supports “bigalloc”, which means that file extents are
0708 tracked in units of clusters (of blocks) instead of blocks
0709 (RO_COMPAT_BIGALLOC).
0710 * - 0x400
0711 - This filesystem supports metadata checksumming.
0712 (RO_COMPAT_METADATA_CSUM; implies RO_COMPAT_GDT_CSUM, though
0713 GDT_CSUM must not be set)
0714 * - 0x800
0715 - Filesystem supports replicas. This feature is neither in the kernel nor
0716 e2fsprogs. (RO_COMPAT_REPLICA)
0717 * - 0x1000
0718 - Read-only filesystem image; the kernel will not mount this image
0719 read-write and most tools will refuse to write to the image.
0720 (RO_COMPAT_READONLY)
0721 * - 0x2000
0722 - Filesystem tracks project quotas. (RO_COMPAT_PROJECT)
0723 * - 0x8000
0724 - Verity inodes may be present on the filesystem. (RO_COMPAT_VERITY)
0725 * - 0x10000
0726 - Indicates orphan file may have valid orphan entries and thus we need
0727 to clean them up when mounting the filesystem
0728 (RO_COMPAT_ORPHAN_PRESENT).
0729
0730 .. _super_def_hash:
0731
0732 The ``s_def_hash_version`` field is one of the following:
0733
0734 .. list-table::
0735 :widths: 8 72
0736 :header-rows: 1
0737
0738 * - Value
0739 - Description
0740 * - 0x0
0741 - Legacy.
0742 * - 0x1
0743 - Half MD4.
0744 * - 0x2
0745 - Tea.
0746 * - 0x3
0747 - Legacy, unsigned.
0748 * - 0x4
0749 - Half MD4, unsigned.
0750 * - 0x5
0751 - Tea, unsigned.
0752
0753 .. _super_mountopts:
0754
0755 The ``s_default_mount_opts`` field is any combination of the following:
0756
0757 .. list-table::
0758 :widths: 8 72
0759 :header-rows: 1
0760
0761 * - Value
0762 - Description
0763 * - 0x0001
0764 - Print debugging info upon (re)mount. (EXT4_DEFM_DEBUG)
0765 * - 0x0002
0766 - New files take the gid of the containing directory (instead of the fsgid
0767 of the current process). (EXT4_DEFM_BSDGROUPS)
0768 * - 0x0004
0769 - Support userspace-provided extended attributes. (EXT4_DEFM_XATTR_USER)
0770 * - 0x0008
0771 - Support POSIX access control lists (ACLs). (EXT4_DEFM_ACL)
0772 * - 0x0010
0773 - Do not support 32-bit UIDs. (EXT4_DEFM_UID16)
0774 * - 0x0020
0775 - All data and metadata are commited to the journal.
0776 (EXT4_DEFM_JMODE_DATA)
0777 * - 0x0040
0778 - All data are flushed to the disk before metadata are committed to the
0779 journal. (EXT4_DEFM_JMODE_ORDERED)
0780 * - 0x0060
0781 - Data ordering is not preserved; data may be written after the metadata
0782 has been written. (EXT4_DEFM_JMODE_WBACK)
0783 * - 0x0100
0784 - Disable write flushes. (EXT4_DEFM_NOBARRIER)
0785 * - 0x0200
0786 - Track which blocks in a filesystem are metadata and therefore should not
0787 be used as data blocks. This option will be enabled by default on 3.18,
0788 hopefully. (EXT4_DEFM_BLOCK_VALIDITY)
0789 * - 0x0400
0790 - Enable DISCARD support, where the storage device is told about blocks
0791 becoming unused. (EXT4_DEFM_DISCARD)
0792 * - 0x0800
0793 - Disable delayed allocation. (EXT4_DEFM_NODELALLOC)
0794
0795 .. _super_flags:
0796
0797 The ``s_flags`` field is any combination of the following:
0798
0799 .. list-table::
0800 :widths: 8 72
0801 :header-rows: 1
0802
0803 * - Value
0804 - Description
0805 * - 0x0001
0806 - Signed directory hash in use.
0807 * - 0x0002
0808 - Unsigned directory hash in use.
0809 * - 0x0004
0810 - To test development code.
0811
0812 .. _super_encrypt:
0813
0814 The ``s_encrypt_algos`` list can contain any of the following:
0815
0816 .. list-table::
0817 :widths: 8 72
0818 :header-rows: 1
0819
0820 * - Value
0821 - Description
0822 * - 0
0823 - Invalid algorithm (ENCRYPTION_MODE_INVALID).
0824 * - 1
0825 - 256-bit AES in XTS mode (ENCRYPTION_MODE_AES_256_XTS).
0826 * - 2
0827 - 256-bit AES in GCM mode (ENCRYPTION_MODE_AES_256_GCM).
0828 * - 3
0829 - 256-bit AES in CBC mode (ENCRYPTION_MODE_AES_256_CBC).
0830
0831 Total size of the superblock is 1024 bytes.