* [PATCH 2/3] Supply network namespace to rpcbind.
@ 2011-03-31 7:47 Rob Landley
2011-04-05 3:01 ` Serge E. Hallyn
2011-04-06 0:57 ` Kirill A. Shutemov
0 siblings, 2 replies; 4+ messages in thread
From: Rob Landley @ 2011-03-31 7:47 UTC (permalink / raw)
To: linux-kernel, linux-nfs, containers, Trond Myklebust,
Tim Spriggs, Kir Kolyshkin, Pavel Emelyanov
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>
---
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",
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] Supply network namespace to rpcbind.
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
1 sibling, 0 replies; 4+ messages in thread
From: Serge E. Hallyn @ 2011-04-05 3:01 UTC (permalink / raw)
To: Rob Landley
Cc: linux-kernel, linux-nfs, containers, Trond Myklebust,
Tim Spriggs, Kir Kolyshkin, Pavel Emelyanov
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] Supply network namespace to rpcbind.
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
2011-04-06 11:48 ` Rob Landley
1 sibling, 1 reply; 4+ messages in thread
From: Kirill A. Shutemov @ 2011-04-06 0:57 UTC (permalink / raw)
To: Rob Landley
Cc: linux-kernel, linux-nfs, containers, Trond Myklebust,
Tim Spriggs, Kir Kolyshkin, Pavel Emelyanov
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/3] Supply network namespace to rpcbind.
2011-04-06 0:57 ` Kirill A. Shutemov
@ 2011-04-06 11:48 ` Rob Landley
0 siblings, 0 replies; 4+ messages in thread
From: Rob Landley @ 2011-04-06 11:48 UTC (permalink / raw)
To: Kirill A. Shutemov
Cc: linux-kernel, linux-nfs, containers, Trond Myklebust,
Tim Spriggs, Kir Kolyshkin, Pavel Emelyanov
On 04/05/2011 07:57 PM, Kirill A. Shutemov wrote:
> 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.
And vice versa, lemme know which order you want them in.
Thanks,
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-06 11:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-04-06 11:48 ` Rob Landley
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).