summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1997-06-03 13:56:55 +0000
committerdfr <dfr@FreeBSD.org>1997-06-03 13:56:55 +0000
commitdc78066f3daf555d5ded6c5ed27b2937d87b1022 (patch)
tree8bde2c18a38821cb3db29aa0edab5d39550bdada /sys/nfsserver
parent8aa43912331e2ad1948d056741d934ac8f05f1ce (diff)
downloadFreeBSD-src-dc78066f3daf555d5ded6c5ed27b2937d87b1022.zip
FreeBSD-src-dc78066f3daf555d5ded6c5ed27b2937d87b1022.tar.gz
Implement the async mount option for NFSv3. This makes NFS pretend that all
writes sent to the server were synchronous and therefore no commits are needed. This is the same as the vfs.nfs.async variable on the server but allows each client to choose whether to work this way. Also make the vfs.nfs.async variable do the 'right' thing for NFSv3, i.e. pretend that the write was synchronous.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 75842dc..1f2827a 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.41 1997/05/10 16:12:03 dfr Exp $
+ * $Id: nfs_serv.c,v 1.42 1997/05/10 16:59:36 dfr Exp $
*/
/*
@@ -861,7 +861,10 @@ nfsrv_write(nfsd, slp, procp, mrq)
return (0);
nfsm_build(tl, u_long *, 4 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(retlen);
- if (stable == NFSV3WRITE_UNSTABLE)
+ /*
+ * If nfs_async is set, then pretend the write was FILESYNC.
+ */
+ if (stable == NFSV3WRITE_UNSTABLE && !nfs_async)
*tl++ = txdr_unsigned(stable);
else
*tl++ = txdr_unsigned(NFSV3WRITE_FILESYNC);
OpenPOWER on IntegriCloud