All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v9 3/6] nfsd: add a per-net-namespace struct for nfsd
Date: Wed, 07 Mar 2012 12:46:09 +0400	[thread overview]
Message-ID: <4F572051.5060503@parallels.com> (raw)
In-Reply-To: <20120306133124.5dbef60c@tlielax.poochiereds.net>

06.03.2012 22:31, Jeff Layton пишет:
> On Tue, 06 Mar 2012 21:43:41 +0400
> Stanislav Kinsbursky<skinsbursky@parallels.com>  wrote:
>
>> 06.03.2012 19:28, Jeff Layton пишет:
>>> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
>>> index 64c24af..141197e 100644
>>> --- a/fs/nfsd/nfsctl.c
>>> +++ b/fs/nfsd/nfsctl.c
>>> @@ -19,6 +19,7 @@
>>>    #include "nfsd.h"
>>>    #include "cache.h"
>>>    #include "fault_inject.h"
>>> +#include "netns.h"
>>>
>>>    /*
>>>     *	We have a single directory with several nodes in it.
>>> @@ -1124,14 +1125,23 @@ static int create_proc_exports_entry(void)
>>>    }
>>>    #endif
>>>
>>> +int nfsd_net_id;
>>> +static struct pernet_operations nfsd_net_ops = {
>>> +	.id   =&nfsd_net_id,
>>> +	.size = sizeof(struct nfsd_net),
>>> +};
>>> +
>>>    static int __init init_nfsd(void)
>>>    {
>>>    	int retval;
>>>    	printk(KERN_INFO "Installing knfsd (copyright (C) 1996 okir@monad.swb.de).\n");
>>>
>>> +	retval = register_pernet_subsys(&nfsd_net_ops);
>>
>> Hi, Jeff.
>> You've created per-net structure and operations and that's cool.
>> But why don't you move nfsd client tracking control into per-net operations?
>> I.e. add init-exit callbacks in struct pernet_operations and call
>> nfsd4_client_tracking_init() and nfsd4_client_tracking_exit() respectively in there?
>> And since we don't support any other networks namesapce except init_net, then
>> just skip all others in these callbacks.
>>
>
> Well...the way I had envisioned it is that you'd create a new net
> namespace container and would then start up nfsd within that container.
>
> Just because we're spawning a new namespace doesn't mean that we'll
> necessarily want to serve nfs from it, right? If we do it this way,
> then we don't end up allocating resources for containers that aren't
> going to use it.
>
> ...or do I not understand the "vision" of how all of this is going to
> eventually work?
>

You, probably, right.
If this data is allocated and initialized on NFSd start, then per-net operations 
has nothing with it.



-- 
Best regards,
Stanislav Kinsbursky

  parent reply	other threads:[~2012-03-07  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 15:28 [PATCH v9 0/6] nfsd: overhaul the client name tracking code Jeff Layton
2012-03-06 15:28 ` [PATCH v9 1/6] nfsd: add nfsd4_client_tracking_ops struct and a way to set it Jeff Layton
2012-03-06 15:28 ` [PATCH v9 2/6] sunrpc: create nfsd dir in rpc_pipefs Jeff Layton
2012-03-06 15:28 ` [PATCH v9 3/6] nfsd: add a per-net-namespace struct for nfsd Jeff Layton
2012-03-06 17:43   ` Stanislav Kinsbursky
2012-03-06 18:31     ` Jeff Layton
2012-03-06 20:48       ` Jeff Layton
2012-03-07  8:46       ` Stanislav Kinsbursky [this message]
2012-03-11  7:44   ` Stanislav Kinsbursky
2012-03-06 15:28 ` [PATCH v9 4/6] nfsd: add a header describing upcall to nfsdcld Jeff Layton
2012-03-06 15:28 ` [PATCH v9 5/6] nfsd: add the infrastructure to handle the cld upcall Jeff Layton
2012-03-06 15:28 ` [PATCH v9 6/6] nfsd: add notifier to handle mount/unmount of rpc_pipefs sb Jeff Layton
2012-03-11  7:45   ` 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=4F572051.5060503@parallels.com \
    --to=skinsbursky@parallels.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@redhat.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 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.