All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] NFS/RDMA Release resources in svcrdma when device is removed
@ 2015-06-03 18:40 Shirley Ma
  2015-06-03 18:44 ` Chuck Lever
  0 siblings, 1 reply; 4+ messages in thread
From: Shirley Ma @ 2015-06-03 18:40 UTC (permalink / raw)
  To: 'Tom Tucker', Chuck Lever, Steve Wise; +Cc: Linux NFS Mailing List

When removing underlying RDMA device, the rmmod will hang forever if there
are any outstanding NFS/RDMA client mounts. The outstanding NFS/RDMA counts 
could also prevent the server from shutting down. Further debugging shows 
that the existing connections are not teared down and resource are not 
released when receiving RDMA_CM_EVENT_DEVICE_REMOVAL event. It seems the 
original code missing svc_xprt_put() in RDMA_CM_EVENT_REMOVAL event handler 
thus svc_xprt_free is never invoked to release the existing connection resources.

The patch has been passed removing, adding device back and forth without 
stopping NFS/RDMA service. This will also allow a device to be unplugged 
and swapped out without shutting down NFS service.

Signed-off-by: Shirley Ma <shirley.ma@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index f609c1c..2b82569 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -673,6 +673,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
 		if (xprt) {
 			set_bit(XPT_CLOSE, &xprt->xpt_flags);
 			svc_xprt_enqueue(xprt);
+			svc_xprt_put(xprt);
 		}
 		break;
 	default:

Shirley

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-03 21:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 18:40 [PATCH RFC] NFS/RDMA Release resources in svcrdma when device is removed Shirley Ma
2015-06-03 18:44 ` Chuck Lever
2015-06-03 18:49   ` Chuck Lever
2015-06-03 21:56     ` Shirley Ma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.