)]}'
{
  "commit": "caba4f31df7a93fca8a04030a5d79f6819552308",
  "tree": "506234ffa38683fc1b92b03c388269556b4ba203",
  "parents": [
    "0494ce7169f06a734a7bd7585f49a9fa91fa7318"
  ],
  "author": {
    "name": "Christopher Haster",
    "email": "geky@geky.net",
    "time": "Mon Feb 03 18:05:15 2025 -0600"
  },
  "committer": {
    "name": "Christopher Haster",
    "email": "geky@geky.net",
    "time": "Mon Feb 03 22:52:24 2025 -0600"
  },
  "message": "Fixed dir iteration being broken by concurrent removes\n\nWhen removing a file, we mark all open handles as \"removed\" (\npair\u003d{-1,-1}) to avoid trying to later read metadata that no longer\nexists. Unfortunately, this also includes open dir handles that happen\nto be pointing at the removed file, causing them to return\nLFS_ERR_CORRUPT on the next read.\n\nThe good news is this is _not_ actual filesystem corruption, only a\nlogic error in lfs_dir_read.\n\nWe actually already have logic in place to nudge the dir to the next id,\nbut it was unreachable with the existing logic. I suspect this worked at\none point but was broken during a refactor due to lack of testing.\n\n---\n\nFortunately, all we need to do is _not_ clobber the handle if the\ninternal type is a dir. Then the dir-nudging logic can correctly take\nover.\n\nI\u0027ve also added test_dirs_remove_read to test this and prevent another\nregression, adapted from tests provided by tpwrules that identified the\noriginal bug.\n\nFound by tpwrules\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7520f2ea7eb1d3d29ab29422ca3d6d0a3057397a",
      "old_mode": 33188,
      "old_path": "lfs.c",
      "new_id": "458aae03c6481ecd61b5bc0e913c24a092f2f5e9",
      "new_mode": 33188,
      "new_path": "lfs.c"
    },
    {
      "type": "modify",
      "old_id": "cb1f2e9427a360f84d174920df7fc898c534c860",
      "old_mode": 33188,
      "old_path": "tests/test_dirs.toml",
      "new_id": "3b28a30269647f0c709f9d471067fa9daaf2f4f4",
      "new_mode": 33188,
      "new_path": "tests/test_dirs.toml"
    }
  ]
}
