summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2005-02-01 15:00:05 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2005-02-01 15:00:05 +0000
commit7f1209ff29fd072e2f8d1f49392e63d47962736b (patch)
tree012b57b639a19e4df640a0e9221a38cffced43bd /sys
parentdf191d9c2c4ee1078279484595e605bdc623c910 (diff)
backout nfs_subs.c rev1.51 nfs_vfsops.c rev1.54:
fix preposterous time warnings in the nfs client; caused by false hits in the attribute cache too close to release, save for immediately after unlock
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_subs.c5
-rw-r--r--sys/nfs/nfs_vfsops.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 7101bd71056..4a8d1e0306e 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.51 2005/01/24 00:14:40 marius Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.52 2005/02/01 15:00:04 pvalchev Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1303,8 +1303,7 @@ nfs_getattrcache(vp, vaper)
struct nfsnode *np = VTONFS(vp);
struct vattr *vap;
- if (np->n_attrstamp == 0 ||
- (time_second - np->n_attrstamp) >= nfs_attrtimeo(np)) {
+ if ((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 3e2fe2bc445..c2c74cfe9d2 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.54 2005/01/24 00:14:40 marius Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.55 2005/02/01 15:00:04 pvalchev Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -261,6 +261,15 @@ 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.
*/