diff mbox series

[24/48] xfs_db: fix metadump level comparisons

Message ID 164263832432.865554.12949672536622727220.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs: sync libxfs with 5.16 | expand

Commit Message

Darrick J. Wong Jan. 20, 2022, 12:25 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

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 |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Eric Sandeen April 28, 2022, 3:02 a.m. UTC | #1
On 1/19/22 6:25 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> 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>

Gonna pull these in before the maxlevel computation patches since
(I think) they tighten up the range.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  db/metadump.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> 
> diff --git a/db/metadump.c b/db/metadump.c
> index 057a3729..cc7a4a55 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 > 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);
>
diff mbox series

Patch

diff --git a/db/metadump.c b/db/metadump.c
index 057a3729..cc7a4a55 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 > 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);