3 ms·
> Because of this the kernel name cache may not necessarily know the current name of an open file. If it started out having multiple hardlinks, was opened throu
by jmmv 3y ago
> Because of this the kernel name cache may not necessarily know the current name of an open file. If it started out having multiple hardlinks, was opened through one hardlink, and then that hardlink was removed, the name cache may not know the name of the other remaining hardlink(s).
I found this the hard way when implementing a FUSE file system for macOS that required knowing the “real path” of a file and that faked “hard links” for performance reasons. It was super hard to diagnose and I’m still not sure if there is a solution to the problem I faced. If you are curious, the details of the story are here: https://jmmv.dev/2020/01/osxfuse-hardlinks-dladdr.html https://jmmv.dev/2020/01/osxfuse-hardlinks-dladdr.html