summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_subs.c
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2009-01-24 23:30:43 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2009-01-24 23:30:43 +0000
commit86832ad61e0ff002c49152ecaf00eb1aa87d21bb (patch)
treedbd48c51d10c5b6cdf3f3f8919970708427ee95c /sys/nfs/nfs_subs.c
parentd62304bc585972214cce753b7c807f6da7195dc7 (diff)
Use a timespec instead of a time_t for the clients nfsnode
mtime, gives us better granularity, helps with cache consistency. Idea lifted from NetBSD. OK blambert@
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r--sys/nfs/nfs_subs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index da2c2b9158b..3e493518f5c 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.91 2009/01/20 18:03:33 blambert Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.92 2009/01/24 23:30:42 thib Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1063,7 +1063,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
*vpp = vp = nvp;
}
}
- np->n_mtime = mtime.tv_sec;
+ np->n_mtime = mtime;
}
vap = &np->n_vattr;
vap->va_type = vtyp;
@@ -1155,7 +1155,7 @@ nfs_attrtimeo (np)
{
struct vnode *vp = np->n_vnode;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
- int tenthage = (time_second - np->n_mtime) / 10;
+ int tenthage = (time_second - np->n_mtime.tv_sec) / 10;
int minto, maxto;
if (vp->v_type == VDIR) {