linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_db: fix attribute leaf output for ATTR3 format
@ 2014-02-05  8:02 Dave Chinner
  2014-02-06 13:09 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Chinner @ 2014-02-05  8:02 UTC (permalink / raw)
  To: xfs

From: Dave Chinner <dchinner@redhat.com>

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@redhat.com>
---
 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);
 }
-- 
1.8.4.rc3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs_db: fix attribute leaf output for ATTR3 format
  2014-02-05  8:02 [PATCH] xfs_db: fix attribute leaf output for ATTR3 format Dave Chinner
@ 2014-02-06 13:09 ` Brian Foster
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Foster @ 2014-02-06 13:09 UTC (permalink / raw)
  To: xfs

On 02/05/2014 03:02 AM, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> 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@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

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

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-06 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  8:02 [PATCH] xfs_db: fix attribute leaf output for ATTR3 format Dave Chinner
2014-02-06 13:09 ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).