{
  "slug": "ext4-data-journal",
  "term": "Ext4 data journaling",
  "aliases": [
    "ext4 data=journal",
    "ext4 journal mode"
  ],
  "definition": "Ext4 data journaling sends supported file contents and filesystem metadata through the journal before their final locations.",
  "note": "For ordinary unencrypted regular files, data=journal journals contents alongside metadata. When journaling would otherwise apply, Linux v6.12 instead selects ordered mode for fscrypt-encrypted regular files. The per-inode journal-data override requires disabled delayed allocation. [inode-mode] A filesystem transaction does not automatically match an application's multi-write or multi-file update. [journal]\n\nThe Linux v6.12 guide states that this mode disables delayed allocation and O_DIRECT support. [ext4-modes] The inode's data-journaling state makes ext4_dio_alignment return zero. [dio-alignment] The write path then falls back to buffered I/O; its NOWAIT path rejects with EOPNOTSUPP, while earlier lock contention can yield EAGAIN. O_DIRECT alone does not verify page-cache bypass. [dio-fallback]",
  "related": [
    "ext4-data-ordered",
    "ext4-data-writeback",
    "journal-checkpoint",
    "fsync",
    "crash-consistency"
  ],
  "citations": [
    {
      "id": "journal",
      "title": "Linux v6.12: journal coverage and ordered-mode fast commits",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/filesystems/ext4/journal.rst",
      "accessed": "2026-10-21"
    },
    {
      "id": "ext4-modes",
      "title": "Linux v6.12: ext4 data modes and auto_da_alloc",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/Documentation/admin-guide/ext4.rst",
      "accessed": "2026-10-21"
    },
    {
      "id": "fsync-contract",
      "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-21"
    },
    {
      "id": "inode-mode",
      "title": "Linux v6.12: ext4_inode_journal_mode, encrypted files and per-inode overrides",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/fs/ext4/ext4_jbd2.c",
      "accessed": "2026-10-21"
    },
    {
      "id": "dio-alignment",
      "title": "Linux v6.12: ext4_dio_alignment, data-journal exclusion",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/fs/ext4/inode.c#L5187-L5201",
      "accessed": "2026-10-21"
    },
    {
      "id": "dio-fallback",
      "title": "Linux v6.12: direct-I/O eligibility, buffered fallback and NOWAIT errors",
      "url": "https://github.com/torvalds/linux/blob/adc218676eef25575469234709c2d87185ca223a/fs/ext4/file.c",
      "accessed": "2026-10-21"
    }
  ],
  "provenance": [
    "Source review scoped to Linux v6.12; not a crash experiment or certification of later kernels."
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-21"
}
