linux-nfs.vger.kernel.org archive mirror
 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 v8 5/6] nfsd: add the infrastructure to handle the cld upcall
Date: Mon, 05 Mar 2012 16:51:03 +0400	[thread overview]
Message-ID: <4F54B6B7.1010703@parallels.com> (raw)
In-Reply-To: <20120305074256.6dc36fed@tlielax.poochiereds.net>

05.03.2012 16:42, Jeff Layton пишет:
>>
>>
>> Would be great to replace hard-coded cld_pipe here with a passed one.
>> For example, put this cld_pipe on cld_msg structure.
>> And initialize this pointer (hard-coded value for now) below in
>> nfsd4_cld_create() and all other places where alloc_cld_upcall() is called.
>>
>> BTW, maybe allocate this struct cld_upcall per NFS client somehow? And thus get
>> rid of alloc-free calls?
>>
>>
>
> Ok, I think I must have misunderstood what you meant when you said no
> per-net ops required. I'll respin and see if I can get closer to what
> you intended.
>
> Since most of the upcalls are infrequent and come from nfsd threads,
> the number of calls in flight will always be less than the order of the
> number of nfsd threads. That value may be much less than the number of
> nfs4_clients, so we're probably best off allocating these dynamically.
>


Sure, it's up to you. Only wanna note, that this dynamic allocation in several 
places looks a little bit confusing to me.


> Now that I've had some time to look, I think what you're probably going
> to want to do eventually is to add a new per-namespace object for nfsd,
> similar to struct nfs_net for the nfs client. This container will hold
> the pointer to the upcall pipe as well as other objects.
>

Exactly.

> The nfs4_client objects for nfsd will then need to be per-namespace,
> and will have a pointer back to "struct nfsd_net" or whatever you end up
> calling it. From that they'll be able to get the rpc_pipe pointer.
>

You most probably right (I'm not working on NFSd yet - so hard to be sure).

> For now, I'll just hardcode init_net in the appropriate places under the
> assumption that eventually you'll be able to get a rpc_pipe pointer
> given a pointer to an nfs4_client struct.
>

Yes, thank you, Jeff.

-- 
Best regards,
Stanislav Kinsbursky

  reply	other threads:[~2012-03-05 12:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 20:42 [PATCH v8 0/6] nfsd: overhaul the client name tracking code Jeff Layton
2012-03-02 20:42 ` [PATCH v8 1/6] nfsd: add nfsd4_client_tracking_ops struct and a way to set it Jeff Layton
2012-03-05  8:34   ` Stanislav Kinsbursky
2012-03-02 20:42 ` [PATCH v8 2/6] sunrpc: create nfsd dir in rpc_pipefs Jeff Layton
2012-03-02 20:42 ` [PATCH v8 3/6] nfsd: convert nfs4_client->cl_cb_flags to a generic flags field Jeff Layton
2012-03-02 20:42 ` [PATCH v8 4/6] nfsd: add a header describing upcall to nfsdcld Jeff Layton
2012-03-02 20:42 ` [PATCH v8 5/6] nfsd: add the infrastructure to handle the cld upcall Jeff Layton
2012-03-05  8:48   ` Stanislav Kinsbursky
2012-03-05 12:42     ` Jeff Layton
2012-03-05 12:51       ` Stanislav Kinsbursky [this message]
2012-03-05 14:39         ` Jeff Layton
2012-03-05 14:53           ` Stanislav Kinsbursky
2012-03-05 15:16             ` Jeff Layton
2012-03-05 15:48               ` Stanislav Kinsbursky
2012-03-02 20:42 ` [PATCH v8 6/6] nfsd: add notifier to handle mount/unmount of rpc_pipefs sb Jeff Layton

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=4F54B6B7.1010703@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 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).