]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: compare btree block keys to parent block's keys during scrub
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
Source kernel commit: 2fdbec5cbeb93349836d682b1caa5cc72d1b7018

When we're done checking all the records/keys in a btree block, compute
the low and high key of the block and compare them to the associated key
in the parent btree block.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_btree.c
libxfs/xfs_btree.h

index 371720465fbe4f0adee8bbdb2f4a56786d8b70f7..c655d5beeec54987f4a2ade30494569e016e8795 100644 (file)
@@ -2023,7 +2023,7 @@ error0:
 }
 
 /* Find the high key storage area from a regular key. */
-STATIC union xfs_btree_key *
+union xfs_btree_key *
 xfs_btree_high_key_from_key(
        struct xfs_btree_cur    *cur,
        union xfs_btree_key     *key)
@@ -2097,7 +2097,7 @@ xfs_btree_get_node_keys(
 }
 
 /* Derive the keys for any btree block. */
-STATIC void
+void
 xfs_btree_get_keys(
        struct xfs_btree_cur    *cur,
        struct xfs_btree_block  *block,
index fba4a928a1e9eaac5e763ac87dc3d6ac48091049..c0252bdd92f45a21d94fbf9361f80739d145ea4a 100644 (file)
@@ -541,5 +541,9 @@ int64_t xfs_btree_diff_two_ptrs(struct xfs_btree_cur *cur,
 void xfs_btree_get_sibling(struct xfs_btree_cur *cur,
                           struct xfs_btree_block *block,
                           union xfs_btree_ptr *ptr, int lr);
+void xfs_btree_get_keys(struct xfs_btree_cur *cur,
+               struct xfs_btree_block *block, union xfs_btree_key *key);
+union xfs_btree_key *xfs_btree_high_key_from_key(struct xfs_btree_cur *cur,
+               union xfs_btree_key *key);
 
 #endif /* __XFS_BTREE_H__ */