diff options
Diffstat (limited to 'sys/nfsclient/nfs_nfsiod.c')
-rw-r--r-- | sys/nfsclient/nfs_nfsiod.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index ea35c01..83cfa95 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.21 1997/04/27 20:01:23 wollman Exp $ + * $Id: nfs_syscalls.c,v 1.22 1997/04/30 09:51:37 dfr Exp $ */ #include <sys/param.h> @@ -86,6 +86,7 @@ extern int nqsrv_writeslack; extern int nfsrtton; extern struct nfsstats nfsstats; extern int nfsrvw_procrastinate; +extern int nfsrvw_procrastinate_v3; struct nfssvc_sock *nfs_udpsock, *nfs_cltpsock; static int nuidhash_max = NFS_MAXUIDHASH; @@ -111,6 +112,8 @@ static int nfssvc_nfsd __P((struct nfsd_srvargs *,caddr_t,struct proc *)); static int nfs_privport = 0; SYSCTL_INT(_vfs_nfs, NFS_NFSPRIVPORT, nfs_privport, CTLFLAG_RW, &nfs_privport, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, gatherdelay, CTLFLAG_RW, &nfsrvw_procrastinate, 0, ""); +SYSCTL_INT(_vfs_nfs, OID_AUTO, gatherdelay_v3, CTLFLAG_RW, &nfsrvw_procrastinate_v3, 0, ""); /* * NFS server system calls @@ -456,6 +459,7 @@ nfssvc_nfsd(nsd, argp, p) struct nfsrv_descript *nd = NULL; struct mbuf *mreq; int error = 0, cacherep, s, sotype, writes_todo; + int procrastinate; u_quad_t cur_usec; #ifndef nolint @@ -626,8 +630,12 @@ nfssvc_nfsd(nsd, argp, p) do { switch (cacherep) { case RC_DOIT: + if (nd && (nd->nd_flag & ND_NFSV3)) + procrastinate = nfsrvw_procrastinate_v3; + else + procrastinate = nfsrvw_procrastinate; if (writes_todo || (nd->nd_procnum == NFSPROC_WRITE && - nfsrvw_procrastinate > 0 && !notstarted)) + procrastinate > 0 && !notstarted)) error = nfsrv_writegather(&nd, slp, nfsd->nfsd_procp, &mreq); else |