Cleanup some ESTALE issues on the client when files are replaced on
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 24 Nov 2004 08:37:16 +0000 (08:37 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 24 Nov 2004 08:37:16 +0000 (08:37 +0000)
commit806dcf9ae68dc966aa9b5ee3a41a04d543805814
tree0e0b8f3e8cf6b65efd294c9463c75ee9e31238c8
parent218b5aa10154344a1534f8d177f38fdde0b2316b
Cleanup some ESTALE issues on the client when files are replaced on
an NFS server.  Even though the attribute cache has expired DragonFly
still maintains a vnode in the namecache.  If a file is replaced on the
server the vnode's file handle will become invalid.

Force re-resolution of the namecache entry rather then replacing the vnode's
file handle, so programs with open descriptors to the dead file continue to
get a proper error return while lookups succeed in finding the new version
of the file.

In this patch ESTALE is checked in strategic places:  stat(), access(), and
open().  It is an imperfect solution at the moment but it seems to work pretty
well.  This should bring NFS client operations back up to FreeBSD-4.x
standards.
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c