xfs: check inode core when scrubbing metadata files
authorDarrick J. Wong <djwong@kernel.org>
Thu, 17 Nov 2022 00:08:03 +0000 (16:08 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 17 Nov 2022 00:11:51 +0000 (16:11 -0800)
commitf36b954a1f1bf06b5746fea7ecf0fa639ac65324
tree4aa9a613629fa750a8f777c908311fb77735a7f4
parentbd5ab5f9874109586cbae5bc98e1f9ff574627e2
xfs: check inode core when scrubbing metadata files

Metadata files (e.g. realtime bitmaps and quota files) do not show up in
the bulkstat output, which means that scrub-by-handle does not work;
they can only be checked through a specific scrub type.  Therefore, each
scrub type calls xchk_metadata_inode_forks to check the metadata for
whatever's in the file.

Unfortunately, that function doesn't actually check the inode record
itself.  Refactor the function a bit to make that happen.

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