]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
A previous change moved the GETATTR RPC for open() calls that hit in the
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 12 Jul 2010 14:27:49 +0000 (14:27 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 12 Jul 2010 14:27:49 +0000 (14:27 +0000)
commit72ccfc240bcd42efc327249d32ce4a88168da40f
tree7c065bda6179bf59cb6a6bc328e8e88a6f00eaaa
parent985fda3dfe86e93862cfd1fabb67f509b32641b1
A previous change moved the GETATTR RPC for open() calls that hit in the
name cache up into nfs_lookup() instead of nfs_open().  Continue this
trend by flushing the attribute cache for leaf nodes in nfs_lookup() during
an open() if we do a LOOKUP RPC.  For NFSv3 this should generally be a NOP
as the attributes are flushed before fetching the post-op attributes from
the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op
attributes should populate the cache.

Now all NFS open() calls will always clear the cached attributes during the
nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC.
As a result, we can remove the conditional flushing of the attribute
cache from nfs_open().

Reviewed by: rmacklem, bde
MFC after: 2 weeks
sys/nfsclient/nfs_vnops.c