xfs
[Top] [All Lists]

Re: [PATCH] xfs_db: fix attribute leaf output for ATTR3 format

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH] xfs_db: fix attribute leaf output for ATTR3 format
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 06 Feb 2014 08:09:35 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1391587365-5066-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1391587365-5066-1-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 02/05/2014 03:02 AM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> attr3_leaf_entries_count() checks against the wrong magic number.
> hence returns zero for an entry count when it should be returning a
> value. Fixing this makes xfs/021 pass on CRC enabled filesystems.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  db/attr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/db/attr.c b/db/attr.c
> index 740d564..caa154e 100644
> --- a/db/attr.c
> +++ b/db/attr.c
> @@ -170,7 +170,7 @@ attr3_leaf_entries_count(
>       struct xfs_attr3_leafblock *leaf = obj;
>  
>       ASSERT(startoff == 0);
> -     if (be16_to_cpu(leaf->hdr.info.hdr.magic) != XFS_ATTR_LEAF_MAGIC)
> +     if (be16_to_cpu(leaf->hdr.info.hdr.magic) != XFS_ATTR3_LEAF_MAGIC)
>               return 0;
>       return be16_to_cpu(leaf->hdr.count);
>  }
> 

<Prev in Thread] Current Thread [Next in Thread>