aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfsnode.h
diff options
context:
space:
mode:
authorPaul Saab <ps@FreeBSD.org>2004-12-06 19:18:00 +0000
committerPaul Saab <ps@FreeBSD.org>2004-12-06 19:18:00 +0000
commitddc6c4007545822682b265cf6870ef0aa2cd3d42 (patch)
tree4019db19520d82d9c16a47c76254153364dbc9eb /sys/nfsclient/nfsnode.h
parent6a4b48f4882847e6a5312bf775021e3ae0eaebc1 (diff)
downloadsrc-ddc6c4007545822682b265cf6870ef0aa2cd3d42.tar.gz
src-ddc6c4007545822682b265cf6870ef0aa2cd3d42.zip
2 fixes that improve on the consistency of the NFS client cache.
- Change the cached mtime to a 'struct timespec' from a time_t. Improving the precision of the cached mtime tightens up NFS' "close-to-open" consistency considerably. - Always force an over-the-wire consistency check from nfs_open() (unless the file is marked modified). This further improves NFS' "close-to-open" consistency. Submitted by: Mohan Srinivasan mohans at yahoo-inc dot com
Notes
Notes: svn path=/head/; revision=138473
Diffstat (limited to 'sys/nfsclient/nfsnode.h')
-rw-r--r--sys/nfsclient/nfsnode.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h
index 21bb0d184f08..4a4d835e7f00 100644
--- a/sys/nfsclient/nfsnode.h
+++ b/sys/nfsclient/nfsnode.h
@@ -97,7 +97,7 @@ struct nfsnode {
u_int32_t n_mode; /* ACCESS mode cache */
uid_t n_modeuid; /* credentials having mode */
time_t n_modestamp; /* mode cache timestamp */
- time_t n_mtime; /* Prev modify time. */
+ struct timespec n_mtime; /* Prev modify time. */
time_t n_ctime; /* Prev create time. */
time_t n_expiry; /* Lease expiry time */
nfsfh_t *n_fhp; /* NFS File Handle */
@@ -155,6 +155,8 @@ struct nfsnode {
#define VTONFS(vp) ((struct nfsnode *)(vp)->v_data)
#define NFSTOV(np) ((struct vnode *)(np)->n_vnode)
+#define NFS_TIMESPEC_COMPARE(T1, T2) (((T1)->tv_sec != (T2)->tv_sec) || ((T1)->tv_nsec != (T2)->tv_nsec))
+
/*
* Queue head for nfsiod's
*/