summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-03-23 13:27:44 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-23 15:29:02 -0400
commit465d52437d5ce8d4eb9da0d3e3818b51cff163a1 (patch)
treeeb78b7c5e1e07a6a726e6b7d5dbc683eaad26902 /fs/nfs
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/nfs')
-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 55a8c367123..92b4a6614fd 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -474,7 +474,10 @@ nfs_clear_request_commit(struct nfs_page *req)
static inline
int nfs_write_need_commit(struct nfs_write_data *data)
{
- return data->verf.committed != NFS_FILE_SYNC;
+ if (data->verf.committed == NFS_DATA_SYNC)
+ return data->lseg == NULL;
+ else
+ return data->verf.committed != NFS_FILE_SYNC;
}
static inline