Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs PR/14817: Gregory McGarry: NFS_V2_ONLY doesn't seem ...
details: https://anonhg.NetBSD.org/src/rev/105ca4b99e24
branches: trunk
changeset: 518708:105ca4b99e24
user: christos <christos%NetBSD.org@localhost>
date: Tue Dec 04 18:38:08 2001 +0000
description:
PR/14817: Gregory McGarry: NFS_V2_ONLY doesn't seem to work.
diffstat:
sys/nfs/nfs_vfsops.c | 6 ++++--
sys/nfs/nfs_vnops.c | 13 +++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
diffs (84 lines):
diff -r efe01df0f709 -r 105ca4b99e24 sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c Tue Dec 04 18:14:20 2001 +0000
+++ b/sys/nfs/nfs_vfsops.c Tue Dec 04 18:38:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vfsops.c,v 1.111 2001/11/10 10:59:10 lukem Exp $ */
+/* $NetBSD: nfs_vfsops.c,v 1.112 2001/12/04 18:38:08 christos Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.111 2001/11/10 10:59:10 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.112 2001/12/04 18:38:08 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -160,8 +160,10 @@
vp = nmp->nm_vnode;
cred = crget();
cred->cr_ngroups = 0;
+#ifndef NFS_V2_ONLY
if (v3 && (nmp->nm_iflag & NFSMNT_GOTFSINFO) == 0)
(void)nfs_fsinfo(nmp, vp, cred, p);
+#endif
nfsstats.rpccnt[NFSPROC_FSSTAT]++;
nfsm_reqhead(vp, NFSPROC_FSSTAT, NFSX_FH(v3));
nfsm_fhtom(vp, v3);
diff -r efe01df0f709 -r 105ca4b99e24 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Tue Dec 04 18:14:20 2001 +0000
+++ b/sys/nfs/nfs_vnops.c Tue Dec 04 18:38:08 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vnops.c,v 1.145 2001/11/30 07:08:53 chs Exp $ */
+/* $NetBSD: nfs_vnops.c,v 1.146 2001/12/04 18:38:09 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.145 2001/11/30 07:08:53 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.146 2001/12/04 18:38:09 christos Exp $");
#include "opt_nfs.h"
#include "opt_uvmhist.h"
@@ -2907,14 +2907,16 @@
} */ *ap = v;
struct nfsv3_pathconf *pcp;
struct vnode *vp = ap->a_vp;
- struct nfsmount *nmp;
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
int32_t t1, t2;
u_int32_t *tl;
caddr_t bpos, dpos, cp, cp2;
int error = 0, attrflag;
+#ifndef NFS_V2_ONLY
+ struct nfsmount *nmp;
unsigned int l;
u_int64_t maxsize;
+#endif
const int v3 = NFS_ISV3(vp);
switch (ap->a_name) {
@@ -2965,6 +2967,7 @@
nfsm_reqdone;
break;
case _PC_FILESIZEBITS:
+#ifndef NFS_V2_ONLY
if (v3) {
nmp = VFSTONFS(vp->v_mount);
if ((nmp->nm_iflag & NFSMNT_GOTFSINFO) == 0)
@@ -2975,7 +2978,9 @@
(maxsize >> l) > 0; l++)
;
*ap->a_retval = l + 1;
- } else {
+ } else
+#endif
+ {
*ap->a_retval = 32; /* NFS V2 limitation */
}
break;
Home |
Main Index |
Thread Index |
Old Index