Date: Sat, 28 May 2022 20:10:36 -0400 From: Allan Jude <allanjude@freebsd.org> To: freebsd-hackers@freebsd.org Subject: Re: fcntl F_KINFO for Message-ID: <d8b13b99-c6f5-66bc-59c1-fded827c2759@freebsd.org> In-Reply-To: <YoAIoi8VqHjnIw8t@kib.kiev.ua> References: <5e7863b6-4c57-16a2-0b54-655defefb347@gmail.com> <YoAIoi8VqHjnIw8t@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d8b13b99-c6f5-66bc-59c1-fded827c2759>