]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 23 Mar 2018 17:06:57 +0000 (10:06 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 24 Mar 2018 01:05:09 +0000 (18:05 -0700)
commit5f7b3e0f7afa6a5643373e12c289980e9c491769
tree2a076535b1f5bad53f3fa8ec2dbe70bc5ff078e5
parent3890bc1b95de1adfb198ca0e3b87cb44a9ae2b91
xfs: xfs_scrub_iallocbt_xref_rmap_inodes should use xref_set_corrupt

In xfs_scrub_iallocbt_xref_rmap_inodes we're checking inodes against
rmap records, so we should use xfs_scrub_btree_xref_set_corrupt if we
encounter discrepancies here so that we know that it's a cross
referencing error, not necessarily a corruption in the inobt itself.

The userspace xfs_scrub program will try to repair outright corruptions
in the agi/inobt prior to phase 3 so that the inode scan will proceed.
If only a cross-referencing error is noted, the repair program defers
the repair attempt until it can check the other space metadata at least
once.

It is therefore essential that the inobt scrubber can correctly
distinguish between corruptions and "unable to cross-reference something
else with this inobt".  The same reasoning applies to "xfs: record inode
buf errors as a xref error in inobt scrubber".

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/ialloc.c