diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-04-12 04:00:02 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-04-12 04:00:02 +0200 |
commit | 2b30cc0bf0589d1ea0506c019b9b81de77535c87 (patch) | |
tree | 13e38f65bc1022d11749528dc1d19c344a2d7451 /fs/xfs/libxfs/xfs_refcount.h | |
parent | xfs: standardize ondisk to incore conversion for inode btrees (diff) | |
download | linux-2b30cc0bf0589d1ea0506c019b9b81de77535c87.tar.xz linux-2b30cc0bf0589d1ea0506c019b9b81de77535c87.zip |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_refcount.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_refcount.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_refcount.h b/fs/xfs/libxfs/xfs_refcount.h index c89f0fcd1ee3..fc0b58d4c379 100644 --- a/fs/xfs/libxfs/xfs_refcount.h +++ b/fs/xfs/libxfs/xfs_refcount.h @@ -117,6 +117,8 @@ extern int xfs_refcount_has_record(struct xfs_btree_cur *cur, union xfs_btree_rec; extern void xfs_refcount_btrec_to_irec(const union xfs_btree_rec *rec, struct xfs_refcount_irec *irec); +xfs_failaddr_t xfs_refcount_check_irec(struct xfs_btree_cur *cur, + const struct xfs_refcount_irec *irec); extern int xfs_refcount_insert(struct xfs_btree_cur *cur, struct xfs_refcount_irec *irec, int *stat); |