diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-14 15:34:31 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-16 02:57:05 +0200 |
commit | 8389f3ffa22a119b37dc7c2217cd2862bb2ed9da (patch) | |
tree | cb736467d60f15c66f599ec5478a8dce52c1d421 /fs/xfs/scrub/common.c | |
parent | xfs: clear sb->s_fs_info on mount failure (diff) | |
download | linux-8389f3ffa22a119b37dc7c2217cd2862bb2ed9da.tar.xz linux-8389f3ffa22a119b37dc7c2217cd2862bb2ed9da.zip |
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/common.c')
-rw-r--r-- | fs/xfs/scrub/common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 95625aa90c24..2ac8576c4670 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -737,6 +737,10 @@ xfs_scrub_should_check_xref( int *error, struct xfs_btree_cur **curpp) { + /* No point in xref if we already know we're corrupt. */ + if (xfs_scrub_skip_xref(sc->sm)) + return false; + if (*error == 0) return true; |