diff options
author | marius eriksen <marius@cvs.openbsd.org> | 2005-01-24 00:14:41 +0000 |
---|---|---|
committer | marius eriksen <marius@cvs.openbsd.org> | 2005-01-24 00:14:41 +0000 |
commit | ef792a512406a663c5d8ef1c749e87084c2f0b90 (patch) | |
tree | b595afb98fa2337c711f0ff9e74b8fd07cfc3910 | |
parent | 0d40b9476fa4dfd8820ace56c8b2fa244783229b (diff) |
fix preposterous time warnings in the nfs client; caused by false hits
in the attribute cache
based on original fix by pedro@, ok pedro@, tedu@; testing kettenis@
-rw-r--r-- | sys/nfs/nfs_subs.c | 5 | ||||
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 11 |
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index a93418d73fa..7101bd71056 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.50 2004/08/03 17:11:48 marius Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.51 2005/01/24 00:14:40 marius Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -1303,7 +1303,8 @@ nfs_getattrcache(vp, vaper) struct nfsnode *np = VTONFS(vp); struct vattr *vap; - if ((time_second - np->n_attrstamp) >= nfs_attrtimeo(np)) { + if (np->n_attrstamp == 0 || + (time_second - np->n_attrstamp) >= nfs_attrtimeo(np)) { nfsstats.attrcache_misses++; return (ENOENT); } diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 90b1cb77a4e..3e2fe2bc445 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.53 2004/06/21 23:50:38 tholo Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.54 2005/01/24 00:14:40 marius Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -261,15 +261,6 @@ nfs_mountroot() procp = curproc; /* XXX */ /* - * XXX time must be non-zero when we init the interface or else - * the arp code will wedge. [Fixed now in if_ether.c] - * However, the NFS attribute cache gives false "hits" when - * time_second < NFS_ATTRTIMEO(np) so keep this in for now. - */ - if (time_second < NFS_MAXATTRTIMO) - time_second = NFS_MAXATTRTIMO; - - /* * Call nfs_boot_init() to fill in the nfs_diskless struct. * Side effect: Finds and configures a network interface. */ |