diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2015-01-21 11:02:37 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2015-01-30 10:47:48 -0500 |
commit | 5abefb861fd4306467813380cf21ce21d4b274ce (patch) | |
tree | 8d39f2a867a82bde16c643993bce2b7690255358 /net | |
parent | f2846481b4bf758cf7c3fe8f24b35950306f1db2 (diff) |
xprtrdma: Rename "xprt" and "rdma_connect" fields in struct rpcrdma_xprt
Clean up: Use consistent field names in struct rpcrdma_xprt.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/transport.c | 19 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/xprt_rdma.h | 6 |
2 files changed, 13 insertions, 12 deletions
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index bbd6155d3e34..ee5751326339 100644 --- a/net/sunrpc/xprtrdma/transport.c +++ b/net/sunrpc/xprtrdma/transport.c | |||
@@ -200,9 +200,9 @@ xprt_rdma_free_addresses(struct rpc_xprt *xprt) | |||
200 | static void | 200 | static void |
201 | xprt_rdma_connect_worker(struct work_struct *work) | 201 | xprt_rdma_connect_worker(struct work_struct *work) |
202 | { | 202 | { |
203 | struct rpcrdma_xprt *r_xprt = | 203 | struct rpcrdma_xprt *r_xprt = container_of(work, struct rpcrdma_xprt, |
204 | container_of(work, struct rpcrdma_xprt, rdma_connect.work); | 204 | rx_connect_worker.work); |
205 | struct rpc_xprt *xprt = &r_xprt->xprt; | 205 | struct rpc_xprt *xprt = &r_xprt->rx_xprt; |
206 | int rc = 0; | 206 | int rc = 0; |
207 | 207 | ||
208 | xprt_clear_connected(xprt); | 208 | xprt_clear_connected(xprt); |
@@ -235,7 +235,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt) | |||
235 | 235 | ||
236 | dprintk("RPC: %s: called\n", __func__); | 236 | dprintk("RPC: %s: called\n", __func__); |
237 | 237 | ||
238 | cancel_delayed_work_sync(&r_xprt->rdma_connect); | 238 | cancel_delayed_work_sync(&r_xprt->rx_connect_worker); |
239 | 239 | ||
240 | xprt_clear_connected(xprt); | 240 | xprt_clear_connected(xprt); |
241 | 241 | ||
@@ -374,7 +374,8 @@ xprt_setup_rdma(struct xprt_create *args) | |||
374 | * connection loss notification is async. We also catch connection loss | 374 | * connection loss notification is async. We also catch connection loss |
375 | * when reaping receives. | 375 | * when reaping receives. |
376 | */ | 376 | */ |
377 | INIT_DELAYED_WORK(&new_xprt->rdma_connect, xprt_rdma_connect_worker); | 377 | INIT_DELAYED_WORK(&new_xprt->rx_connect_worker, |
378 | xprt_rdma_connect_worker); | ||
378 | new_ep->rep_func = rpcrdma_conn_func; | 379 | new_ep->rep_func = rpcrdma_conn_func; |
379 | new_ep->rep_xprt = xprt; | 380 | new_ep->rep_xprt = xprt; |
380 | 381 | ||
@@ -434,17 +435,17 @@ xprt_rdma_connect(struct rpc_xprt *xprt, struct rpc_task *task) | |||
434 | 435 | ||
435 | if (r_xprt->rx_ep.rep_connected != 0) { | 436 | if (r_xprt->rx_ep.rep_connected != 0) { |
436 | /* Reconnect */ | 437 | /* Reconnect */ |
437 | schedule_delayed_work(&r_xprt->rdma_connect, | 438 | schedule_delayed_work(&r_xprt->rx_connect_worker, |
438 | xprt->reestablish_timeout); | 439 | xprt->reestablish_timeout); |
439 | xprt->reestablish_timeout <<= 1; | 440 | xprt->reestablish_timeout <<= 1; |
440 | if (xprt->reestablish_timeout > RPCRDMA_MAX_REEST_TO) | 441 | if (xprt->reestablish_timeout > RPCRDMA_MAX_REEST_TO) |
441 | xprt->reestablish_timeout = RPCRDMA_MAX_REEST_TO; | 442 | xprt->reestablish_timeout = RPCRDMA_MAX_REEST_TO; |
442 | else if (xprt->reestablish_timeout < RPCRDMA_INIT_REEST_TO) | 443 | else if (xprt->reestablish_timeout < RPCRDMA_INIT_REEST_TO) |
443 | xprt->reestablish_timeout = RPCRDMA_INIT_REEST_TO; | 444 | xprt->reestablish_timeout = RPCRDMA_INIT_REEST_TO; |
444 | } else { | 445 | } else { |
445 | schedule_delayed_work(&r_xprt->rdma_connect, 0); | 446 | schedule_delayed_work(&r_xprt->rx_connect_worker, 0); |
446 | if (!RPC_IS_ASYNC(task)) | 447 | if (!RPC_IS_ASYNC(task)) |
447 | flush_delayed_work(&r_xprt->rdma_connect); | 448 | flush_delayed_work(&r_xprt->rx_connect_worker); |
448 | } | 449 | } |
449 | } | 450 | } |
450 | 451 | ||
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h index b799041b75bf..9a7aab31bf6e 100644 --- a/net/sunrpc/xprtrdma/xprt_rdma.h +++ b/net/sunrpc/xprtrdma/xprt_rdma.h | |||
@@ -318,16 +318,16 @@ struct rpcrdma_stats { | |||
318 | * during unmount. | 318 | * during unmount. |
319 | */ | 319 | */ |
320 | struct rpcrdma_xprt { | 320 | struct rpcrdma_xprt { |
321 | struct rpc_xprt xprt; | 321 | struct rpc_xprt rx_xprt; |
322 | struct rpcrdma_ia rx_ia; | 322 | struct rpcrdma_ia rx_ia; |
323 | struct rpcrdma_ep rx_ep; | 323 | struct rpcrdma_ep rx_ep; |
324 | struct rpcrdma_buffer rx_buf; | 324 | struct rpcrdma_buffer rx_buf; |
325 | struct rpcrdma_create_data_internal rx_data; | 325 | struct rpcrdma_create_data_internal rx_data; |
326 | struct delayed_work rdma_connect; | 326 | struct delayed_work rx_connect_worker; |
327 | struct rpcrdma_stats rx_stats; | 327 | struct rpcrdma_stats rx_stats; |
328 | }; | 328 | }; |
329 | 329 | ||
330 | #define rpcx_to_rdmax(x) container_of(x, struct rpcrdma_xprt, xprt) | 330 | #define rpcx_to_rdmax(x) container_of(x, struct rpcrdma_xprt, rx_xprt) |
331 | #define rpcx_to_rdmad(x) (rpcx_to_rdmax(x)->rx_data) | 331 | #define rpcx_to_rdmad(x) (rpcx_to_rdmax(x)->rx_data) |
332 | 332 | ||
333 | /* Setting this to 0 ensures interoperability with early servers. | 333 | /* Setting this to 0 ensures interoperability with early servers. |