diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2020-08-24 18:01:23 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2020-08-24 18:01:23 -0400 |
commit | 080634eb1663fd78a5894a85bcc5bc0bc3b1f231 (patch) | |
tree | e590998277cb773b438c32099eff16d974f61448 | |
parent | c39634df3d83e1729a64d456f67c47ad90ed259d (diff) | |
download | longterm-queue-5.2-080634eb1663fd78a5894a85bcc5bc0bc3b1f231.tar.gz |
nfs: sunrpc: ctxt refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | queue/nfsd-Fix-NFSv4-READ-on-RDMA-when-using-readv.patch | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/queue/nfsd-Fix-NFSv4-READ-on-RDMA-when-using-readv.patch b/queue/nfsd-Fix-NFSv4-READ-on-RDMA-when-using-readv.patch index b6c04a67..31c8d757 100644 --- a/queue/nfsd-Fix-NFSv4-READ-on-RDMA-when-using-readv.patch +++ b/queue/nfsd-Fix-NFSv4-READ-on-RDMA-when-using-readv.patch @@ -1,4 +1,4 @@ -From 412055398b9e67e07347a936fc4a6adddabe9cf4 Mon Sep 17 00:00:00 2001 +From ccef874e7b532d5ac03dda324b17edefb3856029 Mon Sep 17 00:00:00 2001 From: Chuck Lever <chuck.lever@oracle.com> Date: Mon, 2 Mar 2020 14:45:53 -0500 Subject: [PATCH] nfsd: Fix NFSv4 READ on RDMA when using readv @@ -31,10 +31,10 @@ Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=198053 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c -index ad38aed6f5c2..eedb62c411a5 100644 +index 52c4f6daa649..7a1cc8b77d42 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c -@@ -3594,17 +3594,17 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp, +@@ -3535,17 +3535,17 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp, u32 zzz = 0; int pad; @@ -61,7 +61,7 @@ index ad38aed6f5c2..eedb62c411a5 100644 while (len) { thislen = min_t(long, len, PAGE_SIZE); p = xdr_reserve_space(xdr, (thislen+3)&~3); -@@ -3623,6 +3623,8 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp, +@@ -3563,6 +3563,8 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp, read->rd_length = maxcount; if (nfserr) return nfserr; @@ -69,9 +69,9 @@ index ad38aed6f5c2..eedb62c411a5 100644 + return nfserr_io; xdr_truncate_encode(xdr, starting_len + 8 + ((maxcount+3)&~3)); - tmp = htonl(eof); + eof = nfsd_eof_on_read(len, maxcount, read->rd_offset, diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h -index 7f0a83451bc0..fd390894a584 100644 +index 1afe38eb33f7..82665ff360fd 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -517,6 +517,9 @@ void svc_wake_up(struct svc_serv *); @@ -85,10 +85,10 @@ index 7f0a83451bc0..fd390894a584 100644 struct page **pages, struct kvec *first, size_t total); diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h -index 40f65888dd38..04e4a34d1c6a 100644 +index 7b0ab2c86148..9f588f923fe4 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h -@@ -137,6 +137,8 @@ struct svc_rdma_recv_ctxt { +@@ -136,6 +136,8 @@ struct svc_rdma_recv_ctxt { unsigned int rc_page_count; unsigned int rc_hdr_count; u32 rc_inv_rkey; @@ -131,10 +131,10 @@ index ea6f46be9cb7..9e1e046de176 100644 void (*xpo_detach)(struct svc_xprt *); void (*xpo_free)(struct svc_xprt *); diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c -index 187dd4e73d64..18676d36f490 100644 +index e15cb704453e..f843d27452c9 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c -@@ -1636,6 +1636,22 @@ u32 svc_max_payload(const struct svc_rqst *rqstp) +@@ -1634,6 +1634,22 @@ u32 svc_max_payload(const struct svc_rqst *rqstp) } EXPORT_SYMBOL_GPL(svc_max_payload); @@ -158,7 +158,7 @@ index 187dd4e73d64..18676d36f490 100644 * svc_fill_write_vector - Construct data argument for VFS write call * @rqstp: svc_rqst to operate on diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c -index 2934dd711715..758ab10690de 100644 +index 4260924ad9db..d52abde51f1b 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -279,6 +279,12 @@ static int svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) @@ -174,7 +174,7 @@ index 2934dd711715..758ab10690de 100644 /* * Report socket names for nfsdfs */ -@@ -653,6 +659,7 @@ static const struct svc_xprt_ops svc_udp_ops = { +@@ -655,6 +661,7 @@ static const struct svc_xprt_ops svc_udp_ops = { .xpo_create = svc_udp_create, .xpo_recvfrom = svc_udp_recvfrom, .xpo_sendto = svc_udp_sendto, @@ -182,7 +182,7 @@ index 2934dd711715..758ab10690de 100644 .xpo_release_rqst = svc_release_udp_skb, .xpo_detach = svc_sock_detach, .xpo_free = svc_sock_free, -@@ -1171,6 +1178,7 @@ static const struct svc_xprt_ops svc_tcp_ops = { +@@ -1175,6 +1182,7 @@ static const struct svc_xprt_ops svc_tcp_ops = { .xpo_create = svc_tcp_create, .xpo_recvfrom = svc_tcp_recvfrom, .xpo_sendto = svc_tcp_sendto, @@ -191,7 +191,7 @@ index 2934dd711715..758ab10690de 100644 .xpo_detach = svc_tcp_sock_detach, .xpo_free = svc_sock_free, diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c -index 96bccd398469..71127d898562 100644 +index b5b77c7ecee7..6566620912d6 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -193,6 +193,7 @@ svc_rdma_recv_ctxt_get(struct svcxprt_rdma *rdma) @@ -203,10 +203,10 @@ index 96bccd398469..71127d898562 100644 out_empty: diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c -index 003610ce00bc..927f98995356 100644 +index 7d4faf309601..3f8b87d35570 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c -@@ -482,18 +482,19 @@ static int svc_rdma_send_xdr_kvec(struct svc_rdma_write_info *info, +@@ -480,18 +480,19 @@ static int svc_rdma_send_xdr_kvec(struct svc_rdma_write_info *info, vec->iov_len); } @@ -233,7 +233,7 @@ index 003610ce00bc..927f98995356 100644 } /** -@@ -501,6 +502,8 @@ static int svc_rdma_send_xdr_pagelist(struct svc_rdma_write_info *info, +@@ -499,6 +500,8 @@ static int svc_rdma_send_xdr_pagelist(struct svc_rdma_write_info *info, * @rdma: controlling RDMA transport * @wr_ch: Write chunk provided by client * @xdr: xdr_buf containing the data payload @@ -242,7 +242,7 @@ index 003610ce00bc..927f98995356 100644 * * Returns a non-negative number of bytes the chunk consumed, or * %-E2BIG if the payload was larger than the Write chunk, -@@ -510,19 +513,20 @@ static int svc_rdma_send_xdr_pagelist(struct svc_rdma_write_info *info, +@@ -508,19 +511,20 @@ static int svc_rdma_send_xdr_pagelist(struct svc_rdma_write_info *info, * %-EIO if rdma_rw initialization failed (DMA mapping, etc). */ int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, __be32 *wr_ch, @@ -266,7 +266,7 @@ index 003610ce00bc..927f98995356 100644 if (ret < 0) goto out_err; -@@ -531,7 +535,7 @@ int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, __be32 *wr_ch, +@@ -529,7 +533,7 @@ int svc_rdma_send_write_chunk(struct svcxprt_rdma *rdma, __be32 *wr_ch, goto out_err; trace_svcrdma_encode_write(xdr->page_len); @@ -275,7 +275,7 @@ index 003610ce00bc..927f98995356 100644 out_err: svc_rdma_write_info_free(info); -@@ -571,7 +575,9 @@ int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, __be32 *rp_ch, +@@ -569,7 +573,9 @@ int svc_rdma_send_reply_chunk(struct svcxprt_rdma *rdma, __be32 *rp_ch, * client did not provide Write chunks. */ if (!writelist && xdr->page_len) { @@ -287,10 +287,10 @@ index 003610ce00bc..927f98995356 100644 goto out_err; consumed += xdr->page_len; diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c -index f3f108090aa4..a11983c2056f 100644 +index 93ff7967389a..217106c66a13 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c -@@ -858,7 +858,18 @@ int svc_rdma_sendto(struct svc_rqst *rqstp) +@@ -856,7 +856,18 @@ int svc_rdma_sendto(struct svc_rqst *rqstp) if (wr_lst) { /* XXX: Presume the client sent only one Write chunk */ @@ -310,9 +310,9 @@ index f3f108090aa4..a11983c2056f 100644 if (ret < 0) goto err2; svc_rdma_xdr_encode_write_list(rdma_resp, wr_lst, ret); -@@ -900,3 +911,30 @@ int svc_rdma_sendto(struct svc_rqst *rqstp) - ret = -ENOTCONN; - goto out; +@@ -891,3 +902,30 @@ int svc_rdma_sendto(struct svc_rqst *rqstp) + set_bit(XPT_CLOSE, &xprt->xpt_flags); + return -ENOTCONN; } + +/** @@ -342,10 +342,10 @@ index f3f108090aa4..a11983c2056f 100644 + return 0; +} diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c -index 145a3615c319..f6aad2798063 100644 +index fb96283745d1..acb7c558e4fd 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c -@@ -82,6 +82,7 @@ static const struct svc_xprt_ops svc_rdma_ops = { +@@ -81,6 +81,7 @@ static const struct svc_xprt_ops svc_rdma_ops = { .xpo_create = svc_rdma_create, .xpo_recvfrom = svc_rdma_recvfrom, .xpo_sendto = svc_rdma_sendto, |