diff mbox

[01/12] NFSv4.1: don't send COMMIT to ds for data sync writes

Message ID 1300886875-5016-2-git-send-email-iisaman@netapp.com (mailing list archive)
State Accepted, archived
Delegated to: Trond Myklebust
Headers show

Commit Message

Fred Isaman March 23, 2011, 1:27 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 55a8c36..92b4a66 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