xfs: standardize ondisk to incore conversion for refcount btrees
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:02 +0000 (19:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:02 +0000 (19:00 -0700)
commit2b30cc0bf0589d1ea0506c019b9b81de77535c87
tree13e38f65bc1022d11749528dc1d19c344a2d7451
parent366a0b8d49c3a7edcb5331f254af195716ba4bdf
xfs: standardize ondisk to incore conversion for refcount btrees

Create a xfs_refcount_check_irec function to detect corruption in btree
records.  Fix all xfs_refcount_btrec_to_irec callsites to call the new
helper and bubble up corruption reports.

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