)]}'
{
  "commit": "ff06f373c1d796f2c4f196c8bee9cd7ea5ee3c96",
  "tree": "b1fa05d9f22b6fcf860a7455a63f4ad17f1b85e6",
  "parents": [
    "44d3b834bef881c7ee9d5454661d54e6a562c53e"
  ],
  "author": {
    "name": "Hsiu-Hsien Lee",
    "email": "swinds24@gmail.com",
    "time": "Wed Oct 07 12:08:29 2026 +0800"
  },
  "committer": {
    "name": "Theodore Ts\u0027o",
    "email": "tytso@mit.edu",
    "time": "Mon Nov 23 15:29:09 2026 -0500"
  },
  "message": "ext4: don\u0027t fail journal recovery on an incomplete fast commit\n\nIf the system crashes while the first fast commit after a full commit is\nbeing written, the fast commit area can hold the head of that fast\ncommit without a valid tail.  ext4_fc_replay_scan() treats this as an\nerror as long as no valid tail has been seen: an invalid tag length or\nan unknown tag returns -ECANCELED, a tail with a wrong tid or checksum\nreturns -EFSBADCRC.  jbd2_journal_recover() then fails, the file system\ncan be mounted neither read-write nor read-only, and the regular journal\ntransactions committed before the fast commit are not replayed either:\n\n  JBD2: journal recovery failed\n  EXT4-fs (sdb): error loading journal\n\nThe tail is written last and fsync() does not return before it has\ncompleted, so an incomplete fast commit was never reported as durable.\nHandle it like jbd2 handles a transaction without a valid commit block:\nstop the scan and replay what is valid.  This is already what happens\nwhen an earlier fast commit in the area has a valid tail.\n\nReproducer, with the power cut emulated by copying the device while it\nis mounted:\n\n  mkfs.ext4 -O fast_commit /dev/sdb\n  mount /dev/sdb /mnt; mkdir /mnt/d\n  create 20 files in /mnt/d; sync\n  write a fragmented file and modify the 20 files, fsync one file\n      (one fast commit spanning several blocks)\n  copy /dev/sdb while still mounted, then zero the block holding the\n  fast commit tail in the copy\n  mount the copy\n\nWithout this patch the mount fails as above.  With it, the mount\nsucceeds, the state after sync is recovered and e2fsck finds no errors.\nThe same holds when a full commit precedes the torn fast commit, in\nwhich case the full commit is now replayed as well.\n\nFixes: 8016e29f4362 (\"ext4: fast commit recovery path\")\nSigned-off-by: Hsiu-Hsien Lee \u003cswinds24@gmail.com\u003e\nReviewed-by: Jan Kara \u003cjack@suse.cz\u003e\nLink: https://patch.msgid.link/20261007040829.2074386-1-swinds24@gmail.com\nSigned-off-by: Theodore Ts\u0027o \u003ctytso@mit.edu\u003e\nCc: stable@kernel.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6deaa61e3e7f1d4b9bf1fb505255297532865184",
      "old_mode": 33188,
      "old_path": "fs/ext4/fast_commit.c",
      "new_id": "c634f7ae743839f63415b01a43de0a636e7656bd",
      "new_mode": 33188,
      "new_path": "fs/ext4/fast_commit.c"
    }
  ]
}
