Re: [PATCH v3 05/19] VFS: introduce d_alloc_noblock()

Al Viro
2026-04-28T02:22:41Z

On Mon, Apr 27, 2026 at 02:01:23PM +1000, NeilBrown wrote:
> From: NeilBrown <neil@brown.name>
>
> Several filesystems use the results of readdir to prime the dcache.
> These filesystems use d_alloc_parallel() which can block if there is a
> concurrent lookup. Blocking in that case is pointless as the lookup
> will add info to the dcache and there is no value in the readdir waiting
> to see if it should add the info too.

... except that there is - large part of the reasons for that in the original
user (procfs) is that we want getdents() + open() + fstat() + compare ->st_ino
from fstat() with ->d_ino from getdents() to work, even if you race with lookup
from another process coming in the middle of your getdents().

What are your plans in that area?