From: Dave Chinner Date: Wed, 19 Feb 2014 00:52:25 +0000 (+1100) Subject: xfs_db: fix attribute leaf output for ATTR3 format X-Git-Tag: v3.2.0-rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e13d0f78e157cbfabdc79e06b0270f7ef6117b72;p=thirdparty%2Fxfsprogs-dev.git xfs_db: fix attribute leaf output for ATTR3 format 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 Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- diff --git a/db/attr.c b/db/attr.c index 740d56497..caa154e17 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); }