)]}'
{
  "commit": "e3e6940940910c2287fe962bdf72015efd4fee81",
  "tree": "cdbbf4129dc1f63f06154056598b233bbff2e57e",
  "parents": [
    "d26935690c03fe8159d42358bed1c56252700cd1"
  ],
  "author": {
    "name": "Kent Overstreet",
    "email": "kent.overstreet@linux.dev",
    "time": "Sat Aug 31 17:44:51 2024 -0400"
  },
  "committer": {
    "name": "Kent Overstreet",
    "email": "kent.overstreet@linux.dev",
    "time": "Sat Aug 31 19:26:08 2024 -0400"
  },
  "message": "bcachefs: Revert lockless buffered IO path\n\nWe had a report of data corruption on nixos when building installer\nimages.\n\nhttps://github.com/NixOS/nixpkgs/pull/321055#issuecomment-2184131334\n\nIt seems that writes are being dropped, but only when issued by QEMU,\nand possibly only in snapshot mode. It\u0027s undetermined if it\u0027s write\ncalls are being dropped or dirty folios.\n\nFurther testing, via minimizing the original patch to just the change\nthat skips the inode lock on non appends/truncates, reveals that it\nreally is just not taking the inode lock that causes the corruption: it\nhas nothing to do with the other logic changes for preserving write\natomicity in corner cases.\n\nIt\u0027s also kernel config dependent: it doesn\u0027t reproduce with the minimal\nkernel config that ktest uses, but it does reproduce with nixos\u0027s distro\nconfig. Bisection the kernel config initially pointer the finger at page\nmigration or compaction, but it appears that was erroneous; we haven\u0027t\nyet determined what kernel config option actually triggers it.\n\nSadly it appears this will have to be reverted since we\u0027re getting too\nclose to release and my plate is full, but we\u0027d _really_ like to fully\ndebug it.\n\nMy suspicion is that this patch is exposing a preexisting bug - the\ninode lock actually covers very little in IO paths, and we have a\ndifferent lock (the pagecache add lock) that guards against races with\ntruncate here.\n\nFixes: 7e64c86cdc6c (\"bcachefs: Buffered write path now can avoid the inode lock\")\nSigned-off-by: Kent Overstreet \u003ckent.overstreet@linux.dev\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ab5a7adece1042738942a03543af5691d523db91",
      "old_mode": 33188,
      "old_path": "fs/bcachefs/errcode.h",
      "new_id": "742dcdd3e5d7d4293379219924b3cf9821c83f89",
      "new_mode": 33188,
      "new_path": "fs/bcachefs/errcode.h"
    },
    {
      "type": "modify",
      "old_id": "184d0385167689acfef82bc648611f2b8919665d",
      "old_mode": 33188,
      "old_path": "fs/bcachefs/fs-io-buffered.c",
      "new_id": "ec8c427bf588931bf2c83d8efd0e63a521f4d646",
      "new_mode": 33188,
      "new_path": "fs/bcachefs/fs-io-buffered.c"
    }
  ]
}
