xfs: scrub free space btrees

Check the extent records free space btrees to ensure that the values
look sane.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
Darrick J. Wong 2017-10-17 21:37:40 -07:00
parent a12890aebb
commit efa7a99ce1
7 changed files with 138 additions and 1 deletions

View file

@ -443,3 +443,19 @@ xfs_scrub_setup_fs(
{
return xfs_scrub_trans_alloc(sc->sm, sc->mp, &sc->tp);
}
/* Set us up with AG headers and btree cursors. */
int
xfs_scrub_setup_ag_btree(
struct xfs_scrub_context *sc,
struct xfs_inode *ip,
bool force_log)
{
int error;
error = xfs_scrub_setup_ag_header(sc, ip);
if (error)
return error;
return xfs_scrub_ag_init(sc, sc->sm->sm_agno, &sc->sa);
}