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>
This commit is contained in:
@@ -387,7 +387,8 @@ xfs_scrub_iallocbt_xref_rmap_btreeblks(
|
||||
int error;
|
||||
|
||||
if (!sc->sa.ino_cur || !sc->sa.rmap_cur ||
|
||||
(xfs_sb_version_hasfinobt(&sc->mp->m_sb) && !sc->sa.fino_cur))
|
||||
(xfs_sb_version_hasfinobt(&sc->mp->m_sb) && !sc->sa.fino_cur) ||
|
||||
xfs_scrub_skip_xref(sc->sm))
|
||||
return;
|
||||
|
||||
/* Check that we saw as many inobt blocks as the rmap says. */
|
||||
@@ -424,7 +425,7 @@ xfs_scrub_iallocbt_xref_rmap_inodes(
|
||||
xfs_filblks_t blocks;
|
||||
int error;
|
||||
|
||||
if (!sc->sa.rmap_cur)
|
||||
if (!sc->sa.rmap_cur || xfs_scrub_skip_xref(sc->sm))
|
||||
return;
|
||||
|
||||
/* Check that we saw as many inode blocks as the rmap knows about. */
|
||||
@@ -496,7 +497,7 @@ xfs_scrub_xref_inode_check(
|
||||
bool has_inodes;
|
||||
int error;
|
||||
|
||||
if (!(*icur))
|
||||
if (!(*icur) || xfs_scrub_skip_xref(sc->sm))
|
||||
return;
|
||||
|
||||
error = xfs_ialloc_has_inodes_at_extent(*icur, agbno, len, &has_inodes);
|
||||
|
Reference in New Issue
Block a user