summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_serv.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-08-24 11:39:31 +0000
committerdg <dg@FreeBSD.org>1995-08-24 11:39:31 +0000
commitf765feca10ced4f891d75dc223da618739b5eb6c (patch)
tree38aaa43c5546e63434ac91918a309bea9515120a /sys/nfs/nfs_serv.c
parentf080159714591cc81f750361ee7d835eec18e3bd (diff)
downloadFreeBSD-src-f765feca10ced4f891d75dc223da618739b5eb6c.zip
FreeBSD-src-f765feca10ced4f891d75dc223da618739b5eb6c.tar.gz
Added NFS_ASYNC kernel option. It only has an effect for NFSv2.
Diffstat (limited to 'sys/nfs/nfs_serv.c')
-rw-r--r--sys/nfs/nfs_serv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 8eaaaa1..21d1891 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.22 1995/08/06 11:55:25 davidg Exp $
+ * $Id: nfs_serv.c,v 1.23 1995/08/24 10:45:15 dfr Exp $
*/
/*
@@ -92,6 +92,12 @@ 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
+
/*
* nfs v3 access service
*/
@@ -731,6 +737,8 @@ nfsrv_write(nfsd, slp, procp, mrq)
nfsm_dissect(tl, u_long *, 4 * NFSX_UNSIGNED);
off = (off_t)fxdr_unsigned(u_long, *++tl);
tl += 2;
+ if (nfs_async)
+ stable = NFSV3WRITE_UNSTABLE;
}
retlen = len = fxdr_unsigned(long, *tl);
cnt = i = 0;
@@ -930,6 +938,8 @@ nfsrv_writegather(ndp, slp, procp, mrq)
nfsm_dissect(tl, u_long *, 4 * NFSX_UNSIGNED);
nfsd->nd_off = (off_t)fxdr_unsigned(u_long, *++tl);
tl += 2;
+ if (nfs_async)
+ nfsd->nd_stable = NFSV3WRITE_UNSTABLE;
}
len = fxdr_unsigned(long, *tl);
nfsd->nd_len = len;
OpenPOWER on IntegriCloud