diff options
| author | Doug Rabson <dfr@FreeBSD.org> | 1997-06-03 13:56:55 +0000 |
|---|---|---|
| committer | Doug Rabson <dfr@FreeBSD.org> | 1997-06-03 13:56:55 +0000 |
| commit | d1e963a50eb391f76be53055521d334d04bc3ad0 (patch) | |
| tree | 6db8527530c0573ff1b643b3018ba3117578aca3 | |
| parent | 6362924f25d5c56b0d0b2ae3478a5765066d6fe7 (diff) | |
Notes
| -rw-r--r-- | sys/nfs/nfs_serv.c | 7 | ||||
| -rw-r--r-- | sys/nfs/nfs_vnops.c | 4 | ||||
| -rw-r--r-- | sys/nfsclient/nfs_vnops.c | 4 | ||||
| -rw-r--r-- | sys/nfsserver/nfs_serv.c | 7 |
4 files changed, 16 insertions, 6 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 75842dcb3e9f..1f2827a026c9 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.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); diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index f5e7a63cd77d..387c424c531b 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.51 1997/05/20 08:06:31 dfr Exp $ + * $Id: nfs_vnops.c,v 1.52 1997/06/03 10:03:40 dfr Exp $ */ @@ -1249,6 +1249,8 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit) tsiz -= len; } nfsmout: + if (vp->v_mount->mnt_flag & MNT_ASYNC) + committed = NFSV3WRITE_FILESYNC; *iomode = committed; if (error) uiop->uio_resid = tsiz; diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index f5e7a63cd77d..387c424c531b 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.51 1997/05/20 08:06:31 dfr Exp $ + * $Id: nfs_vnops.c,v 1.52 1997/06/03 10:03:40 dfr Exp $ */ @@ -1249,6 +1249,8 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit) tsiz -= len; } nfsmout: + if (vp->v_mount->mnt_flag & MNT_ASYNC) + committed = NFSV3WRITE_FILESYNC; *iomode = committed; if (error) uiop->uio_resid = tsiz; diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 75842dcb3e9f..1f2827a026c9 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); |
