From: Dave Chinner Date: Fri, 7 Jun 2013 00:25:54 +0000 (+1000) Subject: xfs_repair: always use incore header for directory block checks X-Git-Tag: v3.2.0-alpha1~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5eb1ac9088a6e7fca7e10d2d3c0bbabbdc88adc4;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: always use incore header for directory block checks Otherwise we get failures to validate the block on CRC enabled filesystems. Signed-off-by: Dave Chinner Reviewed-by: Ben Myers Signed-off-by: Ben Myers --- diff --git a/repair/phase6.c b/repair/phase6.c index 09052cc15..6976d0cd7 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -1849,7 +1849,7 @@ longform_dir2_check_leaf( if (!(leafhdr.magic == XFS_DIR2_LEAF1_MAGIC || leafhdr.magic == XFS_DIR3_LEAF1_MAGIC) || leafhdr.forw || leafhdr.back || - leafhdr.count < leaf->hdr.stale || + leafhdr.count < leafhdr.stale || leafhdr.count > xfs_dir3_max_leaf_ents(mp, leaf) || (char *)&ents[leafhdr.count] > (char *)bestsp) {