summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/rtbitmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-05-14 15:34:31 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-16 02:57:05 +0200
commit8389f3ffa22a119b37dc7c2217cd2862bb2ed9da (patch)
treecb736467d60f15c66f599ec5478a8dce52c1d421 /fs/xfs/scrub/rtbitmap.c
parentxfs: clear sb->s_fs_info on mount failure (diff)
downloadlinux-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/rtbitmap.c')
-rw-r--r--fs/xfs/scrub/rtbitmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/scrub/rtbitmap.c b/fs/xfs/scrub/rtbitmap.c
index 39c41dfe08ee..8b048f107af2 100644
--- a/fs/xfs/scrub/rtbitmap.c
+++ b/fs/xfs/scrub/rtbitmap.c
@@ -110,6 +110,9 @@ xfs_scrub_xref_is_used_rt_space(
bool is_free;
int error;
+ if (xfs_scrub_skip_xref(sc->sm))
+ return;
+
xfs_ilock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP);
error = xfs_rtalloc_extent_is_free(sc->mp, sc->tp, fsbno, len,
&is_free);