diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-11 16:05:17 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-22 21:35:05 -0800 |
commit | 8f92bde008f2197631a337225e731e46a064eeff (patch) | |
tree | c66005c21b496ee0e0815c49043c3d4b179a2d67 /fs/xfs/libxfs/xfs_inode_fork.h | |
parent | 2e82c02cafbb8d14a50ee9c14f67d66f1b1e0b38 (diff) |
xfs: convert open coded corruption check to use XFS_CORRUPT_ONrefactor-corruption-checks_2019-11-22
Convert the last of the open coded corruption check and report idioms to
use the XFS_CORRUPT_ON macro. In a subsequent patch we are going to add
health reporting to the code block under each corruption check, so we
don't bother to clean out "{ return -EFSCORRUPTED; }".
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.h b/fs/xfs/libxfs/xfs_inode_fork.h index cf6285da3134..5c0ad377207c 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.h +++ b/fs/xfs/libxfs/xfs_inode_fork.h @@ -87,6 +87,10 @@ struct xfs_ifork { #define XFS_IFORK_MAXEXT(ip, w) \ (XFS_IFORK_SIZE(ip, w) / sizeof(xfs_bmbt_rec_t)) +#define XFS_IFORK_MAPS_BLOCKS(ip, w) \ + (XFS_IFORK_FORMAT((ip), (w)) == XFS_DINODE_FMT_EXTENTS || \ + XFS_IFORK_FORMAT((ip), (w)) == XFS_DINODE_FMT_BTREE) + struct xfs_ifork *xfs_iext_state_to_fork(struct xfs_inode *ip, int state); int xfs_iformat_fork(struct xfs_inode *, struct xfs_dinode *); |