Hi all, The design document discusses the need for a specialized inode scan cursor to manage walking every file on a live filesystem to build replacement metadata objects while receiving updates about the files already scanned. This series adds three pieces of infrastructure -- the scan cursor, live hooks to deliver information about updates going on in other parts of the filesystem, and then adds a batching mechanism to amortize AGI lookups over a batch of inodes to improve performance. If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been running on the djcloud for months with no problems. 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=scrub-iscan --- fs/xfs/Kconfig | 36 ++ fs/xfs/Makefile | 2 fs/xfs/scrub/iscan.c | 738 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/xfs/scrub/iscan.h | 81 +++++ fs/xfs/scrub/trace.c | 1 fs/xfs/scrub/trace.h | 145 ++++++++++ fs/xfs/xfs_hooks.c | 94 ++++++ fs/xfs/xfs_hooks.h | 72 +++++ fs/xfs/xfs_iwalk.c | 13 - fs/xfs/xfs_linux.h | 1 10 files changed, 1172 insertions(+), 11 deletions(-) create mode 100644 fs/xfs/scrub/iscan.c create mode 100644 fs/xfs/scrub/iscan.h create mode 100644 fs/xfs/xfs_hooks.c create mode 100644 fs/xfs/xfs_hooks.h