xfs_db: fix attribute leaf output for ATTR3 format
PATCH 1/1 xfs_db: fix attribute leaf output for ATTR3 format
From: Dave Chinner <[email protected]>
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 <[email protected]>
--- db/attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
db/attr.c +1 -1
@@ -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); }
Signature · 6 lines
1.8.4.rc3 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Dave Chinner
From: Dave Chinner <[email protected]>
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 <[email protected]>---
Reviewed-by Brian Foster <[email protected]>
Quoted 9 lines
db/attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)db/attr.c +0
-0
db/attr.c attr3_leaf_entries_count( · line 176
Quoted 8 lines
db/attr.c +1
-1@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs