summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
committerphk <phk@FreeBSD.org>1995-12-17 21:14:36 +0000
commit2a5a36a02853b65f9dcdd33ca804b7b132403350 (patch)
tree0abc9dfd2498cac032fdc78b264f4351548fce5a /sys/nfs
parentbaca7dc09c90e600a6551ac34435856837a2a2fd (diff)
downloadFreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.zip
FreeBSD-src-2a5a36a02853b65f9dcdd33ca804b7b132403350.tar.gz
Staticize.
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs.h18
-rw-r--r--sys/nfs/nfs_bio.c6
-rw-r--r--sys/nfs/nfs_common.c11
-rw-r--r--sys/nfs/nfs_nqlease.c36
-rw-r--r--sys/nfs/nfs_serv.c18
-rw-r--r--sys/nfs/nfs_socket.c26
-rw-r--r--sys/nfs/nfs_srvcache.c7
-rw-r--r--sys/nfs/nfs_subs.c11
-rw-r--r--sys/nfs/nfs_syscalls.c17
-rw-r--r--sys/nfs/nfs_vfsops.c102
-rw-r--r--sys/nfs/nfsmount.h49
-rw-r--r--sys/nfs/nfsnode.h3
-rw-r--r--sys/nfs/nqnfs.h3
13 files changed, 124 insertions, 183 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index 58b1e97..03464f4 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nfs.h,v 1.14 1995/11/21 12:54:38 bde Exp $
+ * $Id: nfs.h,v 1.15 1995/12/03 10:02:41 bde Exp $
*/
#ifndef _NFS_NFS_H_
@@ -502,8 +502,6 @@ int nfsm_disct __P((struct mbuf **,caddr_t *,int,int,caddr_t *));
void nfsm_srvfattr __P((struct nfsrv_descript *,struct vattr *,struct nfs_fattr *));
void nfsm_srvwcc __P((struct nfsrv_descript *,int,struct vattr *,int,struct vattr *,struct mbuf **,char **));
void nfsm_srvpostopattr __P((struct nfsrv_descript *,int,struct vattr *,struct mbuf **,char **));
-int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,struct ucred *,struct nfssvc_sock *,struct mbuf *,int *,int));
-int nfsrv_access __P((struct vnode *,int,struct ucred *,int,struct proc *));
int netaddr_match __P((int,union nethostaddr *,struct mbuf *));
int nfs_request __P((struct vnode *,struct mbuf *,int,struct proc *,struct ucred *,struct mbuf **,struct mbuf **,caddr_t *));
int nfs_loadattrcache __P((struct vnode **,struct mbuf **,caddr_t *,struct vattr *));
@@ -511,26 +509,19 @@ int nfs_namei __P((struct nameidata *,fhandle_t *,int,struct nfssvc_sock *,struc
void nfsm_adj __P((struct mbuf *,int,int));
int nfsm_mbuftouio __P((struct mbuf **,struct uio *,int,caddr_t *));
void nfsrv_initcache __P((void));
-int nfs_rcvlock __P((struct nfsreq *));
-void nfs_rcvunlock __P((int *flagp));
int nfs_getauth __P((struct nfsmount *,struct nfsreq *,struct ucred *,char **,int *,char *,int *,NFSKERBKEY_T));
int nfs_getnickauth __P((struct nfsmount *,struct ucred *,char **,int *,char *,int));
int nfs_savenickauth __P((struct nfsmount *,struct ucred *,int,NFSKERBKEY_T,struct mbuf **,char **,struct mbuf *));
-int nfs_msg __P((struct proc *,char *,char *));
int nfs_adv __P((struct mbuf **,caddr_t *,int,int));
-int nfsrv_getstream __P((struct nfssvc_sock *,int));
void nfs_nhinit __P((void));
void nfs_timer __P((void*));
u_long nfs_hash __P((nfsfh_t *,int));
-int nfssvc_iod __P((struct proc *));
-int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *));
-int nfssvc_addsock __P((struct file *,struct mbuf *));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
int nfsrv_dorec __P((struct nfssvc_sock *,struct nfsd *,struct nfsrv_descript **));
void nfsrv_cleancache __P((void));
int nfsrv_getcache __P((struct nfsrv_descript *,struct nfssvc_sock *,struct mbuf **));
+int nfs_init __P((void));
void nfsrv_updatecache __P((struct nfsrv_descript *,int,struct mbuf *));
-int mountnfs __P((struct nfs_args *,struct mount *,struct mbuf *,char *,char *,struct vnode **));
int nfs_connect __P((struct nfsmount *,struct nfsreq *));
void nfs_disconnect __P((struct nfsmount *nmp));
int nfs_getattrcache __P((struct vnode *,struct vattr *));
@@ -540,7 +531,6 @@ int nfsm_uiotombuf __P((struct uio *,struct mbuf **,int,caddr_t *));
void nfsrv_init __P((int));
void nfs_clearcommit __P((struct mount *));
int nfsrv_errmap __P((struct nfsrv_descript *, int));
-void nfsrvw_coalesce __P((struct nfsrv_descript *,struct nfsrv_descript *));
void nfsrv_rcv __P((struct socket *so, caddr_t arg, int waitflag));
void nfsrvw_sort __P((gid_t [],int));
void nfsrv_setcred __P((struct ucred *,struct ucred *));
@@ -560,6 +550,9 @@ int nfsrv_commit __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_create __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+int nfsrv_fhtovp __P((fhandle_t *,int,struct vnode **,
+ struct ucred *,struct nfssvc_sock *,struct mbuf *,
+ int *,int));
int nfsrv_fsinfo __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
int nfsrv_getattr __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
@@ -604,6 +597,7 @@ int nfsrv_symlink __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
+
#endif /* KERNEL */
#endif
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c
index 303cb22..4ae5efe 100644
--- a/sys/nfs/nfs_bio.c
+++ b/sys/nfs/nfs_bio.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94
- * $Id: nfs_bio.c,v 1.19 1995/12/03 10:02:52 bde Exp $
+ * $Id: nfs_bio.c,v 1.20 1995/12/07 12:47:23 davidg Exp $
*/
#include <sys/param.h>
@@ -58,7 +58,7 @@
#include <nfs/nqnfs.h>
#include <nfs/nfsnode.h>
-extern struct buf *nfs_getcacheblk __P((struct vnode *vp, daddr_t bn, int size,
+static struct buf *nfs_getcacheblk __P((struct vnode *vp, daddr_t bn, int size,
struct proc *p));
extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
@@ -613,7 +613,7 @@ again:
* interrupted by a signal for an interruptible mount point, return
* NULL.
*/
-struct buf *
+static struct buf *
nfs_getcacheblk(vp, bn, size, p)
struct vnode *vp;
daddr_t bn;
diff --git a/sys/nfs/nfs_common.c b/sys/nfs/nfs_common.c
index d590ce4..46327bf 100644
--- a/sys/nfs/nfs_common.c
+++ b/sys/nfs/nfs_common.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.24 1995/10/29 15:33:08 phk Exp $
+ * $Id: nfs_subs.c,v 1.25 1995/12/07 12:47:26 davidg Exp $
*/
/*
@@ -93,8 +93,13 @@ u_long nfs_prog, nqnfs_prog, nfs_true, nfs_false;
/* And other global data */
static u_long nfs_xid = 0;
-enum vtype nv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
-enum vtype nv3tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
+static enum vtype nv2tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON
+};
+enum vtype nv3tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
+};
+
int nfs_ticks;
struct nfs_reqq nfs_reqq;
diff --git a/sys/nfs/nfs_nqlease.c b/sys/nfs/nfs_nqlease.c
index 6048727..5af47fb 100644
--- a/sys/nfs/nfs_nqlease.c
+++ b/sys/nfs/nfs_nqlease.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_nqlease.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_nqlease.c,v 1.16 1995/10/29 15:32:55 phk Exp $
+ * $Id: nfs_nqlease.c,v 1.17 1995/11/21 15:51:31 bde Exp $
*/
/*
@@ -78,24 +78,26 @@ time_t nqnfsstarttime = (time_t)0;
int nqsrv_clockskew = NQ_CLOCKSKEW;
int nqsrv_writeslack = NQ_WRITESLACK;
int nqsrv_maxlease = NQ_MAXLEASE;
-int nqsrv_maxnumlease = NQ_MAXNUMLEASE;
+static int nqsrv_maxnumlease = NQ_MAXNUMLEASE;
struct vop_lease_args;
+static int nqsrv_cmpnam __P((struct nfssvc_sock *,struct mbuf *,
+ struct nqhost *));
extern void nqnfs_lease_check __P((struct vnode *vp, struct proc *p,
struct ucred *cred, int flag));
extern void nqnfs_lease_updatetime __P((int deltat));
-extern int nqnfs_vacated __P((struct vnode *vp, struct ucred *cred));
+static int nqnfs_vacated __P((struct vnode *vp, struct ucred *cred));
extern int nqnfs_vop_lease_check __P((struct vop_lease_args *ap));
-extern void nqsrv_addhost __P((struct nqhost *lph, struct nfssvc_sock *slp,
+static void nqsrv_addhost __P((struct nqhost *lph, struct nfssvc_sock *slp,
struct mbuf *nam));
-extern void nqsrv_instimeq __P((struct nqlease *lp, u_long duration));
-extern void nqsrv_locklease __P((struct nqlease *lp));
-extern void nqsrv_send_eviction __P((struct vnode *vp, struct nqlease *lp,
+static void nqsrv_instimeq __P((struct nqlease *lp, u_long duration));
+static void nqsrv_locklease __P((struct nqlease *lp));
+static void nqsrv_send_eviction __P((struct vnode *vp, struct nqlease *lp,
struct nfssvc_sock *slp,
struct mbuf *nam, struct ucred *cred));
-extern void nqsrv_unlocklease __P((struct nqlease *lp));
-extern void nqsrv_waitfor_expiry __P((struct nqlease *lp));
+static void nqsrv_unlocklease __P((struct nqlease *lp));
+static void nqsrv_waitfor_expiry __P((struct nqlease *lp));
/*
* Signifies which rpcs can have piggybacked lease requests
@@ -367,7 +369,7 @@ nqnfs_vop_lease_check(ap)
/*
* Add a host to an nqhost structure for a lease.
*/
-void
+static void
nqsrv_addhost(lph, slp, nam)
register struct nqhost *lph;
struct nfssvc_sock *slp;
@@ -395,7 +397,7 @@ nqsrv_addhost(lph, slp, nam)
/*
* Update the lease expiry time and position it in the timer queue correctly.
*/
-void
+static void
nqsrv_instimeq(lp, duration)
register struct nqlease *lp;
u_long duration;
@@ -434,7 +436,7 @@ nqsrv_instimeq(lp, duration)
* This is somewhat messy due to the union in the nqhost structure.
* The local host is indicated by the special value of NQLOCALSLP for slp.
*/
-int
+static int
nqsrv_cmpnam(slp, nam, lph)
register struct nfssvc_sock *slp;
struct mbuf *nam;
@@ -475,7 +477,7 @@ nqsrv_cmpnam(slp, nam, lph)
/*
* Send out eviction notice messages to all other hosts for the lease.
*/
-void
+static void
nqsrv_send_eviction(vp, lp, slp, nam, cred)
struct vnode *vp;
register struct nqlease *lp;
@@ -586,7 +588,7 @@ nextone:
* This will occur when all clients have sent "vacated" messages to
* this server OR when it expires do to timeout.
*/
-void
+static void
nqsrv_waitfor_expiry(lp)
register struct nqlease *lp;
{
@@ -893,7 +895,7 @@ nqnfs_getlease(vp, rwflag, cred, p)
/*
* Client vacated message function.
*/
-int
+static int
nqnfs_vacated(vp, cred)
register struct vnode *vp;
struct ucred *cred;
@@ -1205,7 +1207,7 @@ nqnfs_lease_updatetime(deltat)
/*
* Lock a server lease.
*/
-void
+static void
nqsrv_locklease(lp)
struct nqlease *lp;
{
@@ -1221,7 +1223,7 @@ nqsrv_locklease(lp)
/*
* Unlock a server lease.
*/
-void
+static void
nqsrv_unlocklease(lp)
struct nqlease *lp;
{
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 0173c99..3fc96a4 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.25 1995/10/29 15:32:59 phk Exp $
+ * $Id: nfs_serv.c,v 1.26 1995/12/07 12:47:25 davidg Exp $
*/
/*
@@ -70,6 +70,7 @@
#include <sys/dirent.h>
#include <sys/stat.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <ufs/ufs/dir.h>
#include <vm/vm.h>
@@ -95,11 +96,14 @@ nfstype nfsv3_type[9] = { NFNON, NFREG, NFDIR, NFBLK, NFCHR, NFLNK, NFSOCK,
NFFIFO, NFNON };
int nfsrvw_procrastinate = NFS_GATHERDELAY * 1000;
-#ifdef NFS_ASYNC
-int nfs_async = 1;
-#else
int nfs_async;
-#endif
+SYSCTL_INT(_fs_nfs, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "");
+
+
+static int nfsrv_access __P((struct vnode *,int,struct ucred *,int,
+ struct proc *));
+static void nfsrvw_coalesce __P((struct nfsrv_descript *,
+ struct nfsrv_descript *));
/*
* nfs v3 access service
@@ -1198,7 +1202,7 @@ loop1:
* - put nfsd on owp's nd_coalesce list
* NB: Must be called at splsoftclock().
*/
-void
+static void
nfsrvw_coalesce(owp, nfsd)
register struct nfsrv_descript *owp;
register struct nfsrv_descript *nfsd;
@@ -3390,7 +3394,7 @@ nfsrv_noop(nfsd, slp, procp, mrq)
* this because it opens a security hole, but since the nfs server opens
* a security hole the size of a barn door anyhow, what the heck.
*/
-int
+static int
nfsrv_access(vp, flags, cred, rdonly, p)
register struct vnode *vp;
int flags;
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index f497afe..0059f5e 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_socket.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_socket.c,v 1.11 1995/11/21 15:51:32 bde Exp $
+ * $Id: nfs_socket.c,v 1.12 1995/12/03 10:02:59 bde Exp $
*/
/*
@@ -134,10 +134,14 @@ static int nfs_backoff[8] = { 2, 4, 8, 16, 32, 64, 128, 256, };
int nfsrtton = 0;
struct nfsrtt nfsrtt;
-extern void nfs_realign __P((struct mbuf *m, int hsiz));
-extern int nfs_receive __P((struct nfsreq *rep, struct mbuf **aname,
+static int nfs_msg __P((struct proc *,char *,char *));
+static int nfs_rcvlock __P((struct nfsreq *));
+static void nfs_rcvunlock __P((int *flagp));
+static void nfs_realign __P((struct mbuf *m, int hsiz));
+static int nfs_receive __P((struct nfsreq *rep, struct mbuf **aname,
struct mbuf **mp));
-extern int nfs_reconnect __P((struct nfsreq *rep));
+static int nfs_reconnect __P((struct nfsreq *rep));
+static int nfsrv_getstream __P((struct nfssvc_sock *,int));
int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd,
struct nfssvc_sock *slp,
@@ -317,7 +321,7 @@ bad:
* If this fails the mount point is DEAD!
* nb: Must be called with the nfs_sndlock() set on the mount point.
*/
-int
+static int
nfs_reconnect(rep)
register struct nfsreq *rep;
{
@@ -441,7 +445,7 @@ nfs_send(so, nam, top, rep)
* For SOCK_STREAM we must be very careful to read an entire record once
* we have read any of it, even if the system call has been interrupted.
*/
-int
+static int
nfs_receive(rep, aname, mp)
register struct nfsreq *rep;
struct mbuf **aname;
@@ -1456,7 +1460,7 @@ nfs_sndunlock(flagp)
}
}
-int
+static int
nfs_rcvlock(rep)
register struct nfsreq *rep;
{
@@ -1485,7 +1489,7 @@ nfs_rcvlock(rep)
/*
* Unlock the stream socket for others.
*/
-void
+static void
nfs_rcvunlock(flagp)
register int *flagp;
{
@@ -1503,7 +1507,7 @@ nfs_rcvunlock(flagp)
* Check for badly aligned mbuf data areas and
* realign data in an mbuf list by copying the data areas up, as required.
*/
-void
+static void
nfs_realign(m, hsiz)
register struct mbuf *m;
int hsiz;
@@ -1708,7 +1712,7 @@ dorecs:
* stream socket. The "waitflag" argument indicates whether or not it
* can sleep.
*/
-int
+static int
nfsrv_getstream(slp, waitflag)
register struct nfssvc_sock *slp;
int waitflag;
@@ -2142,7 +2146,7 @@ nfsrv_wakenfsd(slp)
nfsd_head_flag |= NFSD_CHECKSLP;
}
-int
+static int
nfs_msg(p, server, msg)
struct proc *p;
char *server, *msg;
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c
index acdce0d..574729c 100644
--- a/sys/nfs/nfs_srvcache.c
+++ b/sys/nfs/nfs_srvcache.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_srvcache.c 8.1 (Berkeley) 6/10/93
- * $Id: nfs_srvcache.c,v 1.5 1994/10/17 17:47:36 phk Exp $
+ * $Id: nfs_srvcache.c,v 1.6 1995/06/27 11:06:43 dfr Exp $
*/
/*
@@ -66,7 +66,8 @@
extern struct nfsstats nfsstats;
extern int nfsv2_procid[NFS_NPROCS];
-long numnfsrvcache, desirednfsrvcache = NFSRVCACHESIZ;
+long numnfsrvcache;
+static long desirednfsrvcache = NFSRVCACHESIZ;
#define NFSRCHASH(xid) \
(&nfsrvhashtbl[((xid) + ((xid) >> 24)) & nfsrvhash])
@@ -83,7 +84,7 @@ u_long nfsrvhash;
/*
* Static array that defines which nfs rpc's are nonidempotent
*/
-int nonidempotent[NFS_NPROCS] = {
+static int nonidempotent[NFS_NPROCS] = {
FALSE,
FALSE,
TRUE,
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index d590ce4..46327bf 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_subs.c,v 1.24 1995/10/29 15:33:08 phk Exp $
+ * $Id: nfs_subs.c,v 1.25 1995/12/07 12:47:26 davidg Exp $
*/
/*
@@ -93,8 +93,13 @@ u_long nfs_prog, nqnfs_prog, nfs_true, nfs_false;
/* And other global data */
static u_long nfs_xid = 0;
-enum vtype nv2tov_type[8] = { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON };
-enum vtype nv3tov_type[8]={ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO };
+static enum vtype nv2tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VNON, VNON
+};
+enum vtype nv3tov_type[8]= {
+ VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO
+};
+
int nfs_ticks;
struct nfs_reqq nfs_reqq;
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index 44789f7..68d7dc1 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_syscalls.c,v 1.10 1995/11/21 15:51:34 bde Exp $
+ * $Id: nfs_syscalls.c,v 1.11 1995/12/03 10:03:06 bde Exp $
*/
#include <sys/param.h>
@@ -86,14 +86,14 @@ extern int nfsrtton;
extern struct nfsstats nfsstats;
extern int nfsrvw_procrastinate;
struct nfssvc_sock *nfs_udpsock, *nfs_cltpsock;
-int nuidhash_max = NFS_MAXUIDHASH;
+static int nuidhash_max = NFS_MAXUIDHASH;
static int nfs_numnfsd = 0;
int nfsd_waiting = 0;
static int notstarted = 1;
static int modify_flag = 0;
static struct nfsdrt nfsdrt;
-extern void nfsrv_zapsock __P((struct nfssvc_sock *slp));
+static void nfsrv_zapsock __P((struct nfssvc_sock *slp));
#define TRUE 1
#define FALSE 0
@@ -102,6 +102,9 @@ static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
static void nfsd_rt __P((int sotype, struct nfsrv_descript *nd,
int cacherep));
+static int nfssvc_addsock __P((struct file *,struct mbuf *));
+static int nfssvc_iod __P((struct proc *));
+static int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *));
/*
* NFS server system calls
@@ -332,7 +335,7 @@ nfssvc(p, uap, retval)
/*
* Adds a socket to the list for servicing by nfsds.
*/
-int
+static int
nfssvc_addsock(fp, mynam)
struct file *fp;
struct mbuf *mynam;
@@ -422,7 +425,7 @@ nfssvc_addsock(fp, mynam)
* Called by nfssvc() for nfsds. Just loops around servicing rpc requests
* until it is killed by a signal.
*/
-int
+static int
nfssvc_nfsd(nsd, argp, p)
struct nfsd_srvargs *nsd;
caddr_t argp;
@@ -705,7 +708,7 @@ done:
* They do read-ahead and write-behind operations on the block I/O cache.
* Never returns unless it fails or gets killed.
*/
-int
+static int
nfssvc_iod(p)
struct proc *p;
{
@@ -788,7 +791,7 @@ nfssvc_iod(p)
* will stop using it and clear ns_flag at the end so that it will not be
* reassigned during cleanup.
*/
-void
+static void
nfsrv_zapsock(slp)
register struct nfssvc_sock *slp;
{
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 9387aa8..77ec917 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_vfsops.c,v 1.22 1995/12/03 10:03:12 bde Exp $
+ * $Id: nfs_vfsops.c,v 1.23 1995/12/07 12:47:27 davidg Exp $
*/
#include <sys/param.h>
@@ -45,6 +45,7 @@
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/mount.h>
#include <sys/buf.h>
#include <sys/mbuf.h>
@@ -75,18 +76,37 @@ extern int nfs_mountroot __P((void));
extern int nfs_ticks;
struct nfsstats nfsstats;
+SYSCTL_NODE(_fs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem");
+SYSCTL_STRUCT(_fs_nfs, OID_AUTO, nfsstats, CTLFLAG_RD,
+ &nfsstats, nfsstats, "");
static int nfs_iosize __P((struct nfsmount *nmp));
-static int nfs_sysctl(int *, u_int, void *, size_t *, void *, size_t,
- struct proc *);
+static int mountnfs __P((struct nfs_args *,struct mount *,
+ struct mbuf *,char *,char *,struct vnode **));
+static int nfs_mount __P(( struct mount *mp, char *path, caddr_t data,
+ struct nameidata *ndp, struct proc *p));
+static int nfs_start __P(( struct mount *mp, int flags,
+ struct proc *p));
+static int nfs_unmount __P(( struct mount *mp, int mntflags,
+ struct proc *p));
+static int nfs_root __P(( struct mount *mp, struct vnode **vpp));
+static int nfs_quotactl __P(( struct mount *mp, int cmds, uid_t uid,
+ caddr_t arg, struct proc *p));
+static int nfs_statfs __P(( struct mount *mp, struct statfs *sbp,
+ struct proc *p));
+static int nfs_sync __P(( struct mount *mp, int waitfor,
+ struct ucred *cred, struct proc *p));
+static int nfs_vptofh __P(( struct vnode *vp, struct fid *fhp));
+static int nfs_fhtovp __P((struct mount *mp, struct fid *fhp,
+ struct mbuf *nam, struct vnode **vpp,
+ int *exflagsp, struct ucred **credanonp));
+static int nfs_vget __P((struct mount *, ino_t, struct vnode **));
+
/*
* nfs vfs operations.
*/
-struct vfsops nfs_vfsops = {
-#ifdef __NetBSD__
- MOUNT_NFS,
-#endif
+static struct vfsops nfs_vfsops = {
nfs_mount,
nfs_start,
nfs_unmount,
@@ -98,13 +118,8 @@ struct vfsops nfs_vfsops = {
nfs_fhtovp,
nfs_vptofh,
nfs_init,
-#ifdef __FreeBSD__
- nfs_sysctl
-#endif
};
-#ifdef __FreeBSD__
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
-#endif
/*
* This structure must be filled in by a primary bootstrap or bootstrap
@@ -490,7 +505,7 @@ nfs_mountdiskless(path, which, mountflag, sin, args, vpp)
* an error after that means that I have to release the mbuf.
*/
/* ARGSUSED */
-int
+static int
nfs_mount(mp, path, data, ndp, p)
struct mount *mp;
char *path;
@@ -532,7 +547,7 @@ nfs_mount(mp, path, data, ndp, p)
/*
* Common code for mount and mountroot
*/
-int
+static int
mountnfs(argp, mp, nam, pth, hst, vpp)
register struct nfs_args *argp;
register struct mount *mp;
@@ -716,7 +731,7 @@ bad:
/*
* unmount system call
*/
-int
+static int
nfs_unmount(mp, mntflags, p)
struct mount *mp;
int mntflags;
@@ -793,7 +808,7 @@ nfs_unmount(mp, mntflags, p)
/*
* Return root of a filesystem
*/
-int
+static int
nfs_root(mp, vpp)
struct mount *mp;
struct vnode **vpp;
@@ -822,7 +837,7 @@ extern int syncprt;
* Flush out the buffer cache
*/
/* ARGSUSED */
-int
+static int
nfs_sync(mp, waitfor, cred, p)
struct mount *mp;
int waitfor;
@@ -862,7 +877,7 @@ loop:
* Currently unsupported.
*/
/* ARGSUSED */
-int
+static int
nfs_vget(mp, ino, vpp)
struct mount *mp;
ino_t ino;
@@ -876,7 +891,7 @@ nfs_vget(mp, ino, vpp)
* At this point, this should never happen
*/
/* ARGSUSED */
-int
+static int
nfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
register struct mount *mp;
struct fid *fhp;
@@ -893,7 +908,7 @@ nfs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
* Vnode pointer to File handle, should never happen either
*/
/* ARGSUSED */
-int
+static int
nfs_vptofh(vp, fhp)
struct vnode *vp;
struct fid *fhp;
@@ -906,7 +921,7 @@ nfs_vptofh(vp, fhp)
* Vfs start routine, a no-op.
*/
/* ARGSUSED */
-int
+static int
nfs_start(mp, flags, p)
struct mount *mp;
int flags;
@@ -920,7 +935,7 @@ nfs_start(mp, flags, p)
* Do operations associated with quotas, not supported
*/
/* ARGSUSED */
-int
+static int
nfs_quotactl(mp, cmd, uid, arg, p)
struct mount *mp;
int cmd;
@@ -932,46 +947,3 @@ nfs_quotactl(mp, cmd, uid, arg, p)
return (EOPNOTSUPP);
}
-/*
- * Do that sysctl thang...
- */
-static int
-nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
- size_t newlen, struct proc *p)
-{
- int rv;
-
- /*
- * All names at this level are terminal.
- */
- if(namelen > 1)
- return ENOTDIR; /* overloaded */
-
- switch(name[0]) {
- case NFS_NFSSTATS:
- if(!oldp) {
- *oldlenp = sizeof nfsstats;
- return 0;
- }
-
- if(*oldlenp < sizeof nfsstats) {
- *oldlenp = sizeof nfsstats;
- return ENOMEM;
- }
-
- rv = copyout(&nfsstats, oldp, sizeof nfsstats);
- if(rv) return rv;
-
- if(newp && newlen != sizeof nfsstats)
- return EINVAL;
-
- if(newp) {
- return copyin(newp, &nfsstats, sizeof nfsstats);
- }
- return 0;
-
- default:
- return EOPNOTSUPP;
- }
-}
-
diff --git a/sys/nfs/nfsmount.h b/sys/nfs/nfsmount.h
index 5bfcab0..1bd71c5 100644
--- a/sys/nfs/nfsmount.h
+++ b/sys/nfs/nfsmount.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsmount.h 8.1 (Berkeley) 6/10/93
- * $Id: nfsmount.h,v 1.5 1995/06/27 11:06:56 dfr Exp $
+ * $Id: nfsmount.h,v 1.6 1995/11/21 12:54:40 bde Exp $
*/
#ifndef _NFS_NFSMOUNT_H_
@@ -91,51 +91,4 @@ struct nfsmount {
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
#endif /* KERNEL */
-/*
- * Prototypes for NFS mount operations
- */
-int nfs_mount __P((
- struct mount *mp,
- char *path,
- caddr_t data,
- struct nameidata *ndp,
- struct proc *p));
-int nfs_start __P((
- struct mount *mp,
- int flags,
- struct proc *p));
-int nfs_unmount __P((
- struct mount *mp,
- int mntflags,
- struct proc *p));
-int nfs_root __P((
- struct mount *mp,
- struct vnode **vpp));
-int nfs_quotactl __P((
- struct mount *mp,
- int cmds,
- uid_t uid,
- caddr_t arg,
- struct proc *p));
-int nfs_statfs __P((
- struct mount *mp,
- struct statfs *sbp,
- struct proc *p));
-int nfs_sync __P((
- struct mount *mp,
- int waitfor,
- struct ucred *cred,
- struct proc *p));
-int nfs_fhtovp __P((
- struct mount *mp,
- struct fid *fhp,
- struct mbuf *nam,
- struct vnode **vpp,
- int *exflagsp,
- struct ucred **credanonp));
-int nfs_vptofh __P((
- struct vnode *vp,
- struct fid *fhp));
-int nfs_init __P((void));
-
#endif
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h
index 02cc1c3..49e96da 100644
--- a/sys/nfs/nfsnode.h
+++ b/sys/nfs/nfsnode.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsnode.h 8.4 (Berkeley) 2/13/94
- * $Id: nfsnode.h,v 1.13 1995/11/06 00:36:03 bde Exp $
+ * $Id: nfsnode.h,v 1.14 1995/11/09 08:16:59 bde Exp $
*/
#ifndef _NFS_NFSNODE_H_
@@ -179,7 +179,6 @@ int nfs_reclaim __P((struct vop_reclaim_args *));
int nfs_lock __P((struct vop_lock_args *));
int nfs_unlock __P((struct vop_unlock_args *));
int nfs_islocked __P((struct vop_islocked_args *));
-int nfs_vget __P((struct mount *, ino_t, struct vnode **));
#define nfs_reallocblks \
((int (*) __P((struct vop_reallocblks_args *)))eopnotsupp)
diff --git a/sys/nfs/nqnfs.h b/sys/nfs/nqnfs.h
index 58fdc4c..6a603f9 100644
--- a/sys/nfs/nqnfs.h
+++ b/sys/nfs/nqnfs.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nqnfs.h 8.1 (Berkeley) 6/10/93
- * $Id: nqnfs.h,v 1.8 1995/07/29 11:42:23 bde Exp $
+ * $Id: nqnfs.h,v 1.9 1995/11/21 12:54:42 bde Exp $
*/
#ifndef _NFS_NQNFS_H_
@@ -200,7 +200,6 @@ extern u_long nqfhhash;
#if defined(KERNEL) || defined(_KERNEL)
void nqnfs_lease_check __P((struct vnode *, struct proc *, struct ucred *, int));
void nqnfs_lease_updatetime __P((int));
-int nqsrv_cmpnam __P((struct nfssvc_sock *,struct mbuf *,struct nqhost *));
int nqsrv_getlease __P((struct vnode *,u_long *,int,struct nfssvc_sock *,struct proc *,struct mbuf *,int *,u_quad_t *,struct ucred *));
int nqnfs_getlease __P((struct vnode *,int,struct ucred *,struct proc *));
int nqnfs_callback __P((struct nfsmount *,struct mbuf *,struct mbuf *,caddr_t));
OpenPOWER on IntegriCloud