[PATCHSET v13.1 9/9] xfs: vectorize scrub kernel calls

Darrick J. Wong
2024-04-10T00:46:28Z

Hi all,

Create a vectorized version of the metadata scrub and repair ioctl, and
adapt xfs_scrub to use that. This is an experiment to measure overhead
and to try refactoring xfs_scrub.

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=vectorized-scrub

xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=vectorized-scrub

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=vectorized-scrub
---
Commits in this patchset:
* xfs: reduce the rate of cond_resched calls inside scrub
* xfs: introduce vectored scrub mode
* xfs: only iget the file once when doing vectored scrub-by-handle
---
fs/xfs/libxfs/xfs_fs.h | 40 +++++++++++
fs/xfs/scrub/common.h | 25 -------
fs/xfs/scrub/scrub.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++
fs/xfs/scrub/scrub.h | 64 ++++++++++++++++++
fs/xfs/scrub/trace.h | 78 +++++++++++++++++++++
fs/xfs/scrub/xfarray.c | 10 +--
fs/xfs/scrub/xfarray.h | 3 +
fs/xfs/scrub/xfile.c | 2 -
fs/xfs/scrub/xfs_scrub.h | 2 +
fs/xfs/xfs_ioctl.c | 50 ++++++++++++++
10 files changed, 410 insertions(+), 32 deletions(-)