Skip to content

Commit ff79c74

Browse files
Shirley MaJ. Bruce Fields
authored andcommitted
NFS/RDMA Release resources in svcrdma when device is removed
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. BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=252 Signed-off-by: Shirley Ma <[email protected]> Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 7b8f458 commit ff79c74

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/xprtrdma/svc_rdma_transport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id,
659659
if (xprt) {
660660
set_bit(XPT_CLOSE, &xprt->xpt_flags);
661661
svc_xprt_enqueue(xprt);
662+
svc_xprt_put(xprt);
662663
}
663664
break;
664665
default:

0 commit comments

Comments
 (0)