summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2009-01-18 21:04:42 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2009-01-18 21:04:42 +0000
commita694eff8cf3bb4660c4ece397b1b3e4493d0d42c (patch)
tree687d16f1b27d43a662bf4cf3e6e9fab61003578b /sys
parent9ba1b1e35362e6fbffd5287796423400983b4a53 (diff)
remove function which only called nfssvc_iod(), and pass nfssvc_iod()
to kthread_create() ok thib@
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_syscalls.c24
-rw-r--r--sys/nfs/nfs_var.h4
2 files changed, 10 insertions, 18 deletions
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c
index a6c1d4e173a..3235878f0b0 100644
--- a/sys/nfs/nfs_syscalls.c
+++ b/sys/nfs/nfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_syscalls.c,v 1.73 2008/12/24 02:43:52 thib Exp $ */
+/* $OpenBSD: nfs_syscalls.c,v 1.74 2009/01/18 21:04:41 blambert Exp $ */
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
/*
@@ -681,10 +681,10 @@ nfsd_rt(sotype, nd, cacherep)
* They do read-ahead and write-behind operations on the block I/O cache.
* Never returns unless it fails or gets killed.
*/
-int
-nfssvc_iod(p)
- struct proc *p;
+void
+nfssvc_iod(void *arg)
{
+ struct proc *p = (struct proc *)arg;
struct buf *bp, *nbp;
int i, myiod;
struct vnode *vp;
@@ -701,7 +701,7 @@ nfssvc_iod(p)
}
}
if (myiod == -1)
- return (EBUSY);
+ kthread_exit(EBUSY);
nfs_asyncdaemon[myiod] = p;
nfs_numasync++;
@@ -762,24 +762,16 @@ nfssvc_iod(p)
nfs_asyncdaemon[myiod] = NULL;
nfs_numasync--;
nfs_bufqmax -= bufcount;
- return (error);
+ kthread_exit(error);
}
}
}
void
-start_nfsio(arg)
- void *arg;
-{
- nfssvc_iod(curproc);
-
- kthread_exit(0);
-}
-
-void
nfs_getset_niothreads(set)
int set;
{
+ struct proc *p;
int i, have, start;
for (have = 0, i = 0; i < NFS_MAXASYNCDAEMON; i++)
@@ -793,7 +785,7 @@ nfs_getset_niothreads(set)
start = nfs_niothreads - have;
while (start > 0) {
- kthread_create(start_nfsio, NULL, NULL, "nfsio");
+ kthread_create(nfssvc_iod, p, &p, "nfsio");
start--;
}
diff --git a/sys/nfs/nfs_var.h b/sys/nfs/nfs_var.h
index 5177db9a949..e2b886a0e5e 100644
--- a/sys/nfs/nfs_var.h
+++ b/sys/nfs/nfs_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_var.h,v 1.46 2009/01/16 17:11:28 thib Exp $ */
+/* $OpenBSD: nfs_var.h,v 1.47 2009/01/18 21:04:41 blambert Exp $ */
/* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */
/*
@@ -260,7 +260,7 @@ int nfssvc_nfsd(struct nfsd_srvargs *, caddr_t, struct proc *);
void nfsrv_zapsock(struct nfssvc_sock *);
void nfsrv_slpderef(struct nfssvc_sock *);
void nfsrv_init(int);
-int nfssvc_iod(struct proc *);
+void nfssvc_iod(void *);
void start_nfsio(void *);
void nfs_getset_niothreads(int);