diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-14 06:34:31 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-15 17:57:05 -0700 |
commit | 8389f3ffa22a119b37dc7c2217cd2862bb2ed9da (patch) | |
tree | cb736467d60f15c66f599ec5478a8dce52c1d421 /fs/xfs/scrub/inode.c | |
parent | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 (diff) |
xfs: skip scrub xref if corruption already noted
Don't bother looking for cross-referencing problems if the metadata is
already corrupt or we've already found a cross-referencing problem.
Since we added a helper function for flags testing, convert existing
users to use it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/inode.c')
-rw-r--r-- | fs/xfs/scrub/inode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c index e15b1bc5053f..550c0cf70a92 100644 --- a/fs/xfs/scrub/inode.c +++ b/fs/xfs/scrub/inode.c @@ -448,7 +448,7 @@ xfs_scrub_inode_xref_finobt( int has_record; int error; - if (!sc->sa.fino_cur) + if (!sc->sa.fino_cur || xfs_scrub_skip_xref(sc->sm)) return; agino = XFS_INO_TO_AGINO(sc->mp, ino); @@ -491,6 +491,9 @@ xfs_scrub_inode_xref_bmap( xfs_filblks_t acount; int error; + if (xfs_scrub_skip_xref(sc->sm)) + return; + /* Walk all the extents to check nextents/naextents/nblocks. */ error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_DATA_FORK, &nextents, &count); |