From: bfields@fieldses.org (J. Bruce Fields)
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Bruce Fields <bfields@redhat.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: WARN_ON added to rpc_create()
Date: Wed, 3 Aug 2016 13:47:24 -0400 [thread overview]
Message-ID: <20160803174724.GA5993@fieldses.org> (raw)
In-Reply-To: <42D0C152-58F9-4467-B86D-2A7A25544CE4@oracle.com>
On Wed, Aug 03, 2016 at 11:27:47AM -0400, Chuck Lever wrote:
> Hi Bruce-
>
> I see that commit 39a9beab5acb83176e8b9a4f0778749a09341f1f
> Author: J. Bruce Fields <bfields@redhat.com>
> AuthorDate: Tue May 17 12:38:21 2016 -0400
>
> rpc: share one xps between all backchannels
>
> has added this piece of code:
>
> @@ -452,10 +452,20 @@ static struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args,
> struct rpc_clnt *clnt = NULL;
> struct rpc_xprt_switch *xps;
>
> - xps = xprt_switch_alloc(xprt, GFP_KERNEL);
> - if (xps == NULL) {
> - xprt_put(xprt);
> - return ERR_PTR(-ENOMEM);
> + if (args->bc_xprt && args->bc_xprt->xpt_bc_xps) {
> + WARN_ON(args->protocol != XPRT_TRANSPORT_BC_TCP);
> + xps = args->bc_xprt->xpt_bc_xps;
> + xprt_switch_get(xps);
> + } else {
>
>
> the WARN_ON here fires on the server whenever I use NFSv4.1 on RDMA.
>
> Can you say why it was added? Is there something RPC/RDMA needs to
> do to make the code safe?
What is args->protocol in this case?
Digging around... OK, I missed that BC_TCP and BC_RDMA were defined as
OR's of an XPRT_TRANSPORT_BC bit with the identifier of the underlying
transport. That makes sense.
So, I should have just used XPRT_TRANSPORT_BC there--I think all I meant
was "is this a backchannel".
Does that fix the problem?
--b.
next prev parent reply other threads:[~2016-08-03 17:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 15:27 WARN_ON added to rpc_create() Chuck Lever
2016-08-03 17:47 ` J. Bruce Fields [this message]
2016-08-03 19:40 ` Chuck Lever
2016-08-10 18:01 ` Chuck Lever
2016-08-18 21:56 ` J. Bruce Fields
2016-08-18 21:59 ` Chuck Lever
2016-08-19 14:51 ` J. Bruce Fields
2016-08-18 21:56 ` J. Bruce Fields
2016-08-18 22:11 ` Chuck Lever
2016-08-19 14:50 ` J. Bruce Fields
2016-08-19 15:06 ` Chuck Lever
2016-08-19 15:19 ` Chuck Lever
2016-08-19 15:47 ` J. Bruce Fields
2016-08-19 15:51 ` Chuck Lever
2016-08-19 15:55 ` J. Bruce Fields
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=20160803174724.GA5993@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@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).