nfs_sillyrename(9)
π nfs_sillyrename π
ok so this is nfs_sillyrename(9) from the Kernel API Manual and bestie, the name is not a joke, the function is literally called that π
β¨ NAME β¨
nfs_sillyrename β do a silly-rename on a dentry π¦
πΈ SYNOPSIS πΈ
int nfs_sillyrename (struct inode *dir , struct dentry *dentry );
π ARGUMENTS π
dirβ the inode of the directory that containsdentry. it's the home, the address, the group chat this file lives in πdentryβ the actual dentry getting sillyrenamed. this is our main character β¨
π DESCRIPTION π
ok so picture this: NFSv2/3 is stateless π the server literally has no idea when the client is holding a file open. none. zero. it's giving "we've never met" energy.
and that's a whole problem, because if an app has a file open and someone unlinks it, things get weird. so to stop that from happening, the client does a "silly-rename" π
what even is a silly-rename, you ask? it renames the file to a hidden file in the same directory π«Ά and then it just... waits. it only actually performs the unlink once the last reference to the file is put. patient queen behavior, honestly π
the final cleanup happens during dentry_iput.
π tiny side note, and it's kind of a whole thing: NFSv4 is stateful and it actually has opens, so in theory an NFSv4 server could take responsibility for keeping open files referenced. the server would also need to guarantee that opened-but-deleted files survive reboots. but β and this is the important part β we may not assume a server does that. (RFC 5661does provide anOPEN4_RESULT_PRESERVE_UNLINKEDflag that a server can use to advertise that it does this; some day we may take advantage of it.) so like, someday. not today. β
π₯ SEE ALSO π₯
Kernel file ./fs/nfs/unlink.c plus the whole friend group:
nfs_free_unlinkdata(9)nfs_async_unlink_done(9)nfs_async_unlink_release(9)nfs_async_unlink(9)nfs_complete_unlink(9)nfs_async_rename_done(9)nfs_async_rename_release(9)nfs_async_rename(9)
and that's the page!! π this one lives down in ./fs/nfs and it's dated October 2026 β so like, from the future, iconic of it honestly πβ¨ slay, go rename something silly π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms