Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs ATTRTIMEO takes 2 args.



details:   https://anonhg.NetBSD.org/src/rev/ae4893fc7cb9
branches:  trunk
changeset: 584464:ae4893fc7cb9
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 19 00:49:52 2005 +0000

description:
ATTRTIMEO takes 2 args.

diffstat:

 sys/nfs/nfs_subs.c   |  7 ++++---
 sys/nfs/nfs_vfsops.c |  6 +++---
 sys/nfs/nfs_vnops.c  |  7 ++++---
 3 files changed, 11 insertions(+), 9 deletions(-)

diffs (88 lines):

diff -r eb03d1d62903 -r ae4893fc7cb9 sys/nfs/nfs_subs.c
--- a/sys/nfs/nfs_subs.c        Mon Sep 19 00:43:17 2005 +0000
+++ b/sys/nfs/nfs_subs.c        Mon Sep 19 00:49:52 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_subs.c,v 1.151 2005/08/19 12:47:23 yamt Exp $      */
+/*     $NetBSD: nfs_subs.c,v 1.152 2005/09/19 00:53:55 christos Exp $  */
 
 /*
  * Copyright (c) 1989, 1993
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.151 2005/08/19 12:47:23 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.152 2005/09/19 00:53:55 christos Exp $");
 
 #include "fs_nfs.h"
 #include "opt_nfs.h"
@@ -1863,10 +1863,11 @@
        struct vattr *vaper;
 {
        struct nfsnode *np = VTONFS(vp);
+       struct nfsmount *nmp = VFSTONFS(vp->v_mount);
        struct vattr *vap;
 
        if (np->n_attrstamp == 0 ||
-           (mono_time.tv_sec - np->n_attrstamp) >= NFS_ATTRTIMEO(np)) {
+           (mono_time.tv_sec - np->n_attrstamp) >= NFS_ATTRTIMEO(nmp, np)) {
                nfsstats.attrcache_misses++;
                return (ENOENT);
        }
diff -r eb03d1d62903 -r ae4893fc7cb9 sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c      Mon Sep 19 00:43:17 2005 +0000
+++ b/sys/nfs/nfs_vfsops.c      Mon Sep 19 00:49:52 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vfsops.c,v 1.148 2005/06/09 02:19:59 atatat Exp $  */
+/*     $NetBSD: nfs_vfsops.c,v 1.149 2005/09/19 00:49:52 christos Exp $        */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.148 2005/06/09 02:19:59 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.149 2005/09/19 00:49:52 christos Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -318,7 +318,7 @@
         * 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.tv_sec < NFS_ATTRTIMEO(np) so keep this in for now.
+        * time.tv_sec < NFS_ATTRTIMEO(nmp, np) so keep this in for now.
         */
        if (time.tv_sec < NFS_MAXATTRTIMO)
                time.tv_sec = NFS_MAXATTRTIMO;
diff -r eb03d1d62903 -r ae4893fc7cb9 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c       Mon Sep 19 00:43:17 2005 +0000
+++ b/sys/nfs/nfs_vnops.c       Mon Sep 19 00:49:52 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vnops.c,v 1.226 2005/08/19 10:08:48 yamt Exp $     */
+/*     $NetBSD: nfs_vnops.c,v 1.227 2005/09/19 00:49:52 christos Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.226 2005/08/19 10:08:48 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.227 2005/09/19 00:49:52 christos Exp $");
 
 #include "opt_inet.h"
 #include "opt_nfs.h"
@@ -338,9 +338,10 @@
 #endif
        int cachevalid;
        struct nfsnode *np = VTONFS(vp);
+       struct nfsmount *nmp = VFSTONFS(vp->v_mount);
 
        cachevalid = (np->n_accstamp != -1 &&
-           (mono_time.tv_sec - np->n_accstamp) < NFS_ATTRTIMEO(np) &&
+           (mono_time.tv_sec - np->n_accstamp) < NFS_ATTRTIMEO(nmp, np) &&
            np->n_accuid == ap->a_cred->cr_uid);
 
        /*



Home | Main Index | Thread Index | Old Index