From: Fred Isaman Date: Wed, 23 Mar 2011 13:27:44 +0000 (+0000) Subject: NFSv4.1: don't send COMMIT to ds for data sync writes X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=465d52437d5ce8d4eb9da0d3e3818b51cff163a1;p=linux-beck.git 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 Signed-off-by: Trond Myklebust --- 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