From: Chuck Lever <chuck.lever@oracle.com>
To: Anna.Schumaker@netapp.com
Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: [PATCH v3 02/17] xprtrdma: Warn when there are orphaned IB objects
Date: Tue, 26 May 2015 11:51:27 -0400 [thread overview]
Message-ID: <20150526155127.4542.85918.stgit@manet.1015granger.net> (raw)
In-Reply-To: <20150526153926.4542.96409.stgit@manet.1015granger.net>
WARN during transport destruction if ib_dealloc_pd() fails. This is
a sign that xprtrdma orphaned one or more RDMA API objects at some
point, which can pin lower layer kernel modules and cause shutdown
to hang.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Devesh Sharma <devesh.sharma@avagotech.com>
Tested-By: Devesh Sharma <devesh.sharma@avagotech.com>
Reviewed-by: Doug Ledford <dledford@redhat.com>
---
net/sunrpc/xprtrdma/verbs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 4870d27..51900e6 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -702,17 +702,17 @@ rpcrdma_ia_close(struct rpcrdma_ia *ia)
dprintk("RPC: %s: ib_dereg_mr returned %i\n",
__func__, rc);
}
+
if (ia->ri_id != NULL && !IS_ERR(ia->ri_id)) {
if (ia->ri_id->qp)
rdma_destroy_qp(ia->ri_id);
rdma_destroy_id(ia->ri_id);
ia->ri_id = NULL;
}
- if (ia->ri_pd != NULL && !IS_ERR(ia->ri_pd)) {
- rc = ib_dealloc_pd(ia->ri_pd);
- dprintk("RPC: %s: ib_dealloc_pd returned %i\n",
- __func__, rc);
- }
+
+ /* If the pd is still busy, xprtrdma missed freeing a resource */
+ if (ia->ri_pd && !IS_ERR(ia->ri_pd))
+ WARN_ON(ib_dealloc_pd(ia->ri_pd));
}
/*
next prev parent reply other threads:[~2015-05-26 15:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 15:51 [PATCH v3 00/17] NFS/RDMA client patches for 4.2 Chuck Lever
2015-05-26 15:51 ` [PATCH v3 01/17] SUNRPC: Transport fault injection Chuck Lever
2015-05-26 15:51 ` Chuck Lever [this message]
2015-05-26 15:51 ` [PATCH v3 03/17] xprtrdma: Replace rpcrdma_rep::rr_buffer with rr_rxprt Chuck Lever
2015-05-26 15:51 ` [PATCH v3 04/17] xprtrdma: Remove rr_func Chuck Lever
2015-05-26 15:51 ` [PATCH v3 05/17] xprtrdma: Use ib_device pointer safely Chuck Lever
2015-05-26 15:52 ` [PATCH v3 06/17] xprtrdma: Introduce helpers for allocating MWs Chuck Lever
2015-05-26 15:52 ` [PATCH v3 07/17] xprtrdma: Acquire FMRs in rpcrdma_fmr_register_external() Chuck Lever
2015-05-26 15:52 ` [PATCH v3 08/17] xprtrdma: Introduce an FRMR recovery workqueue Chuck Lever
2015-05-26 15:52 ` [PATCH v3 09/17] xprtrdma: Acquire MRs in rpcrdma_register_external() Chuck Lever
2015-05-26 15:52 ` [PATCH v3 10/17] xprtrdma: Remove unused LOCAL_INV recovery logic Chuck Lever
2015-05-26 15:52 ` [PATCH v3 11/17] xprtrdma: Remove ->ro_reset Chuck Lever
2015-05-26 15:53 ` [PATCH v3 12/17] xprtrdma: Remove rpcrdma_ia::ri_memreg_strategy Chuck Lever
2015-05-26 15:53 ` [PATCH v3 13/17] xprtrdma: Split rb_lock Chuck Lever
2015-05-26 15:53 ` [PATCH v3 14/17] xprtrdma: Stack relief in fmr_op_map() Chuck Lever
2015-05-26 15:53 ` [PATCH v3 15/17] xprtrdma: Reduce per-transport MR allocation Chuck Lever
2015-05-26 15:53 ` [PATCH v3 16/17] SUNRPC: Clean up bc_send() Chuck Lever
2015-05-26 15:53 ` [PATCH v3 17/17] NFS: Fix size of NFSACL SETACL operations 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=20150526155127.4542.85918.stgit@manet.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=Anna.Schumaker@netapp.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;
as well as URLs for NNTP newsgroup(s).