Skip to content

Commit 674e405

Browse files
J. Bruce FieldsTrond Myklebust
authored andcommitted
nfs: document nfsv4 sillyrename issues
Somebody working on this code asked what the deal was with NFSv4, since this comment notes that it's v2/v3's statelessness that requires sillyrename. Shouldn't hurt to document the answer. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent 94b134a commit 674e405

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎fs/nfs/unlink.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,14 @@ nfs_async_rename(struct inode *old_dir, struct inode *new_dir,
501501
* and only performs the unlink once the last reference to it is put.
502502
*
503503
* The final cleanup is done during dentry_iput.
504+
*
505+
* (Note: NFSv4 is stateful, and has opens, so in theory an NFSv4 server
506+
* could take responsibility for keeping open files referenced. The server
507+
* would also need to ensure that opened-but-deleted files were kept over
508+
* reboots. However, we may not assume a server does so. (RFC 5661
509+
* does provide an OPEN4_RESULT_PRESERVE_UNLINKED flag that a server can
510+
* use to advertise that it does this; some day we may take advantage of
511+
* it.))
504512
*/
505513
int
506514
nfs_sillyrename(struct inode *dir, struct dentry *dentry)

0 commit comments

Comments
 (0)