All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: arun@linux.vnet.ibm.com
Cc: linux-nfs@vger.kernel.org, ffilz@us.ibm.com, jlayton@redhat.com
Subject: Re: [PATCH][BUG]: Pure nfs client performance using odirect.
Date: Thu, 18 Nov 2010 10:52:35 -0500	[thread overview]
Message-ID: <3A90B9B1-69D0-43A4-8F2F-5358B8A39406@oracle.com> (raw)
In-Reply-To: <20101118103643.GA13235@linux.vnet.ibm.com>


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





  reply	other threads:[~2010-11-18 15:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 10:36 [PATCH][BUG]: Pure nfs client performance using odirect Arun R Bharadwaj
2010-11-18 15:52 ` Chuck Lever [this message]
2010-12-05 12:50 ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A90B9B1-69D0-43A4-8F2F-5358B8A39406@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=arun@linux.vnet.ibm.com \
    --cc=ffilz@us.ibm.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.