summaryrefslogtreecommitdiffstats
path: root/sys/fs/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/fs/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/fs/nfsclient/nfsmount.h')
-rw-r--r--sys/fs/nfsclient/nfsmount.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfsmount.h b/sys/fs/nfsclient/nfsmount.h
index b62a430..8068c28 100644
--- a/sys/fs/nfsclient/nfsmount.h
+++ b/sys/fs/nfsclient/nfsmount.h
@@ -66,6 +66,7 @@ struct nfsmount {
u_int64_t nm_maxfilesize; /* maximum file size */
int nm_tprintf_initial_delay; /* initial delay */
int nm_tprintf_delay; /* interval for messages */
+ int nm_nametimeo; /* timeout for +ve entries (sec) */
int nm_negnametimeo; /* timeout for -ve entries (sec) */
/* Newnfs additions */
@@ -106,6 +107,10 @@ struct nfsmount {
*/
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
+#ifndef NFS_DEFAULT_NAMETIMEO
+#define NFS_DEFAULT_NAMETIMEO 60
+#endif
+
#ifndef NFS_DEFAULT_NEGNAMETIMEO
#define NFS_DEFAULT_NEGNAMETIMEO 60
#endif
OpenPOWER on IntegriCloud