linux/fs/9p
Jeff Layton ecf3d1f1aa vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
The following set of operations on a NFS client and server will cause

    server# mkdir a
    client# cd a
    server# mv a a.bak
    client# sleep 30  # (or whatever the dir attrcache timeout is)
    client# stat .
    stat: cannot stat `.': Stale NFS file handle

Obviously, we should not be getting an ESTALE error back there since the
inode still exists on the server. The problem is that the lookup code
will call d_revalidate on the dentry that "." refers to, because NFS has
FS_REVAL_DOT set.

nfs_lookup_revalidate will see that the parent directory has changed and
will try to reverify the dentry by redoing a LOOKUP. That of course
fails, so the lookup code returns ESTALE.

The problem here is that d_revalidate is really a bad fit for this case.
What we really want to know at this point is whether the inode is still
good or not, but we don't really care what name it goes by or whether
the dcache is still valid.

Add a new d_op->d_weak_revalidate operation and have complete_walk call
that instead of d_revalidate. The intent there is to allow for a
"weaker" d_revalidate that just checks to see whether the inode is still
good. This is also gives us an opportunity to kill off the FS_REVAL_DOT
special casing.

[AV: changed method name, added note in porting, fixed confusion re
having it possibly called from RCU mode (it won't be)]

Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-02-26 02:46:09 -05:00
..
Kconfig 9p: remove experimental tag from tested configurations 2011-05-25 08:46:38 -05:00
Makefile fs/9p: Move dotl inode operations into a seperate file 2011-01-11 09:58:07 -06:00
acl.c 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
acl.h 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
cache.c 9p: Reduce object size with CONFIG_NET_9P_DEBUG 2012-01-05 10:51:44 -06:00
cache.h fs/9p: When doing inode lookup compare qid details and inode mode bits. 2011-07-23 09:32:48 -05:00
fid.c 9p: Reduce object size with CONFIG_NET_9P_DEBUG 2012-01-05 10:51:44 -06:00
fid.h fs/9p: Prevent multiple inclusion of same header 2011-03-15 09:57:41 -05:00
v9fs.c The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d: 2012-10-12 09:59:23 +09:00
v9fs.h stop passing nameidata to ->lookup() 2012-07-14 16:34:32 +04:00
v9fs_vfs.h 9p: propagate umode_t 2012-01-03 22:55:01 -05:00
vfs_addr.c 9p: Reduce object size with CONFIG_NET_9P_DEBUG 2012-01-05 10:51:44 -06:00
vfs_dentry.c vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op 2013-02-26 02:46:09 -05:00
vfs_dir.c 9p: Reduce object size with CONFIG_NET_9P_DEBUG 2012-01-05 10:51:44 -06:00
vfs_file.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
vfs_inode.c fs/9p: avoid debug OOPS when reading a long symlink 2012-09-06 13:54:53 -05:00
vfs_inode_dotl.c 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
vfs_super.c vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op 2013-02-26 02:46:09 -05:00
xattr.c 9p: add fid-based variant of v9fs_xattr_set() 2013-02-26 02:46:05 -05:00
xattr.h 9p: add fid-based variant of v9fs_xattr_set() 2013-02-26 02:46:05 -05:00
xattr_user.c fs/9p: Add support user. xattr 2010-08-02 14:28:35 -05:00