linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bfields@fieldses.org (J. Bruce Fields)
To: Dan Aloni <dan@kernelim.com>
Cc: Chuck Lever <chuck.lever@oracle.com>,
	linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2] svcrdma: fix bounce buffers for unaligned offsets and multiple pages
Date: Wed, 14 Oct 2020 17:26:16 -0400	[thread overview]
Message-ID: <20201014212616.GB23262@fieldses.org> (raw)
In-Reply-To: <20201002193343.1040351-1-dan@kernelim.com>

Thanks, applying for 5.10.--b.

On Fri, Oct 02, 2020 at 10:33:43PM +0300, Dan Aloni wrote:
> This was discovered using O_DIRECT at the client side, with small
> unaligned file offsets or IOs that span multiple file pages.
> 
> Fixes: e248aa7be86 ("svcrdma: Remove max_sge check at connect time")
> Signed-off-by: Dan Aloni <dan@kernelim.com>
> ---
>  net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Extended testing found another issue with the loop.
> 
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
> index 7b94d971feb3..c3d588b149aa 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
> @@ -638,10 +638,11 @@ static int svc_rdma_pull_up_reply_msg(struct svcxprt_rdma *rdma,
>  		while (remaining) {
>  			len = min_t(u32, PAGE_SIZE - pageoff, remaining);
>  
> -			memcpy(dst, page_address(*ppages), len);
> +			memcpy(dst, page_address(*ppages) + pageoff, len);
>  			remaining -= len;
>  			dst += len;
>  			pageoff = 0;
> +			ppages++;
>  		}
>  	}
>  
> -- 
> 2.26.2

      reply	other threads:[~2020-10-15  2:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 14:48 [PATCH] svcrdma: fix bounce buffers for non-zero page offsets Dan Aloni
2020-10-02 14:54 ` Chuck Lever
2020-10-02 15:18   ` Dan Aloni
2020-10-02 15:23     ` Chuck Lever
2020-10-02 19:33       ` [PATCH v2] svcrdma: fix bounce buffers for unaligned offsets and multiple pages Dan Aloni
2020-10-14 21:26         ` J. Bruce Fields [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=20201014212616.GB23262@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=dan@kernelim.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).