From: Darrick J. Wong <djwong@xxxxxxxxxx> It's not an error if repair encounters a btree with the maximal height, so don't print warnings. Also, we don't allow zero-height btrees. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- repair/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repair/scan.c b/repair/scan.c index 909c4494..e2d281a2 100644 --- a/repair/scan.c +++ b/repair/scan.c @@ -2297,7 +2297,7 @@ validate_agf( priv.nr_blocks = 0; levels = be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAP]); - if (levels >= XFS_BTREE_MAXLEVELS) { + if (levels == 0 || levels > XFS_BTREE_MAXLEVELS) { do_warn(_("bad levels %u for rmapbt root, agno %d\n"), levels, agno); rmap_avoid_check(); @@ -2323,7 +2323,7 @@ validate_agf( unsigned int levels; levels = be32_to_cpu(agf->agf_refcount_level); - if (levels >= XFS_BTREE_MAXLEVELS) { + if (levels == 0 || levels > XFS_BTREE_MAXLEVELS) { do_warn(_("bad levels %u for refcountbt root, agno %d\n"), levels, agno); refcount_avoid_check();