aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub/repair.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-16 12:21:56 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-10-14 09:19:32 -0700
commit1ba6fd34ca63feb4ee960d35b87262b6db37529a (patch)
treeb2cad5652c2de34b1888571204016c53d6bff9e7 /fs/xfs/scrub/repair.h
parentxfs: stricter btree height checking when looking for errors (diff)
downloadlinux-dev-1ba6fd34ca63feb4ee960d35b87262b6db37529a.tar.xz
linux-dev-1ba6fd34ca63feb4ee960d35b87262b6db37529a.zip
xfs: stricter btree height checking when scanning for btree roots
When we're scanning for btree roots to rebuild the AG headers, make sure that the proposed tree does not exceed the maximum height for that btree type (and not just XFS_BTREE_MAXLEVELS). Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/repair.h')
-rw-r--r--fs/xfs/scrub/repair.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h
index 3bb152d52a07..840f74ec431c 100644
--- a/fs/xfs/scrub/repair.h
+++ b/fs/xfs/scrub/repair.h
@@ -44,6 +44,9 @@ struct xrep_find_ag_btree {
/* in: buffer ops */
const struct xfs_buf_ops *buf_ops;
+ /* in: maximum btree height */
+ unsigned int maxlevels;
+
/* out: the highest btree block found and the tree height */
xfs_agblock_t root;
unsigned int height;