Skip to contentSkip to conversation

xfs_db: fix attribute leaf output for ATTR3 format

PATCH In review Dave Chinner 2 participants 2 messages Feb 5, 2014 – Feb 6, 2014

lore
Share & tools
lore
#0 lore raw

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.

---
 db/attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
db/attr.c +1 -1
index 740d564..caa154e 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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.

---

Quoted 9 lines
 db/attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
db/attr.c +0 -0
index 740d564..caa154e 100644

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