From 5eb1ac9088a6e7fca7e10d2d3c0bbabbdc88adc4 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Fri, 7 Jun 2013 10:25:54 +1000 Subject: [PATCH] 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 --- repair/phase6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.2