Merge tag 'nfs-rdma-for-4.20-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 18 Oct 2018 21:29:00 +0000 (17:29 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 18 Oct 2018 21:29:00 +0000 (17:29 -0400)
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 <trond.myklebust@hammerspace.com>
1  2 
net/sunrpc/xprt.c
net/sunrpc/xprtrdma/backchannel.c
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtsock.c

Simple merge
index e7c445cee16f3a0f44fa3201ec22f3e1630203b8,675b5308b7c37362da58f2c55c881159968ec484..e5b367a3e517ac605efa0802976afebd8f365149
@@@ -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);
index 53fa95d6001595d4d8e094cb60dc74fbd57c6f2d,228aee851667230a6700100f5e831d21453c24c2..9f53e0240035e4608ccb2f287d39f55664ca4862
@@@ -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 */
Simple merge
Simple merge