]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix metadump level comparisons
authorDarrick J. Wong <djwong@kernel.org>
Thu, 6 Jan 2022 22:13:21 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 17 Mar 2022 21:40:27 +0000 (14:40 -0700)
It's not an error if metadump encounters a btree with the maximal
height, so don't print warnings.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
db/metadump.c

index 057a372925ac68f9515fd99ad49a1ee4c841fa3d..cc7a4a55074bddc26870d960f170fc4443906272 100644 (file)
@@ -487,7 +487,7 @@ copy_free_bno_btree(
                                        "root in agf %u", root, agno);
                return 1;
        }
-       if (levels >= XFS_BTREE_MAXLEVELS) {
+       if (levels > XFS_BTREE_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 > XFS_BTREE_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 > XFS_BTREE_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 > XFS_BTREE_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 > XFS_BTREE_MAXLEVELS) {
                if (show_warnings)
                        print_warning("invalid level (%u) in inobt root "
                                        "in agi %u", levels, agno);