summaryrefslogtreecommitdiff
path: root/fs/nfs/direct.c
diff options
context:
space:
mode:
authorArun Bharadwaj <arun@linux.vnet.ibm.com>2010-11-18 13:36:43 +0300
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-11-22 21:24:42 +0300
commitb47d19de2c714020ba8f5545a6e7d4968f37eb45 (patch)
tree546161934b37b1dd4901f2752387fee6542a224a /fs/nfs/direct.c
parent5fc43978a79e8021c189660ab63249fd29c5fb32 (diff)
downloadlinux-b47d19de2c714020ba8f5545a6e7d4968f37eb45.tar.xz
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/direct.c')
-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 84d3c8b90206..e6ace0d93c71 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;