NFS silly rename
NFS silly rename is a client workaround that temporarily renames an in-use file's directory entry and defers its removal until local references are released.
Linux v6.12 uses a hidden .nfs name and deferred unlink. The nfs_unlink branch is conditional on a dentry reference count above one and absence of the inode's preservation flag; this count is not a file-descriptor count. [3] [2] The original Sun paper documents client-crash leftovers and a cross-client removal limitation, not modern fleet rates. [1]
Relations
- related
- nfs-storage, nfs-preserve-unlinked, unlink, open-file-description
Advantages
- Helps preserve access through existing local references while removing the application's original name.
Limitations
- Does not establish a complete inventory of other clients' opens.
- A hidden name is not evidence of media failure, successful cleanup or secure erasure.
Citations
- R. Sandberg, D. Goldberg, S. Kleiman, D. Walsh and B. Lyon. Design and Implementation of the Sun Network Filesystem. Summer USENIX 1985, pp. 119-130; open-file semantics, pp. 126-127.
- Linux v6.12, fs/nfs/unlink.c: nfs_sillyrename and asynchronous cleanup.
- Linux v6.12, fs/nfs/dir.c: nfs_unlink gates silly rename on the inode preservation flag.
- Why deleted NFS files become .nfs files