summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client/nfs4_vn_subs.c
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/nfs4client/nfs4_vn_subs.c
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/nfs4client/nfs4_vn_subs.c')
-rw-r--r--sys/nfs4client/nfs4_vn_subs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs4client/nfs4_vn_subs.c b/sys/nfs4client/nfs4_vn_subs.c
index cded7f5..dd6617b 100644
--- a/sys/nfs4client/nfs4_vn_subs.c
+++ b/sys/nfs4client/nfs4_vn_subs.c
@@ -98,10 +98,10 @@ nfs4_vnop_loadattrcache(struct vnode *vp, struct nfsv4_fattr *fap,
*/
np = VTONFS(vp);
vap = &np->n_vattr;
- if (vp->v_type != vtyp || np->n_mtime == 0) {
+ if (vp->v_type != vtyp || np->n_mtime.tv_sec == 0) {
bzero(vap, sizeof *vap);
vp->v_type = vtyp;
- np->n_mtime = mtime.tv_sec;
+ np->n_mtime.tv_sec = mtime.tv_sec;
}
vap->va_type = vtyp;
vap->va_mode = (vmode & 07777);
OpenPOWER on IntegriCloud