From: "Kirill A. Shutemov" <kirill@shutemov.name>
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: Wed, 6 Apr 2011 03:57:43 +0300 [thread overview]
Message-ID: <20110406005743.GB27844@shutemov.name> (raw)
In-Reply-To: <4D94319F.8040005@parallels.com>
On Thu, Mar 31, 2011 at 02:47:43AM -0500, Rob Landley wrote:
> 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: Kirill A. Shutemov <kas@openvz.org>
BTW, it seems conflicts with my rpc_pipefs patchset. I'll rebase my
patchset, if your patches will be merged first.
> ---
>
> 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
--
Kirill A. Shutemov
next prev parent reply other threads:[~2011-04-06 0:57 UTC|newest]
Thread overview: 4+ 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
2011-04-06 0:57 ` Kirill A. Shutemov [this message]
2011-04-06 11:48 ` 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=20110406005743.GB27844@shutemov.name \
--to=kirill@shutemov.name \
--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 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).