summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-03-23 14:27:44 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-23 20:29:02 +0100
commit465d52437d5ce8d4eb9da0d3e3818b51cff163a1 (patch)
treeeb78b7c5e1e07a6a726e6b7d5dbc683eaad26902 /fs/nfs/write.c
parentNFS: Detect loops in a readdir due to bad cookies (diff)
downloadlinux-465d52437d5ce8d4eb9da0d3e3818b51cff163a1.tar.xz
linux-465d52437d5ce8d4eb9da0d3e3818b51cff163a1.zip
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/write.c')
-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)
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