summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfsmount.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2012-01-25 20:05:58 +0000
committerjhb <jhb@FreeBSD.org>2012-01-25 20:05:58 +0000
commit768a468c15a95c443b29381081ac318debea4846 (patch)
tree5f8bcbc509dcfba24c232996c7826a9b95d20dca /sys/nfsclient/nfsmount.h
parentee48ed5fd372f596d4901253bcca015ab3c75fcf (diff)
downloadFreeBSD-src-768a468c15a95c443b29381081ac318debea4846.zip
FreeBSD-src-768a468c15a95c443b29381081ac318debea4846.tar.gz
Add a timeout on positive name cache entries in the NFS client. That is,
we will only trust a positive name cache entry for a specified amount of time before falling back to a LOOKUP RPC, even if the ctime for the file handle matches the cached copy in the name cache entry. The timeout is configured via a new 'nametimeo' mount option and defaults to 60 seconds. It may be set to zero to disable positive name caching entirely. Reviewed by: rmacklem MFC after: 1 week
Diffstat (limited to 'sys/nfsclient/nfsmount.h')
-rw-r--r--sys/nfsclient/nfsmount.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h
index 6b84bdd..77171a1 100644
--- a/sys/nfsclient/nfsmount.h
+++ b/sys/nfsclient/nfsmount.h
@@ -83,6 +83,7 @@ struct nfsmount {
struct rpc_timers nm_timers[NFS_MAX_TIMER]; /* RTT Timers for rpcs */
char nm_principal[MNAMELEN]; /* GSS-API principal of server */
gss_OID nm_mech_oid; /* OID of selected GSS-API mechanism */
+ int nm_nametimeo; /* timeout for +ve entries (sec) */
int nm_negnametimeo; /* timeout for -ve entries (sec) */
/* NFSv4 */
@@ -116,6 +117,10 @@ struct nfsmount {
#define NFS_TPRINTF_DELAY 30
#endif
+#ifndef NFS_DEFAULT_NAMETIMEO
+#define NFS_DEFAULT_NAMETIMEO 60
+#endif
+
#ifndef NFS_DEFAULT_NEGNAMETIMEO
#define NFS_DEFAULT_NEGNAMETIMEO 60
#endif
OpenPOWER on IntegriCloud