{
  "slug": "ext4",
  "term": "Ext4",
  "aliases": [
    "fourth extended filesystem",
    "ext4 filesystem"
  ],
  "definition": "Ext4 is a general-purpose Linux filesystem in the extended-filesystem family that supports extent-based block mapping and configurable journaling.",
  "note": "Ext4 divides storage into block groups. With the extent feature, a mapping describes a contiguous range of file blocks and the storage blocks backing it, rather than listing each block separately. Block groups, inodes and extents describe filesystem organization, not the physical layout inside an SSD. [overview] [manual]\n\nJournaling depends on the has_journal feature; the filesystem name alone does not establish that a journal is present. With journaling enabled, data=ordered normally journals metadata rather than ordinary file contents; supported per-file data-journaling settings can override that policy. [attributes] The data=journal and data=writeback modes have different coverage and ordering. These policies do not supply an application's multi-file transaction boundary. [manual] [journal]\n\nJournal replay addresses filesystem consistency after a crash. The metadata_csum feature checks filesystem structures; it is not a general per-file content checksum. Applications still need a persistence protocol and must check synchronization errors. Synchronizing a file alone does not guarantee persistence of its containing directory entry. [checksums] [fsync]\n\nReserved blocks restrict ordinary allocation; tune2fs documents their configured count or percentage and eligible user/group settings. Changing that reserve changes allocation policy, not device or lower thin-pool capacity. [tune2fs-reserve] Linux v6.12 also accounts for a separate internal reserve. Its ordinary availability report does not test the caller's reserved-block privileges, while its allocation check does. Project-quota adjustments and other allocation constraints still matter; a statistics query is not a reservation or write guarantee. [ext4-reserve-statfs] [ext4-reserve-allocation]",
  "status": "shipping",
  "advantages": [
    {
      "text": "With metadata_csum_seed, a stored seed separates metadata checksum initialization from later UUID changes; the superblock checksum still covers the UUID-containing superblock.",
      "citationIds": [
        "uuid-seed-code",
        "uuid-seed-manual"
      ]
    }
  ],
  "limitations": [
    {
      "text": "A read-only mount can still replay the journal and write to storage. The documented ro,noload combination suppresses journal loading, but skipping replay after an unclean shutdown can leave inconsistencies; it does not repair them.",
      "citationIds": [
        "mount-options"
      ]
    },
    {
      "text": "Historical FFS measurements used a 10% free-space reserve to support placement choices; this is not a recommended reserve percentage for ext4 or SSD workloads.",
      "citationIds": [
        "ffs-reserve-history"
      ]
    },
    {
      "text": "For metadata_csum without metadata_csum_seed, changing the UUID requires checksum rewriting. The stable_inodes feature prohibits UUID changes even when a stored seed is present.",
      "citationIds": [
        "uuid-change-code",
        "uuid-seed-manual"
      ]
    },
    {
      "text": "An internally valid inode need not be the intended latest inode. In four unmounted, no-journal ext4 configurations on e2fsprogs 1.47.0, restoring the complete older inode changed permissions from 0600 to 0644 while e2fsck -f -n returned 0. Isolated mode or generation changes returned 4 with checksum errors; payload bytes stayed unchanged.",
      "citationIds": [
        "inode-freshness-witness"
      ]
    }
  ],
  "related": [
    "e2fsck",
    "e2image",
    "ext4-auto-da-alloc",
    "ext4-bigalloc",
    "ext4-data-journal",
    "ext4-data-ordered",
    "ext4-data-writeback",
    "ext4-fast-commit",
    "ext4-orphan-file",
    "ext4-orphan-inode",
    "inode",
    "file-extent",
    "delayed-allocation",
    "fsync",
    "filesystem-consistency-invariant",
    "read-only-mount",
    "statvfs",
    "filesystem-uuid",
    "txfs",
    "fstream",
    "spanfs"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-04",
  "citations": [
    {
      "id": "manual",
      "title": "e2fsprogs ext4(5): filesystem family, extent and has_journal features",
      "url": "https://man7.org/linux/man-pages/man5/ext4.5.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "overview",
      "title": "Linux v6.16: ext4 block-group organization",
      "url": "https://github.com/torvalds/linux/blob/v6.16/Documentation/filesystems/ext4/overview.rst",
      "accessed": "2026-10-24"
    },
    {
      "id": "journal",
      "title": "Linux v6.16: ext4 Journal (jbd2), metadata recovery and data modes",
      "url": "https://github.com/torvalds/linux/blob/v6.16/Documentation/filesystems/ext4/journal.rst",
      "accessed": "2026-10-24"
    },
    {
      "id": "checksums",
      "title": "Linux v6.16: ext4 metadata checksum coverage",
      "url": "https://github.com/torvalds/linux/blob/v6.16/Documentation/filesystems/ext4/checksums.rst",
      "accessed": "2026-10-24"
    },
    {
      "id": "fsync",
      "title": "Linux man-pages fsync(2): file data, directory entries and errors",
      "url": "https://man7.org/linux/man-pages/man2/fsync.2.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "attributes",
      "title": "e2fsprogs chattr(1): per-file data-journaling attribute j",
      "url": "https://man7.org/linux/man-pages/man1/chattr.1.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "mount-options",
      "title": "Linux v6.16: ext4 read-only mounts, journal replay and noload",
      "url": "https://docs.kernel.org/6.16/admin-guide/ext4.html",
      "accessed": "2026-10-24"
    },
    {
      "id": "ext4-reserve-statfs",
      "title": "Linux v6.12: ext4_statfs reserve accounting and project-quota adjustment",
      "url": "https://github.com/torvalds/linux/blob/v6.12/fs/ext4/super.c#L6754-L6830",
      "accessed": "2026-11-01"
    },
    {
      "id": "ext4-reserve-allocation",
      "title": "Linux v6.12: ext4_has_free_clusters credential and internal-reserve checks",
      "url": "https://github.com/torvalds/linux/blob/v6.12/fs/ext4/balloc.c#L620-L666",
      "accessed": "2026-11-01"
    },
    {
      "id": "tune2fs-reserve",
      "title": "e2fsprogs tune2fs(8): reserved-block count, percentage, user and group",
      "url": "https://man7.org/linux/man-pages/man8/tune2fs.8.html",
      "accessed": "2026-11-01"
    },
    {
      "id": "ffs-reserve-history",
      "title": "McKusick et al. (1984), A Fast File System for UNIX: reserve policy and measurement conditions, pp. 187 and 191",
      "url": "https://people.eecs.berkeley.edu/~prabal/teaching/resources/eecs582/mckusick84ffs.pdf",
      "accessed": "2026-11-02"
    },
    {
      "id": "uuid-seed-manual",
      "title": "e2fsprogs v1.47.0 ext4(5): metadata_csum_seed and stable_inodes",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.0/misc/ext4.5.in",
      "accessed": "2026-11-30"
    },
    {
      "id": "uuid-seed-code",
      "title": "e2fsprogs v1.47.0: checksum seed initialization and superblock checksum",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.0/lib/ext2fs/csum.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "uuid-change-code",
      "title": "e2fsprogs v1.47.0 tune2fs: UUID-change guards and checksum rewrite",
      "url": "https://raw.githubusercontent.com/tytso/e2fsprogs/v1.47.0/misc/tune2fs.c",
      "accessed": "2026-11-30"
    },
    {
      "id": "uuid-seed-observation",
      "title": "Hesela: four disposable ext4 UUID-change observations and raw command results",
      "url": "https://hesela.dev/research/ext4-uuid-seed/results.json",
      "accessed": "2026-11-30"
    },
    {
      "id": "inode-freshness-witness",
      "title": "Hesela: native ext4 inode replay, permission checks and offline experiment limits",
      "url": "https://hesela.com/analyses/checksums-identity-and-lost-writes/#ext4-inode-freshness",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Foundational source review using e2fsprogs documentation and Linux v6.16 design documents; no runtime test, capacity limit or performance ranking is asserted.",
    "2026-11-30: source review of e2fsprogs v1.47.0 and four native unmounted regular-file observations; earlier source-only provenance describes the original review.",
    "Four 16 MiB images on e2fsprogs 1.47.0 cover stored/UUID-derived seeds and stable_inodes on/off. Permitted changes retained the known payload and passed read-only e2fsck; both refusals left image bytes unchanged. [uuid-seed-observation]",
    "The fixtures have no journal and do not test mounted behavior, crash safety, device writes or recovery completeness. Operational identity changes should use a working copy, retaining the acquisition.",
    "The inode-replay witness uses two captures of four configurations and five cases each, not independent devices. It does not test mounted chmod, journal replay, power loss or failure probability. [inode-freshness-witness]"
  ]
}
