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/rtbitmap.c | |
parent | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 (diff) | |
download | linux-next-8389f3ffa22a119b37dc7c2217cd2862bb2ed9da.tar.gz |
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.c | 3 |
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); |