summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nfs/nfs_vfsops.c')
-rw-r--r--sys/nfs/nfs_vfsops.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index b872cfd2a56..5c570f1efb8 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vfsops.c,v 1.90 2009/08/25 13:41:29 thib Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.91 2009/09/02 18:20:54 thib Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
@@ -611,10 +611,9 @@ nfs_mount(mp, path, data, ndp, p)
if ((args.flags & (NFSMNT_NFSV3|NFSMNT_RDIRPLUS)) == NFSMNT_RDIRPLUS)
return (EINVAL);
- if (nfs_numaiods == -1) {
- error = nfs_set_naiod(NFS_DEFASYNCDAEMON);
- if (error)
- return (error);
+ if (nfs_niothreads < 0) {
+ nfs_niothreads = 4;
+ nfs_getset_niothreads(1);
}
if (mp->mnt_flag & MNT_UPDATE) {
@@ -672,9 +671,9 @@ mountnfs(argp, mp, nam, pth, hst)
m_freem(nam);
return (0);
} else {
- nmp = malloc(sizeof(*nmp), M_NFSMNT, M_WAITOK|M_ZERO);
- mp->mnt_data = nmp;
- TAILQ_INIT(&nmp->nm_bufq);
+ nmp = malloc(sizeof(struct nfsmount), M_NFSMNT,
+ M_WAITOK|M_ZERO);
+ mp->mnt_data = (qaddr_t)nmp;
}
vfs_getnewfsid(mp);
@@ -840,7 +839,7 @@ int
nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen, struct proc *p)
{
- int rv, naiods;
+ int rv;
/*
* All names at this level are terminal.
@@ -872,13 +871,11 @@ nfs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
return 0;
case NFS_NIOTHREADS:
- naiods = nfs_numaiods;
- rv = sysctl_int(oldp, oldlenp, newp, newlen, &naiods);
- if (newp && rv == 0) {
- if (naiods < 0)
- return (EINVAL);
- rv = nfs_set_naiod(naiods);
- }
+ nfs_getset_niothreads(0);
+
+ rv = sysctl_int(oldp, oldlenp, newp, newlen, &nfs_niothreads);
+ if (newp)
+ nfs_getset_niothreads(1);
return rv;