xprtrdma: kmalloc rpcrdma_ep separate from rpcrdma_xprt
Change the rpcrdma_xprt_disconnect() function so that it no longer waits for the DISCONNECTED event. This prevents blocking if the remote is unresponsive. In rpcrdma_xprt_disconnect(), the transport's rpcrdma_ep is detached. Upon return from rpcrdma_xprt_disconnect(), the transport (r_xprt) is ready immediately for a new connection. The RDMA_CM_DEVICE_REMOVAL and RDMA_CM_DISCONNECTED events are now handled almost identically. However, because the lifetimes of rpcrdma_xprt structures and rpcrdma_ep structures are now independent, creating an rpcrdma_ep needs to take a module ref count. The ep now owns most of the hardware resources for a transport. Also, a kref is needed to ensure that rpcrdma_ep sticks around long enough for the cm_event_handler to finish. Signed-off-by:Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Anna Schumaker <Anna.Schumaker@Netapp.com>
Showing
- include/trace/events/rpcrdma.h 2 additions, 61 deletionsinclude/trace/events/rpcrdma.h
- net/sunrpc/xprtrdma/backchannel.c 2 additions, 2 deletionsnet/sunrpc/xprtrdma/backchannel.c
- net/sunrpc/xprtrdma/frwr_ops.c 6 additions, 6 deletionsnet/sunrpc/xprtrdma/frwr_ops.c
- net/sunrpc/xprtrdma/rpc_rdma.c 9 additions, 8 deletionsnet/sunrpc/xprtrdma/rpc_rdma.c
- net/sunrpc/xprtrdma/transport.c 17 additions, 20 deletionsnet/sunrpc/xprtrdma/transport.c
- net/sunrpc/xprtrdma/verbs.c 103 additions, 91 deletionsnet/sunrpc/xprtrdma/verbs.c
- net/sunrpc/xprtrdma/xprt_rdma.h 4 additions, 3 deletionsnet/sunrpc/xprtrdma/xprt_rdma.h
Loading
Please register or sign in to comment