]> www.infradead.org Git - users/jedix/linux-maple.git/commit
NFS/RDMA Release resources in svcrdma when device is removed
authorShirley Ma <shirley.ma@oracle.com>
Tue, 25 Aug 2015 19:33:40 +0000 (13:33 -0600)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:45:57 +0000 (14:45 -0600)
commitb2b4faf7227dba99ab341a6716142ad1fcf7a186
treec3636d273952dc4f500c84ef5a904eeb855096d7
parent8f6eefaed9b95f207042e29ce95767fc46649572
NFS/RDMA Release resources in svcrdma when device is removed

[ Queued for upstream v4.3 ]

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 <shirley.ma@oracle.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/svc_rdma_transport.c