linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	linux-nfs@vger.kernel.org
Cc: Anna Schumaker <Anna.Schumaker@netapp.com>,
	Kinglong Mee <kinglongmee@gmail.com>
Subject: Re: [PATCH v2 1/2] NFSv4.x/callback: Create the callback service through svc_create_pooled
Date: Fri, 3 Mar 2017 21:34:50 +0800	[thread overview]
Message-ID: <db71aa4b-5c9f-0280-9e9c-336b28cdf803@gmail.com> (raw)
In-Reply-To: <322d5c7d-d3b4-1e02-de3f-8e1a900cb150@gmail.com>

Ping...

The state? 

thanks,
Kinglong Mee

On 1/19/2017 16:36, Kinglong Mee wrote:
> As the comments for svc_set_num_threads() said, 
> " Destroying threads relies on the service threads filling in
> rqstp->rq_task, which only the nfs ones do.  Assumes the serv
> has been created using svc_create_pooled()."
> 
> If creating service through svc_create(), the svc_pool_map_put()
> will be called in svc_destroy(), but the pool map isn't used.
> So that, the reference of pool map will be drop, the next using
> of pool map will get a zero npools. 
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfs/callback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
> index 484bebc..0a21150 100644
> --- a/fs/nfs/callback.c
> +++ b/fs/nfs/callback.c
> @@ -279,7 +279,7 @@ static struct svc_serv *nfs_callback_create_svc(int minorversion)
>  		printk(KERN_WARNING "nfs_callback_create_svc: no kthread, %d users??\n",
>  			cb_info->users);
>  
> -	serv = svc_create(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, sv_ops);
> +	serv = svc_create_pooled(&nfs4_callback_program, NFS4_CALLBACK_BUFSIZE, sv_ops);
>  	if (!serv) {
>  		printk(KERN_ERR "nfs_callback_create_svc: create service failed\n");
>  		return ERR_PTR(-ENOMEM);
> 

  reply	other threads:[~2017-03-03 16:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19  8:36 [PATCH v2 1/2] NFSv4.x/callback: Create the callback service through svc_create_pooled Kinglong Mee
2017-03-03 13:34 ` Kinglong Mee [this message]
2017-04-24 12:18 ` Benjamin Coddington

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=db71aa4b-5c9f-0280-9e9c-336b28cdf803@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=Anna.Schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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).