linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Jeff Layton <jlayton@redhat.com>,
	Stanislav Kinsbursky <skinsbursky@parallels.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"neilb@suse.de" <neilb@suse.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation
Date: Sat, 10 Sep 2011 00:58:10 +0400	[thread overview]
Message-ID: <4E6A7DE2.7000808@parallels.com> (raw)
In-Reply-To: <1315596308.17611.46.camel@lade.trondhjem.org>

> Isn't the problem that Stanislav is trying to solve that we need to be
> able to register and unregister RPC services to the correct rpcbind
> server, depending on which net namespace we are in?
> 
> My understanding is that the current code will register everything to
> whatever rpcbind server is running in the init net namespace because
> that's what rpcb_create_local() uses.
> 
> My suggestion is to use a struct pernet_operations to detect when a net
> namespace is being created or destroyed, so that the rpcbind client code
> knows when to create or destroy a connection to the server that is
> running in that namespace.

The problem is that the client has a reference on transport, the transport gets
a socket and the socket holds the net namesace and thus we will not receive the
net->exit event with this approach.

Another option is to break the client's socket reference and kill the rpcb client
on netns stop (i.e. as you propose), but in that case we have another problem - 
how to destroy _other_ clients (not rpc bind ones) when the net namespace stops.

If you prefer either way just let us know, we'll fix the patches.

> Cheers
>   Trond


  reply	other threads:[~2011-09-09 20:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 12:08 [PATCH v2 0/5] SUNRPC: make rpcbind clients allocated and destroyed dynamically Stanislav Kinsbursky
2011-09-09 12:08 ` [PATCH v2 1/5] SUNRPC: introduce helpers for reference counted rpcbind clients Stanislav Kinsbursky
2011-09-09 12:08 ` [PATCH v2 2/5] SUNRPC: use rpcbind reference counting helpers Stanislav Kinsbursky
2011-09-09 12:08 ` [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation Stanislav Kinsbursky
2011-09-09 14:07   ` Jeff Layton
2011-09-09 16:41     ` Stanislav Kinsbursky
2011-09-09 18:44       ` Trond Myklebust
2011-09-09 19:01         ` Jeff Layton
2011-09-09 19:25           ` Trond Myklebust
2011-09-09 20:58             ` Pavel Emelyanov [this message]
2011-09-12 11:22             ` Stanislav Kinsbursky
2011-09-13 11:09               ` Stanislav Kinsbursky
2011-09-13 12:51             ` Jeff Layton
2011-09-13 13:39               ` Stanislav Kinsbursky
2011-09-13 13:52                 ` Jeff Layton
2011-09-09 12:08 ` [PATCH v2 4/5] SUNRPC: remove rpcbind clients creation during service registering Stanislav Kinsbursky
2011-09-09 12:09 ` [PATCH v2 5/5] SUNRPC: remove rpcbind clients destruction on module cleanup Stanislav Kinsbursky

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=4E6A7DE2.7000808@parallels.com \
    --to=xemul@parallels.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=skinsbursky@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).