Re: [PATCH 24/48] xfs_db: fix metadump level comparisons

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/19/22 6:25 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  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);
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux