xfs: stricter btree height checking when scanning for btree roots
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:21:56 +0000 (12:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 14 Oct 2021 16:19:32 +0000 (09:19 -0700)
commit1ba6fd34ca63feb4ee960d35b87262b6db37529a
treeb2cad5652c2de34b1888571204016c53d6bff9e7
parentf4585e82340bfd351339104cc3a03e2f7d4c2e9d
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>
fs/xfs/scrub/agheader_repair.c
fs/xfs/scrub/repair.h