summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorArun Bharadwaj <arun@linux.vnet.ibm.com>2010-11-18 10:36:43 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-11-22 13:24:42 -0500
commitb47d19de2c714020ba8f5545a6e7d4968f37eb45 (patch)
tree546161934b37b1dd4901f2752387fee6542a224a /fs/nfs
parent5fc43978a79e8021c189660ab63249fd29c5fb32 (diff)
downloadlinux-3.10-b47d19de2c714020ba8f5545a6e7d4968f37eb45.tar.gz
linux-3.10-b47d19de2c714020ba8f5545a6e7d4968f37eb45.tar.bz2
linux-3.10-b47d19de2c714020ba8f5545a6e7d4968f37eb45.zip
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: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 84d3c8b9020..e6ace0d93c7 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -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;