Re: fcntl F_KINFO for

From: Allan Jude <>
Date: Sun, 29 May 2022 00:10:36 UTC
On 5/14/2022 3:53 PM, Konstantin Belousov wrote:
> When open(2) creates a new file, the vnode name is not entered into
> the name cache.  I believe this is done to smoother the case like
> untarring large set of files, which would replace existing cached
> entries with probably not too useful new entries.
> F_KINFO uses name cache to reconstruct the last element of the path,
> on most real file systems like UFS.  If this last element is not cached,
> F_KINFO is unable to return the path.

Now that caches are bigger, might it make sense to have open() w/ 
O_CREAT create these namecache entries? Maybe we could purposely insert 
them in the middle of the list or something to avoid them pushing out 
other new entries or something.

Specifically, having a more reliable way to get the path from an FD 
would be very useful, and maybe we need to reconsider some of the 
classic tradeoffs.

Allan Jude