Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: David Howells <dhowells@redhat.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>, Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <kolga@netapp.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sunrpc: set the bv_offset of first bvec in svc_tcp_sendmsg
Date: Mon, 14 Aug 2023 15:11:07 -0400	[thread overview]
Message-ID: <f3bca29ab509069b8fe947672eb19bc1926a97ab.camel@kernel.org> (raw)
In-Reply-To: <ZNp5nzfLGij7O5/k@tissot.1015granger.net>

On Mon, 2023-08-14 at 14:59 -0400, Chuck Lever wrote:
> On Mon, Aug 14, 2023 at 01:36:54PM -0400, Jeff Layton wrote:
> > svc_tcp_sendmsg used to factor in the xdr->page_base when sending pages,
> > but 5df5dd03a8f7 dropped that part of the handling. Fix it by setting
> > the bv_offset of the first bvec.
> > 
> > Fixes: 5df5dd03a8f7 ("sunrpc: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage")
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> 
> LGTM. However, nfsd-fixes does not have 5df5dd03a8f7 because the
> previous nfsd-next was merged into v6.5 before David's
> MSG_SPLICE_PAGES work was merged.
> 
> Unless someone has a better suggestion, I'll rebase nfsd-fixes to
> v6.5-r6 and apply this fix to send to Linus.
> 

ACK. That's probably safer than trying to pull in the big rework at the
last minute.


> 
> > ---
> > Changes in v2:
> > - limit the change to just svc_tcp_sendmsg
> > ---
> >  net/sunrpc/svcsock.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
> > index e43f26382411..2eb8df44f894 100644
> > --- a/net/sunrpc/svcsock.c
> > +++ b/net/sunrpc/svcsock.c
> > @@ -1244,6 +1244,9 @@ static int svc_tcp_sendmsg(struct socket *sock, struct xdr_buf *xdr,
> >  	if (ret != head->iov_len)
> >  		goto out;
> >  
> > +	if (xdr_buf_pagecount(xdr))
> > +		xdr->bvec[0].bv_offset = offset_in_page(xdr->page_base);
> > +
> >  	msg.msg_flags = MSG_SPLICE_PAGES;
> >  	iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, xdr->bvec,
> >  		      xdr_buf_pagecount(xdr), xdr->page_len);
> > 
> > ---
> > base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421
> > change-id: 20230814-sendpage-b04874eed249
> > 
> > Best regards,
> > -- 
> > Jeff Layton <jlayton@kernel.org>
> > 
> 

-- 
Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2023-08-14 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 17:36 [PATCH v2] sunrpc: set the bv_offset of first bvec in svc_tcp_sendmsg Jeff Layton
2023-08-14 18:59 ` Chuck Lever
2023-08-14 19:11   ` Jeff Layton [this message]

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=f3bca29ab509069b8fe947672eb19bc1926a97ab.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kolga@netapp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tom@talpey.com \
    --cc=trond.myklebust@hammerspace.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox