Re: [PATCH 5/5] xfs: ask the dentry cache if it knows the parent of a directory

Christoph Hellwig
2024-03-27T11:16:31Z

On Tue, Mar 26, 2024 at 07:04:50PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> It's possible that the dentry cache can tell us the parent of a
> directory. Therefore, when repairing directory dot dot entries, query
> the dcache as a last resort before scanning the entire filesystem.

The code looks fine, but how high is the chance that we actually have
a valid dcache entry for a file in a corrupted directory?