diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-17 21:37:34 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-26 15:38:23 -0700 |
commit | 91fb9afc0847926ef6ea7695b8125c8fbe7974d6 (patch) | |
tree | 3081f56bd69cad0fcd0906c80a151a8dd463ffca /fs/xfs/libxfs/xfs_ialloc.h | |
parent | 52c732eee78b47ac2eb828b1c7fa611cd37b0090 (diff) | |
download | linux-91fb9afc0847926ef6ea7695b8125c8fbe7974d6.tar.gz linux-91fb9afc0847926ef6ea7695b8125c8fbe7974d6.tar.bz2 linux-91fb9afc0847926ef6ea7695b8125c8fbe7974d6.zip |
xfs: create inode pointer verifiers
Create some helper functions to check that inode pointers point to
somewhere within the filesystem and not at the static AG metadata.
Move xfs_internal_inum and create a directory inode check function.
We will use these functions in scrub and elsewhere.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.h b/fs/xfs/libxfs/xfs_ialloc.h index b32cfb5aeb5b..d2bdcd5e7312 100644 --- a/fs/xfs/libxfs/xfs_ialloc.h +++ b/fs/xfs/libxfs/xfs_ialloc.h @@ -173,5 +173,12 @@ void xfs_inobt_btrec_to_irec(struct xfs_mount *mp, union xfs_btree_rec *rec, struct xfs_inobt_rec_incore *irec); int xfs_ialloc_cluster_alignment(struct xfs_mount *mp); +void xfs_ialloc_agino_range(struct xfs_mount *mp, xfs_agnumber_t agno, + xfs_agino_t *first, xfs_agino_t *last); +bool xfs_verify_agino(struct xfs_mount *mp, xfs_agnumber_t agno, + xfs_agino_t agino); +bool xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino); +bool xfs_internal_inum(struct xfs_mount *mp, xfs_ino_t ino); +bool xfs_verify_dir_ino(struct xfs_mount *mp, xfs_ino_t ino); #endif /* __XFS_IALLOC_H__ */ |