diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-16 22:21:56 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-14 19:19:32 +0300 |
commit | 1ba6fd34ca63feb4ee960d35b87262b6db37529a (patch) | |
tree | b2cad5652c2de34b1888571204016c53d6bff9e7 /fs/xfs/scrub/repair.h | |
parent | f4585e82340bfd351339104cc3a03e2f7d4c2e9d (diff) | |
download | linux-1ba6fd34ca63feb4ee960d35b87262b6db37529a.tar.xz |
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.h | 3 |
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; |