summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/alloc.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/alloc.c
parentc9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 (diff)
downloadlinux-stable-8389f3ffa22a119b37dc7c2217cd2862bb2ed9da.tar.gz
linux-stable-8389f3ffa22a119b37dc7c2217cd2862bb2ed9da.tar.bz2
linux-stable-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/alloc.c')
-rw-r--r--fs/xfs/scrub/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c
index 517c079d3f68..941a0a55224e 100644
--- a/fs/xfs/scrub/alloc.c
+++ b/fs/xfs/scrub/alloc.c
@@ -70,7 +70,7 @@ xfs_scrub_allocbt_xref_other(
pcur = &sc->sa.cnt_cur;
else
pcur = &sc->sa.bno_cur;
- if (!*pcur)
+ if (!*pcur || xfs_scrub_skip_xref(sc->sm))
return;
error = xfs_alloc_lookup_le(*pcur, agbno, len, &has_otherrec);
@@ -172,7 +172,7 @@ xfs_scrub_xref_is_used_space(
bool is_freesp;
int error;
- if (!sc->sa.bno_cur)
+ if (!sc->sa.bno_cur || xfs_scrub_skip_xref(sc->sm))
return;
error = xfs_alloc_has_record(sc->sa.bno_cur, agbno, len, &is_freesp);