From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> 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 <darrick.wong@xxxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> --- repair/phase6.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repair/phase6.c b/repair/phase6.c index 5e3b394a..b6391326 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -2425,6 +2425,9 @@ longform_dir2_entry_check(xfs_mount_t *mp, *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]);