When a file is unlinked while still opened, the server might lose
access to it if it's expunged from LruCache, as we no longer have a
cached path to re-open it.
To prevent this from happening, we add the map "pinned_files" where we
keep track of unlinked but still referenced inodes. Once the inode is
no longer referenced, the entry is removed from "pinned_files" and, as
consequence, the associated "File" is dropped and the file descriptor
closed.
When a file is unlinked while still opened, the server might lose access to it if it's expunged from LruCache, as we no longer have a cached path to re-open it.
To prevent this from happening, we add the map "pinned_files" where we keep track of unlinked but still referenced inodes. Once the inode is no longer referenced, the entry is removed from "pinned_files" and, as consequence, the associated "File" is dropped and the file descriptor closed.
Signed-off-by: Sergio Lopez slp@sinrega.org