Hi all, This series fixes some assorted bugs in the inodegc code that have been lurking for a while. The first is that inodes that are ready to be inactivated are put on per-cpu lockless lists and a per-cpu worker is scheduled to clear that list eventually. Unfortunately, WORK_CPU_UNBOUND doesn't guarantee that a worker will actually be scheduled on that CPU, so we need to force this by specifying the CPU explicitly. The second problem is that that xfs_inodegc_stop races with other threads that are trying to add inodes to the percpu list and schedule the inodegc workers. The solution here is to drain the inodegc lists by scheduling workers immediately, flushing the workqueue, and scheduling if any new inodes have appeared. We also disable the broken fscounters usage of inodegc_stop by neutering the whole scrubber for now because the proper fixes for it are in the next batch of online repair patches for 6.5, and the code is still marked experimental. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=inodegc-fixes-6.4 --- fs/xfs/scrub/common.c | 26 -------------------------- fs/xfs/scrub/common.h | 2 -- fs/xfs/scrub/fscounters.c | 10 +++------- fs/xfs/scrub/scrub.c | 2 -- fs/xfs/scrub/scrub.h | 1 - fs/xfs/scrub/trace.h | 1 - fs/xfs/xfs_icache.c | 38 +++++++++++++++++++++++++++++++------- fs/xfs/xfs_mount.h | 3 +++ fs/xfs/xfs_super.c | 3 +++ 9 files changed, 40 insertions(+), 46 deletions(-)