From: Darrick J. Wong <djwong@xxxxxxxxxx> Use the precomputed per-btree-type max height values. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- db/metadump.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/metadump.c b/db/metadump.c index af8b67d5..2993f06e 100644 --- a/db/metadump.c +++ b/db/metadump.c @@ -487,7 +487,7 @@ copy_free_bno_btree( "root in agf %u", root, agno); return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > mp->m_alloc_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in bnobt root " "in agf %u", levels, agno); @@ -515,7 +515,7 @@ copy_free_cnt_btree( "root in agf %u", root, agno); return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > mp->m_alloc_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in cntbt root " "in agf %u", levels, agno); @@ -587,7 +587,7 @@ copy_rmap_btree( "root in agf %u", root, agno); return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > mp->m_rmap_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in rmapbt root " "in agf %u", levels, agno); @@ -659,7 +659,7 @@ copy_refcount_btree( "root in agf %u", root, agno); return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > mp->m_refc_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in refcntbt root " "in agf %u", levels, agno); @@ -2650,7 +2650,7 @@ copy_inodes( "root in agi %u", root, agno); return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > M_IGEO(mp)->inobt_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in inobt root " "in agi %u", levels, agno); @@ -2672,7 +2672,7 @@ copy_inodes( return 1; } - if (levels > XFS_BTREE_MAXLEVELS) { + if (levels > M_IGEO(mp)->inobt_maxlevels) { if (show_warnings) print_warning("invalid level (%u) in finobt " "root in agi %u", levels, agno);