Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b47d19de authored by Arun Bharadwaj's avatar Arun Bharadwaj Committed by Trond Myklebust
Browse files

Pure nfs client performance using odirect.



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: default avatarArun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 5fc43978
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;