)]}'
{
  "commit": "ce85a1e04645b1ed386b074297df27ab5b8801c0",
  "tree": "13abf32f635337c34e23aa0b2adafef123a5f22b",
  "parents": [
    "59ba4fdd2d1f9dd7af98f5168c846150c9aec56d"
  ],
  "author": {
    "name": "Darrick J. Wong",
    "email": "djwong@kernel.org",
    "time": "Fri Aug 04 08:20:57 2023 -0700"
  },
  "committer": {
    "name": "Darrick J. Wong",
    "email": "djwong@kernel.org",
    "time": "Fri Aug 04 08:20:57 2023 -0700"
  },
  "message": "xfs: stabilize fs summary counters for online fsck\n\nIf the fscounters scrubber notices incorrect summary counters, it\u0027s\nentirely possible that scrub is simply racing with other threads that\nare updating the incore counters.  There isn\u0027t a good way to stabilize\npercpu counters or set ourselves up to observe live updates with hooks\nlike we do for the quotacheck or nlinks scanners, so we instead choose\nto freeze the filesystem long enough to walk the incore per-AG\nstructures.\n\nPast me thought that it was going to be commonplace to have to freeze\nthe filesystem to perform some kind of repair and set up a whole\nseparate infrastructure to freeze the filesystem in such a way that\nuserspace could not unfreeze while we were running.  This involved\nadding a mutex and freeze_super/thaw_super functions and dealing with\nthe fact that the VFS freeze/thaw functions can free the VFS superblock\nreferences on return.\n\nThis was all very overwrought, since fscounters turned out to be the\nonly user of scrub freezes, and it doesn\u0027t require the log to quiesce,\nonly the incore superblock counters.  We prevent other threads from\nchanging the freeze level by calling freeze_super_excl with a custom\nfreeze cookie to keep everyone else out of the filesystem.\n\nThe end result is that fscounters should be much more efficient.  When\nwe\u0027re checking a busy system and we can\u0027t stabilize the counters, the\ncustom freeze will do less work, which should result in less downtime.\nRepair should be similarly speedy, but that\u0027s in a later patch.\n\nSigned-off-by: Darrick J. Wong \u003cdjwong@kernel.org\u003e\nReviewed-by: Dave Chinner \u003cdchinner@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e382a35e98d88c81396c33830290039749b6ba6a",
      "old_mode": 33188,
      "old_path": "fs/xfs/scrub/fscounters.c",
      "new_id": "05be757668bb25ca0bef1d7db4fb0ea5bd996738",
      "new_mode": 33188,
      "new_path": "fs/xfs/scrub/fscounters.c"
    },
    {
      "type": "modify",
      "old_id": "3d98f604765e17d8af7e0504ba3dafeb8cdc5b46",
      "old_mode": 33188,
      "old_path": "fs/xfs/scrub/scrub.c",
      "new_id": "a0fffbcd022bc9f80cde26207bf09e4b23dfb48c",
      "new_mode": 33188,
      "new_path": "fs/xfs/scrub/scrub.c"
    },
    {
      "type": "modify",
      "old_id": "e113f2f5c254b085cb7beeb7417fdc1300d4b55a",
      "old_mode": 33188,
      "old_path": "fs/xfs/scrub/scrub.h",
      "new_id": "f8ba00e51ca9a08cb81c4f98390aca3cde0dfba8",
      "new_mode": 33188,
      "new_path": "fs/xfs/scrub/scrub.h"
    },
    {
      "type": "modify",
      "old_id": "b3894daeb86a96f10f4d1201a569a494978e62a6",
      "old_mode": 33188,
      "old_path": "fs/xfs/scrub/trace.h",
      "new_id": "0b54f1a1cf0c4829fd2fd2c6fac9c7d8b9dec1c1",
      "new_mode": 33188,
      "new_path": "fs/xfs/scrub/trace.h"
    }
  ]
}
