From 2adc8e08a5f7aae17afc843c62ce2cfe9eccadd1 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 6 Jan 2022 14:13:21 -0800 Subject: [PATCH] xfs_db: stop using XFS_BTREE_MAXLEVELS Use the precomputed per-btree-type max height values. Signed-off-by: Darrick J. Wong --- db/metadump.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/metadump.c b/db/metadump.c index af8b67d5a..2993f06e9 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); -- 2.47.3