From: Trond Myklebust Date: Thu, 18 Oct 2018 21:29:00 +0000 (-0400) Subject: Merge tag 'nfs-rdma-for-4.20-1' of git://git.linux-nfs.org/projects/anna/linux-nfs X-Git-Tag: v4.20-rc1~2^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93bdcf9fdb89646e9446fab25aec76a754969619;p=thirdparty%2Fkernel%2Flinux.git Merge tag 'nfs-rdma-for-4.20-1' of git://git.linux-nfs.org/projects/anna/linux-nfs NFS RDMA client updates for Linux 4.20 Stable bugfixes: - Reset credit grant properly after a disconnect Other bugfixes and cleanups: - xprt_release_rqst_cong is called outside of transport_lock - Create more MRs at a time and toss out old ones during recovery - Various improvements to the RDMA connection and disconnection code: - Improve naming of trace events, functions, and variables - Add documenting comments - Fix metrics and stats reporting - Fix a tracepoint sparse warning Signed-off-by: Trond Myklebust --- 93bdcf9fdb89646e9446fab25aec76a754969619 diff --cc net/sunrpc/xprtrdma/backchannel.c index e7c445cee16f3,675b5308b7c37..e5b367a3e517a --- a/net/sunrpc/xprtrdma/backchannel.c +++ b/net/sunrpc/xprtrdma/backchannel.c @@@ -51,11 -51,12 +51,11 @@@ static int rpcrdma_bc_setup_reqs(struc rqst = &req->rl_slot; rqst->rq_xprt = xprt; - INIT_LIST_HEAD(&rqst->rq_list); INIT_LIST_HEAD(&rqst->rq_bc_list); __set_bit(RPC_BC_PA_IN_USE, &rqst->rq_bc_pa_state); - spin_lock_bh(&xprt->bc_pa_lock); + spin_lock(&xprt->bc_pa_lock); list_add(&rqst->rq_bc_pa_list, &xprt->bc_pa_list); - spin_unlock_bh(&xprt->bc_pa_lock); + spin_unlock(&xprt->bc_pa_lock); size = r_xprt->rx_data.inline_rsize; rb = rpcrdma_alloc_regbuf(size, DMA_TO_DEVICE, GFP_KERNEL); diff --cc net/sunrpc/xprtrdma/rpc_rdma.c index 53fa95d600159,228aee8516672..9f53e0240035e --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@@ -1238,15 -1235,10 +1235,10 @@@ void rpcrdma_complete_rqst(struct rpcrd goto out_badheader; out: - spin_lock(&xprt->recv_lock); + spin_lock(&xprt->queue_lock); - cwnd = xprt->cwnd; - xprt->cwnd = r_xprt->rx_buf.rb_credits << RPC_CWNDSHIFT; - if (xprt->cwnd > cwnd) - xprt_release_rqst_cong(rqst->rq_task); - xprt_complete_rqst(rqst->rq_task, status); xprt_unpin_rqst(rqst); - spin_unlock(&xprt->recv_lock); + spin_unlock(&xprt->queue_lock); return; /* If the incoming reply terminated a pending RPC, the next @@@ -1350,6 -1342,7 +1342,7 @@@ void rpcrdma_reply_handler(struct rpcrd if (!rqst) goto out_norqst; xprt_pin_rqst(rqst); - spin_unlock(&xprt->recv_lock); ++ spin_unlock(&xprt->queue_lock); if (credits == 0) credits = 1; /* don't deadlock */