Skip to content

Commit

Permalink
NFSv4.1: don't send COMMIT to ds for data sync writes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Mar 23, 2011
1 parent 8ef2ce3 commit 465d524
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 465d524

Please sign in to comment.