Merge tag 'nfs-rdma-for-4.14-1' of git://git.linux-nfs.org/projects/anna/linux-nfs...
authorTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Sep 2017 19:16:04 +0000 (15:16 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Tue, 5 Sep 2017 19:16:04 +0000 (15:16 -0400)
NFS-over-RDMA client updates for Linux 4.14

Bugfixes and cleanups:
- Constify rpc_xprt_ops
- Harden RPC call encoding and decoding
- Clean up rpc call decoding to use xdr_streams
- Remove unused variables from various structures
- Refactor code to remove imul instructions
- Rearrange rx_stats structure for better cacheline sharing

1  2 
include/linux/sunrpc/xprt.h
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/svc_rdma_backchannel.c
net/sunrpc/xprtsock.c

Simple merge
index dfa748a0c8dee572ac1e94c525b0ee115bae4e53,84584caaa7e9bc429b30fc561e9cca3235c72129..7fec4039cd15ac6b5b92be13f6d61c97ed34cdaf
@@@ -1051,8 -1292,8 +1292,8 @@@ rpcrdma_reply_handler(struct work_struc
         * RPC completion while holding the transport lock to ensure
         * the rep, rqst, and rq_task pointers remain stable.
         */
 -      spin_lock_bh(&xprt->transport_lock);
 +      spin_lock(&xprt->recv_lock);
-       rqst = xprt_lookup_rqst(xprt, headerp->rm_xid);
+       rqst = xprt_lookup_rqst(xprt, xid);
        if (!rqst)
                goto out_norqst;
        xprt->reestablish_timeout = 0;
@@@ -1166,28 -1347,14 +1347,14 @@@ out_badversion
        r_xprt->rx_stats.bad_reply_count++;
        goto out;
  
- out_rdmaerr:
-       rmerr = be32_to_cpu(headerp->rm_body.rm_error.rm_err);
-       switch (rmerr) {
-       case ERR_VERS:
-               pr_err("%s: server reports header version error (%u-%u)\n",
-                      __func__,
-                      be32_to_cpu(headerp->rm_body.rm_error.rm_vers_low),
-                      be32_to_cpu(headerp->rm_body.rm_error.rm_vers_high));
-               break;
-       case ERR_CHUNK:
-               pr_err("%s: server reports header decoding error\n",
-                      __func__);
-               break;
-       default:
-               pr_err("%s: server reports unknown error %d\n",
-                      __func__, rmerr);
-       }
-       status = -EREMOTEIO;
+ out_badheader:
+       dprintk("RPC: %5u %s: invalid rpcrdma reply (type %u)\n",
+               rqst->rq_task->tk_pid, __func__, be32_to_cpu(proc));
        r_xprt->rx_stats.bad_reply_count++;
+       status = -EIO;
        goto out;
  
 -/* The req was still available, but by the time the transport_lock
 +/* The req was still available, but by the time the recv_lock
   * was acquired, the rqst and task had been released. Thus the RPC
   * has already been terminated.
   */
Simple merge