summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/init_main.c9
-rw-r--r--sys/nfs/nfs_subs.c23
-rw-r--r--sys/nfs/nfs_var.h3
-rw-r--r--sys/nfs/nfs_vfsops.c4
4 files changed, 26 insertions, 13 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 723a08ffa27..1f0c73c5f91 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.17 1996/09/04 22:35:27 niklas Exp $ */
+/* $OpenBSD: init_main.c,v 1.18 1996/09/21 11:06:08 deraadt Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -90,6 +90,10 @@
#include <net/if.h>
#include <net/raw_cb.h>
+#if defined(NFSSERVER) || defined(NFSCLIENT)
+extern void nfs_init __P((void));
+#endif
+
char copyright[] =
"Copyright (c) 1982, 1986, 1989, 1991, 1993\n\tThe Regents of the University of California. All rights reserved.\n\n";
@@ -270,6 +274,9 @@ main(framep)
vm_init_limits(p);
/* Initialize the file systems. */
+#if defined(NFSSERVER) || defined(NFSCLIENT)
+ nfs_init(); /* initialize server/shared data */
+#endif
vfsinit();
/* Start real time and statistics clocks. */
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index 5b7414c5c65..379a2332de8 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.10 1996/07/27 11:09:39 deraadt Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.11 1996/09/21 11:06:19 deraadt Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -1116,17 +1116,9 @@ nfs_init()
nfs_ticks = (hz * NFS_TICKINTVL + 500) / 1000;
if (nfs_ticks < 1)
nfs_ticks = 1;
-#ifdef NFSCLIENT
- /* Ensure async daemons disabled */
- for (i = 0; i < NFS_MAXASYNCDAEMON; i++)
- nfs_iodwant[i] = (struct proc *)0;
- TAILQ_INIT(&nfs_bufq);
- nfs_nhinit(); /* Init the nfsnode table */
-#endif /* NFSCLIENT */
#ifdef NFSSERVER
nfsrv_init(0); /* Init server data structures */
nfsrv_initcache(); /* Init the server request cache */
-#endif /* NFSSERVER */
/*
* Initialize the nqnfs server stuff.
@@ -1138,6 +1130,7 @@ nfs_init()
CIRCLEQ_INIT(&nqtimerhead);
nqfhhashtbl = hashinit(NQLCHSZ, M_NQLEASE, &nqfhhash);
}
+#endif /* NFSSERVER */
/*
* Initialize reply list and start timer
@@ -1147,6 +1140,18 @@ nfs_init()
}
#ifdef NFSCLIENT
+void
+nfs_vfs_init()
+{
+ register int i;
+
+ /* Ensure async daemons disabled */
+ for (i = 0; i < NFS_MAXASYNCDAEMON; i++)
+ nfs_iodwant[i] = (struct proc *)0;
+ TAILQ_INIT(&nfs_bufq);
+ nfs_nhinit(); /* Init the nfsnode table */
+}
+
/*
* Attribute cache routines.
* nfs_loadattrcache() - loads or updates the cache contents from attributes
diff --git a/sys/nfs/nfs_var.h b/sys/nfs/nfs_var.h
index e349ccfaa0c..5e944220a3b 100644
--- a/sys/nfs/nfs_var.h
+++ b/sys/nfs/nfs_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_var.h,v 1.2 1996/03/31 13:15:58 mickey Exp $ */
+/* $OpenBSD: nfs_var.h,v 1.3 1996/09/21 11:06:20 deraadt Exp $ */
/* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */
/*
@@ -274,6 +274,7 @@ int nfsm_uiotombuf __P((struct uio *, struct mbuf **, int, caddr_t *));
int nfsm_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *));
int nfs_adv __P((struct mbuf **, caddr_t *, int, int));
int nfsm_strtmbuf __P((struct mbuf **, char **, char *, long));
+void nfs_vfs_init __P((void));
void nfs_init __P((void));
int nfs_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *,
struct vattr *));
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 5c7714346da..5e9fd779b7d 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.12 1996/06/02 16:47:23 niklas Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.13 1996/09/21 11:06:22 deraadt Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -92,7 +92,7 @@ struct vfsops nfs_vfsops = {
nfs_vget,
nfs_fhtovp,
nfs_vptofh,
- nfs_init,
+ nfs_vfs_init,
#ifdef notyet
nfs_sysctl
#endif