Skip to content

Commit

Permalink
Pure nfs client performance using odirect.
Browse files Browse the repository at this point in the history
When an application opens a file with O_DIRECT flag, if the size of
the data that is written is equal to wsize, the client sends a
WRITE RPC with stable flag set to UNSTABLE followed by a single
COMMIT RPC rather than sending a single WRITE RPC with the stable
flag set to FILE_SYNC. This a bug.

Patch to fix this.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Arun Bharadwaj authored and Trond Myklebust committed Nov 22, 2010
1 parent 5fc4397 commit b47d19d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ static ssize_t nfs_direct_write(struct kiocb *iocb, const struct iovec *iov,
goto out;
nfs_alloc_commit_data(dreq);

if (dreq->commit_data == NULL || count < wsize)
if (dreq->commit_data == NULL || count <= wsize)
sync = NFS_FILE_SYNC;

dreq->inode = inode;
Expand Down

0 comments on commit b47d19d

Please sign in to comment.