summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_bmap.h
diff options
context:
space:
mode:
authorDarrick J. Wong2018-03-23 18:06:52 +0100
committerDarrick J. Wong2018-03-24 02:05:07 +0100
commit30b0984d9117dd14c895265886d34335856b712b (patch)
treec83233ce6ee62c7675651091c584b8d40bf2d27e /fs/xfs/libxfs/xfs_bmap.h
parentxfs: sanity-check the unused space before trying to use it (diff)
downloadkernel-qcow2-linux-30b0984d9117dd14c895265886d34335856b712b.tar.gz
kernel-qcow2-linux-30b0984d9117dd14c895265886d34335856b712b.tar.xz
kernel-qcow2-linux-30b0984d9117dd14c895265886d34335856b712b.zip
xfs: refactor bmap record validation
Refactor the bmap validator into a more complete helper that looks for extents that run off the end of the device, overflow into the next AG, or have invalid flag states. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.h')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
index e36d75799cd5..f3be6416260b 100644
--- a/fs/xfs/libxfs/xfs_bmap.h
+++ b/fs/xfs/libxfs/xfs_bmap.h
@@ -274,4 +274,7 @@ static inline int xfs_bmap_fork_to_state(int whichfork)
}
}
+xfs_failaddr_t xfs_bmap_validate_extent(struct xfs_inode *ip, int whichfork,
+ struct xfs_bmbt_irec *irec);
+
#endif /* __XFS_BMAP_H__ */