aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-03-23 09:27:44 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-23 15:29:02 -0400
commit465d52437d5ce8d4eb9da0d3e3818b51cff163a1 (patch)
treeeb78b7c5e1e07a6a726e6b7d5dbc683eaad26902 /fs
parent8ef2ce3e16d9bec6cf015207c1c82a5b864046ac (diff)
NFSv4.1: don't send COMMIT to ds for data sync writes
Based on consensus reached in Feb 2011 interim IETF meeting regarding use of LAYOUTCOMMIT, it has been decided that a NFS_DATA_SYNC return from a WRITE to data server should not initiate a COMMIT. Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 55a8c3671233..92b4a6614fd3 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -474,7 +474,10 @@ nfs_clear_request_commit(struct nfs_page *req)
474static inline 474static inline
475int nfs_write_need_commit(struct nfs_write_data *data) 475int nfs_write_need_commit(struct nfs_write_data *data)
476{ 476{
477 return data->verf.committed != NFS_FILE_SYNC; 477 if (data->verf.committed == NFS_DATA_SYNC)
478 return data->lseg == NULL;
479 else
480 return data->verf.committed != NFS_FILE_SYNC;
478} 481}
479 482
480static inline 483static inline