From: Darrick J. Wong Date: Fri, 10 Jul 2020 19:35:36 +0000 (-0400) Subject: xfs_repair: warn when we would have rebuilt a directory X-Git-Tag: xfsprogs-5.7-fixes_2020-07-14~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41f8fc57c681e104cd741450b796d3b242a65dc3;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: warn when we would have rebuilt a directory longform_dir2_entry_check should warn the user when we would have rebuilt a directory had -n not been given on the command line. The missing warning results in repair returning 0 (all clean) when in fact there were things that it would have fixed. Found by running xfs/496 against lents[0].hashval = middlebit. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/repair/phase6.c b/repair/phase6.c index 5e3b394a2..b6391326e 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -2425,6 +2425,9 @@ out_fix: *num_illegal = 0; *need_dot = 0; } else { + if (fixit || dotdot_update) + do_warn( + _("would rebuild directory inode %" PRIu64 "\n"), ino); for (i = 0; i < num_bps; i++) if (bplist[i]) libxfs_buf_relse(bplist[i]);