summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/refcount.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-01-17 03:53:05 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2018-01-18 06:00:45 +0100
commit166d76410d7ac08ba2fd90f33ebb545e21fd6b3a (patch)
tree68a0e3511cc8c6fb9511a6e5dc4844d98c6c8a90 /fs/xfs/scrub/refcount.c
parentxfs: check btree block ownership with bnobt/rmapbt when scrubbing btree (diff)
downloadlinux-166d76410d7ac08ba2fd90f33ebb545e21fd6b3a.tar.xz
linux-166d76410d7ac08ba2fd90f33ebb545e21fd6b3a.zip
xfs: introduce scrubber cross-referencing stubs
Create some stubs that will be used to cross-reference metadata records. The actual cross-referencing will be filled in by subsequent patches. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/refcount.c')
-rw-r--r--fs/xfs/scrub/refcount.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/xfs/scrub/refcount.c b/fs/xfs/scrub/refcount.c
index 2f88a8d44bd0..4c550b3bfbe6 100644
--- a/fs/xfs/scrub/refcount.c
+++ b/fs/xfs/scrub/refcount.c
@@ -50,6 +50,18 @@ xfs_scrub_setup_ag_refcountbt(
/* Reference count btree scrubber. */
+/* Cross-reference with the other btrees. */
+STATIC void
+xfs_scrub_refcountbt_xref(
+ struct xfs_scrub_context *sc,
+ xfs_agblock_t agbno,
+ xfs_extlen_t len,
+ xfs_nlink_t refcount)
+{
+ if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
+ return;
+}
+
/* Scrub a refcountbt record. */
STATIC int
xfs_scrub_refcountbt_rec(
@@ -83,6 +95,8 @@ xfs_scrub_refcountbt_rec(
if (refcount == 0)
xfs_scrub_btree_set_corrupt(bs->sc, bs->cur, 0);
+ xfs_scrub_refcountbt_xref(bs->sc, bno, len, refcount);
+
return error;
}