summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfsnode.h
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-12-06 19:18:00 +0000
committerps <ps@FreeBSD.org>2004-12-06 19:18:00 +0000
commit8eaa4f53e459fa71fae49ba6fbcc8ddcf23682b0 (patch)
tree4019db19520d82d9c16a47c76254153364dbc9eb /sys/nfsclient/nfsnode.h
parentb894547e6f605eea5875525ab3a9550c942206a6 (diff)
downloadFreeBSD-src-8eaa4f53e459fa71fae49ba6fbcc8ddcf23682b0.zip
FreeBSD-src-8eaa4f53e459fa71fae49ba6fbcc8ddcf23682b0.tar.gz
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
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 21bb0d1..4a4d835 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
*/
OpenPOWER on IntegriCloud