Commit 5abefb86 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Rename "xprt" and "rdma_connect" fields in struct rpcrdma_xprt

Clean up: Use consistent field names in struct rpcrdma_xprt.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent f2846481
...@@ -200,9 +200,9 @@ xprt_rdma_free_addresses(struct rpc_xprt *xprt) ...@@ -200,9 +200,9 @@ xprt_rdma_free_addresses(struct rpc_xprt *xprt)
static void static void
xprt_rdma_connect_worker(struct work_struct *work) xprt_rdma_connect_worker(struct work_struct *work)
{ {
struct rpcrdma_xprt *r_xprt = struct rpcrdma_xprt *r_xprt = container_of(work, struct rpcrdma_xprt,
container_of(work, struct rpcrdma_xprt, rdma_connect.work); rx_connect_worker.work);
struct rpc_xprt *xprt = &r_xprt->xprt; struct rpc_xprt *xprt = &r_xprt->rx_xprt;
int rc = 0; int rc = 0;
xprt_clear_connected(xprt); xprt_clear_connected(xprt);
...@@ -235,7 +235,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt) ...@@ -235,7 +235,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt)
dprintk("RPC: %s: called\n", __func__); dprintk("RPC: %s: called\n", __func__);
cancel_delayed_work_sync(&r_xprt->rdma_connect); cancel_delayed_work_sync(&r_xprt->rx_connect_worker);
xprt_clear_connected(xprt); xprt_clear_connected(xprt);
...@@ -374,7 +374,8 @@ xprt_setup_rdma(struct xprt_create *args) ...@@ -374,7 +374,8 @@ xprt_setup_rdma(struct xprt_create *args)
* connection loss notification is async. We also catch connection loss * connection loss notification is async. We also catch connection loss
* when reaping receives. * when reaping receives.
*/ */
INIT_DELAYED_WORK(&new_xprt->rdma_connect, xprt_rdma_connect_worker); INIT_DELAYED_WORK(&new_xprt->rx_connect_worker,
xprt_rdma_connect_worker);
new_ep->rep_func = rpcrdma_conn_func; new_ep->rep_func = rpcrdma_conn_func;
new_ep->rep_xprt = xprt; new_ep->rep_xprt = xprt;
...@@ -434,7 +435,7 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task) ...@@ -434,7 +435,7 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task)
if (r_xprt->rx_ep.rep_connected != 0) { if (r_xprt->rx_ep.rep_connected != 0) {
/* Reconnect */ /* Reconnect */
schedule_delayed_work(&r_xprt->rdma_connect, schedule_delayed_work(&r_xprt->rx_connect_worker,
xprt->reestablish_timeout); xprt->reestablish_timeout);
xprt->reestablish_timeout <<= 1; xprt->reestablish_timeout <<= 1;
if (xprt->reestablish_timeout > RPCRDMA_MAX_REEST_TO) if (xprt->reestablish_timeout > RPCRDMA_MAX_REEST_TO)
...@@ -442,9 +443,9 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task) ...@@ -442,9 +443,9 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task)
else if (xprt->reestablish_timeout < RPCRDMA_INIT_REEST_TO) else if (xprt->reestablish_timeout < RPCRDMA_INIT_REEST_TO)
xprt->reestablish_timeout = RPCRDMA_INIT_REEST_TO; xprt->reestablish_timeout = RPCRDMA_INIT_REEST_TO;
} else { } else {
schedule_delayed_work(&r_xprt->rdma_connect, 0); schedule_delayed_work(&r_xprt->rx_connect_worker, 0);
if (!RPC_IS_ASYNC(task)) if (!RPC_IS_ASYNC(task))
flush_delayed_work(&r_xprt->rdma_connect); flush_delayed_work(&r_xprt->rx_connect_worker);
} }
} }
......
...@@ -318,16 +318,16 @@ struct rpcrdma_stats { ...@@ -318,16 +318,16 @@ struct rpcrdma_stats {
* during unmount. * during unmount.
*/ */
struct rpcrdma_xprt { struct rpcrdma_xprt {
struct rpc_xprt xprt; struct rpc_xprt rx_xprt;
struct rpcrdma_ia rx_ia; struct rpcrdma_ia rx_ia;
struct rpcrdma_ep rx_ep; struct rpcrdma_ep rx_ep;
struct rpcrdma_buffer rx_buf; struct rpcrdma_buffer rx_buf;
struct rpcrdma_create_data_internal rx_data; struct rpcrdma_create_data_internal rx_data;
struct delayed_work rdma_connect; struct delayed_work rx_connect_worker;
struct rpcrdma_stats rx_stats; struct rpcrdma_stats rx_stats;
}; };
#define rpcx_to_rdmax(x) container_of(x, struct rpcrdma_xprt, xprt) #define rpcx_to_rdmax(x) container_of(x, struct rpcrdma_xprt, rx_xprt)
#define rpcx_to_rdmad(x) (rpcx_to_rdmax(x)->rx_data) #define rpcx_to_rdmad(x) (rpcx_to_rdmax(x)->rx_data)
/* Setting this to 0 ensures interoperability with early servers. /* Setting this to 0 ensures interoperability with early servers.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment