xfs: disable reaping in fscounters scrub
authorDarrick J. Wong <djwong@kernel.org>
Mon, 1 May 2023 23:16:14 +0000 (09:16 +1000)
committerDave Chinner <dchinner@redhat.com>
Mon, 1 May 2023 23:16:14 +0000 (09:16 +1000)
commit2d5f38a31980d7090f5bf91021488dc61a0ba8ee
tree478bc34729fa08f088b9ff145bd56e01a32b8073
parentb37c4c8339cd394ea6b8b415026603320a185651
xfs: disable reaping in fscounters scrub

The fscounters scrub code doesn't work properly because it cannot
quiesce updates to the percpu counters in the filesystem, hence it
returns false corruption reports.  This has been fixed properly in
one of the online repair patchsets that are under review by replacing
the xchk_disable_reaping calls with an exclusive filesystem freeze.
Disabling background gc isn't sufficient to fix the problem.

In other words, scrub doesn't need to call xfs_inodegc_stop, which is
just as well since it wasn't correct to allow scrub to call
xfs_inodegc_start when something else could be calling xfs_inodegc_stop
(e.g. trying to freeze the filesystem).

Neuter the scrubber for now, and remove the xchk_*_reaping functions.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/fscounters.c
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/trace.h