xfs: remove trivial bnobt/inobt scrub helpers
authorDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:31 +0000 (10:03 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 15 Dec 2023 18:03:31 +0000 (10:03 -0800)
commit8bd0bf570bd7b5cbcce3f70b760d8dcccd8df6c8
tree6dcb9f5344f7cba9afd4c352ee756e3358532b79
parentefb43b355457dab474c7eb40d6b2f3cb04c24ecf
xfs: remove trivial bnobt/inobt scrub helpers

Christoph Hellwig complained about awkward code in the next two repair
patches such as:

sc->sm->sm_type = XFS_SCRUB_TYPE_BNOBT;
error = xchk_bnobt(sc);

This is a little silly, so let's export the xchk_{,i}allocbt functions
to the dispatch table in scrub.c directly and get rid of the helpers.
Originally I had planned each btree gets its own separate entry point,
but since repair doesn't work that way, it no longer makes sense to
complicate the call chain that way.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/alloc.c
fs/xfs/scrub/ialloc.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h