summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/inode.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-17 05:53:08 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-18 08:00:45 +0300
commitd852657ccfc0e45570989a5f142e11c950d9a793 (patch)
tree23188ac6aceec46e5e607e1b6489b16c3a5ac0f2 /fs/xfs/scrub/inode.c
parent2e6f27561b798710fd7c89118d8b489231408a80 (diff)
downloadlinux-d852657ccfc0e45570989a5f142e11c950d9a793.tar.xz
xfs: cross-reference reverse-mapping btree
When scrubbing various btrees, we should cross-reference the records with the reverse mapping btree and ensure that traversing the btree finds the same number of blocks that the rmapbt thinks are owned by that btree. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/inode.c')
-rw-r--r--fs/xfs/scrub/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c
index 5eac188d18ea..53fcd215c0f5 100644
--- a/fs/xfs/scrub/inode.c
+++ b/fs/xfs/scrub/inode.c
@@ -36,6 +36,7 @@
#include "xfs_ialloc.h"
#include "xfs_da_format.h"
#include "xfs_reflink.h"
+#include "xfs_rmap.h"
#include "scrub/xfs_scrub.h"
#include "scrub/scrub.h"
#include "scrub/common.h"
@@ -632,6 +633,7 @@ xfs_scrub_inode_xref(
xfs_ino_t ino,
struct xfs_dinode *dip)
{
+ struct xfs_owner_info oinfo;
xfs_agnumber_t agno;
xfs_agblock_t agbno;
int error;
@@ -648,6 +650,8 @@ xfs_scrub_inode_xref(
xfs_scrub_xref_is_used_space(sc, agbno, 1);
xfs_scrub_inode_xref_finobt(sc, ino);
+ xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_INODES);
+ xfs_scrub_xref_is_owned_by(sc, agbno, 1, &oinfo);
xfs_scrub_ag_free(sc, &sc->sa);
}