xfs: return a failure address from xfs_rmap_irec_offset_unpack
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)
commit39ab26d59f039c6190bbaa8118a8f0ffed84492a
tree7777c911884465946304bad70f194e0e0c48f0c6
parent2b30cc0bf0589d1ea0506c019b9b81de77535c87
xfs: return a failure address from xfs_rmap_irec_offset_unpack

Currently, xfs_rmap_irec_offset_unpack returns only 0 or -EFSCORRUPTED.
Change this function to return the code address of a failed conversion
in preparation for the next patch, which standardizes localized record
checking and reporting code.

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