|
|
Log in / Subscribe / Register

unlinkat flag?

unlinkat flag?

Posted Nov 21, 2024 17:52 UTC (Thu) by josh (subscriber, #17465)
Parent article: The beginning of the 6.13 merge window

> There is a new sysctl knob, fs.dentry-negative, that controls whether the virtual filesystem (VFS) layer deletes a file's kernel-internal directory entry ("dentry") when the file itself is deleted. It seems that some benchmarks do better when dentries are removed, while others benefit from having a negative dentry left behind, so the kernel developers have put the decision into the system administrator's hands. The default value (zero) means that dentries are not automatically deleted, matching the behavior of previous kernels.

I wonder if it would make sense to add a flag to unlinkat, which lets userspace indicate on a case-by-case basis whether the removed file is likely to be looked for again or not? Userspace is in a great position to know whether a filename is likely to be looked for again or not.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds