From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: [PATCH v1 1/5] NFS/RDMA Release resources in svcrdma when device is removed
Date: Thu, 09 Jul 2015 16:45:08 -0400 [thread overview]
Message-ID: <20150709204508.8481.29228.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <20150709204230.8481.45457.stgit@klimt.1015granger.net>
From: Shirley Ma <shirley.ma@oracle.com>
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 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 6b36279..f4b9732 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -659,6 +659,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:
next prev parent reply other threads:[~2015-07-09 20:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 20:44 [PATCH v1 0/5] NFS/RDMA server side for Linux 4.3 Chuck Lever
2015-07-09 20:45 ` Chuck Lever [this message]
2015-07-09 20:45 ` [PATCH v1 2/5] svcrdma: Fix send_reply() scatter/gather set-up Chuck Lever
2015-07-09 20:45 ` [PATCH v1 3/5] svcrdma: Clean up svc_rdma_get_reply_array() Chuck Lever
2015-07-09 20:45 ` [PATCH v1 4/5] svcrdma: Remove svc_rdma_fastreg() Chuck Lever
2015-07-09 20:45 ` [PATCH v1 5/5] svcrdma: Boost NFS READ/WRITE payload size maximum Chuck Lever
2015-07-10 14:18 ` J. Bruce Fields
2015-07-10 14:18 ` J. Bruce Fields
2015-07-10 14:59 ` Chuck Lever
2015-07-10 15:54 ` J. Bruce Fields
2015-07-10 15:59 ` Chuck Lever
2015-07-10 16:05 ` J. Bruce Fields
2015-07-13 16:40 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150709204508.8481.29228.stgit@klimt.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox