* [PATCH][BUG]: Pure nfs client performance using odirect.
@ 2010-11-18 10:36 Arun R Bharadwaj
2010-11-18 15:52 ` Chuck Lever
2010-12-05 12:50 ` Jeff Layton
0 siblings, 2 replies; 3+ messages in thread
From: Arun R Bharadwaj @ 2010-11-18 10:36 UTC (permalink / raw)
To: linux-nfs; +Cc: ffilz, jlayton
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>
Index: linux-2.6.36-rc7/fs/nfs/direct.c
===================================================================
--- linux-2.6.36-rc7.orig/fs/nfs/direct.c 2010-11-18 15:53:15.904972002 +0530
+++ linux-2.6.36-rc7/fs/nfs/direct.c 2010-11-18 15:54:01.184972001 +0530
@@ -867,7 +867,7 @@
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;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][BUG]: Pure nfs client performance using odirect.
2010-11-18 10:36 [PATCH][BUG]: Pure nfs client performance using odirect Arun R Bharadwaj
@ 2010-11-18 15:52 ` Chuck Lever
2010-12-05 12:50 ` Jeff Layton
1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2010-11-18 15:52 UTC (permalink / raw)
To: arun; +Cc: linux-nfs, ffilz, jlayton
On Nov 18, 2010, at 5:36 AM, Arun R Bharadwaj wrote:
> 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>
>
> Index: linux-2.6.36-rc7/fs/nfs/direct.c
> ===================================================================
> --- linux-2.6.36-rc7.orig/fs/nfs/direct.c 2010-11-18 15:53:15.904972002 +0530
> +++ linux-2.6.36-rc7/fs/nfs/direct.c 2010-11-18 15:54:01.184972001 +0530
> @@ -867,7 +867,7 @@
> 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;
This looks reasonable, though I haven't looked closely at the surrounding code. It's probably been in the code for a very long time. I'm surprised no-one caught it sooner.
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][BUG]: Pure nfs client performance using odirect.
2010-11-18 10:36 [PATCH][BUG]: Pure nfs client performance using odirect Arun R Bharadwaj
2010-11-18 15:52 ` Chuck Lever
@ 2010-12-05 12:50 ` Jeff Layton
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2010-12-05 12:50 UTC (permalink / raw)
To: arun; +Cc: linux-nfs, ffilz
On Thu, 18 Nov 2010 16:06:43 +0530
Arun R Bharadwaj <arun@linux.vnet.ibm.com> wrote:
> 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>
>
> Index: linux-2.6.36-rc7/fs/nfs/direct.c
> ===================================================================
> --- linux-2.6.36-rc7.orig/fs/nfs/direct.c 2010-11-18 15:53:15.904972002 +0530
> +++ linux-2.6.36-rc7/fs/nfs/direct.c 2010-11-18 15:54:01.184972001 +0530
> @@ -867,7 +867,7 @@
> 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;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Looks right to me.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-05 12:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 10:36 [PATCH][BUG]: Pure nfs client performance using odirect Arun R Bharadwaj
2010-11-18 15:52 ` Chuck Lever
2010-12-05 12:50 ` Jeff Layton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.