summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/common.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-05-14 06:34:31 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-15 17:57:05 -0700
commit8389f3ffa22a119b37dc7c2217cd2862bb2ed9da (patch)
treecb736467d60f15c66f599ec5478a8dce52c1d421 /fs/xfs/scrub/common.c
parentc9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 (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/common.c')
-rw-r--r--fs/xfs/scrub/common.c4
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;