From: "Serge E. Hallyn" <serge@hallyn.com>
To: Rob Landley <rlandley@parallels.com>
Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
containers@lists.linux-foundation.org,
Trond Myklebust <Trond.Myklebust@netapp.com>,
Tim Spriggs <tims@uahirise.org>,
Kir Kolyshkin <kir@parallels.com>,
Pavel Emelyanov <xemul@parallels.com>
Subject: Re: [PATCH 2/3] Supply network namespace to rpcbind.
Date: Mon, 4 Apr 2011 22:01:01 -0500 [thread overview]
Message-ID: <20110405030101.GB6764@hallyn.com> (raw)
In-Reply-To: <4D94319F.8040005@parallels.com>
Quoting Rob Landley (rlandley@parallels.com):
> From: Rob Landley <rlandley@parallels.com>
>
> The sunrpc code already has some support for network namespaces,
> but rpcb_create() is still using init_net. Its arguments include
> a sockaddr and a port, but not a struct net *. Add one, and
> pass in the value from rpc_xprt when calling it.
>
> Signed-off-by: Rob Landley <rlandley@parallels.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
> ---
>
> net/sunrpc/rpcb_clnt.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
> index c652e4c..25bb8f9 100644
> --- a/net/sunrpc/rpcb_clnt.c
> +++ b/net/sunrpc/rpcb_clnt.c
> @@ -223,10 +223,11 @@ out:
> }
>
> static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
> - size_t salen, int proto, u32 version)
> + size_t salen, int proto, struct net *net,
> + u32 version)
> {
> struct rpc_create_args args = {
> - .net = &init_net,
> + .net = net,
> .protocol = proto,
> .address = srvaddr,
> .addrsize = salen,
> @@ -591,7 +592,7 @@ void rpcb_getport_async(struct rpc_task *task)
> task->tk_pid, __func__, bind_version);
>
> rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot,
> - bind_version);
> + xprt->xprt_net, bind_version);
> if (IS_ERR(rpcb_clnt)) {
> status = PTR_ERR(rpcb_clnt);
> dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n",
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2011-04-05 3:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 7:47 [PATCH 2/3] Supply network namespace to rpcbind Rob Landley
2011-04-05 3:01 ` Serge E. Hallyn [this message]
2011-04-06 0:57 ` Kirill A. Shutemov
[not found] ` <20110406005743.GB27844-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2011-04-06 11:48 ` Rob Landley
2011-04-06 11:48 ` Rob Landley
[not found] ` <4D94319F.8040005-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-04-05 3:01 ` Serge E. Hallyn
2011-04-06 0:57 ` Kirill A. Shutemov
-- strict thread matches above, loose matches on Subject: below --
2011-03-31 7:47 Rob Landley
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=20110405030101.GB6764@hallyn.com \
--to=serge@hallyn.com \
--cc=Trond.Myklebust@netapp.com \
--cc=containers@lists.linux-foundation.org \
--cc=kir@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=rlandley@parallels.com \
--cc=tims@uahirise.org \
--cc=xemul@parallels.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.