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
@@@ -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);
@@@ -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