Use the precomputed per-btree-type max height values.
[sandeen: note that >= changes to > here; The maximal value is
fine, but with the precomputed value specific to this filesystem,
our new limit is the actual acceptable max, vs. XFS_BTREE_MAXLEVELS
which was an absolute design max and was larger than most filesystems
could create.]
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
priv.nr_blocks = 0;
levels = be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]);
- if (levels == 0 || levels > XFS_BTREE_MAXLEVELS) {
+ if (levels == 0 || levels > mp->m_rmap_maxlevels) {
do_warn(_("bad levels %u for rmapbt root, agno %d\n"),
levels, agno);
rmap_avoid_check();
unsigned int levels;
levels = be32_to_cpu(agf->agf_refcount_level);
- if (levels == 0 || levels > XFS_BTREE_MAXLEVELS) {
+ if (levels == 0 || levels > mp->m_refc_maxlevels) {
do_warn(_("bad levels %u for refcountbt root, agno %d\n"),
levels, agno);
refcount_avoid_check();