diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-18 06:37:33 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-27 00:38:23 +0200 |
commit | f135761a73b18877bdfb44018fe993172c7be203 (patch) | |
tree | d85500b46f1681192e9c8c9d5a7d81144a72dd66 /fs/xfs/libxfs/xfs_btree.h | |
parent | xfs: create block pointer check functions (diff) | |
download | linux-f135761a73b18877bdfb44018fe993172c7be203.tar.xz linux-f135761a73b18877bdfb44018fe993172c7be203.zip |
xfs: refactor btree pointer checks
Refactor the btree pointer checks so that we can call them from the
scrub code without logging errors to dmesg. Preserve the existing error
reporting for regular operations.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h index f2a88c3b1159..8f52eda8eb82 100644 --- a/fs/xfs/libxfs/xfs_btree.h +++ b/fs/xfs/libxfs/xfs_btree.h @@ -269,10 +269,19 @@ xfs_btree_check_block( /* * Check that (long) pointer is ok. */ -int /* error (0 or EFSCORRUPTED) */ +bool /* error (0 or EFSCORRUPTED) */ xfs_btree_check_lptr( struct xfs_btree_cur *cur, /* btree cursor */ - xfs_fsblock_t ptr, /* btree block disk address */ + xfs_fsblock_t fsbno, /* btree block disk address */ + int level); /* btree block level */ + +/* + * Check that (short) pointer is ok. + */ +bool /* error (0 or EFSCORRUPTED) */ +xfs_btree_check_sptr( + struct xfs_btree_cur *cur, /* btree cursor */ + xfs_agblock_t agbno, /* btree block disk address */ int level); /* btree block level */ /* |