All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Mi Jinlong <mijinlong@cn.fujitsu.com>
Cc: "Trond.Myklebust" <trond.myklebust@fys.uio.no>,
	Chuck Lever <chuck.lever@oracle.com>,
	NFSv3 list <linux-nfs@vger.kernel.org>
Subject: Re: [RFC] Should lockd get into grace_period when statd start but not stop?
Date: Wed, 10 Mar 2010 13:24:01 -0500	[thread overview]
Message-ID: <20100310182401.GA23340@fieldses.org> (raw)
In-Reply-To: <4B9772EB.9010909@cn.fujitsu.com>

On Wed, Mar 10, 2010 at 06:22:35PM +0800, Mi Jinlong wrote:
> Hi,
> 
>    When using command "service nfslock stop" and "service nfsklock start"
> to restart the nfslock service at RHEL with kernel 2.6.31, if start the service
> after stop it more than the grace_period time, lock which lockd get before
> cann't be reclaimed for the grace_period is timeout.
> 
> So, IMO, the lockd should get into grace_period when statd start not stop?

Sorry, I'm not sure I understand.

Are you saying that lockd's grace period starts when the last lock is
shut down, instead of when the new lockd is started?  That would be a
bug, I agree.

But are you really shutting down lockd completely?

--b.

> 
> Some code at kernel: fs/lockd/svclock.c
>  ....
>  411         if (locks_in_grace() && !reclaim) {
>  412                 ret = nlm_lck_denied_grace_period;
>  413                 goto out;
>  414         }
>  415         if (reclaim && !locks_in_grace()) {
>  416                 ret = nlm_lck_denied_grace_period;
>  417                 goto out;
>  418         }
>  ....
> 
> I think it can implement it like that:
>   1) When statd stop, it send a KILL signal to lockd,
>      and lockd only release the lock, but don't get into grace_period.
>   2) When statd start, it send one some other signal to lockd,
>      and lockd only get into grace_period. The lock will be reclaimed.
> 
> thanks,
> Mi Jinlong
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-03-10 18:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 10:22 [RFC] Should lockd get into grace_period when statd start but not stop? Mi Jinlong
2010-03-10 18:24 ` J. Bruce Fields [this message]
2010-03-11  1:02   ` Mi Jinlong
2010-03-11 15:58     ` J. Bruce Fields
2010-03-12  9:42       ` Mi Jinlong
2010-03-12 23:08         ` J. Bruce Fields
2010-03-16 10:05           ` Mi Jinlong
2010-03-16 16:56             ` J. Bruce Fields

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=20100310182401.GA23340@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=mijinlong@cn.fujitsu.com \
    --cc=trond.myklebust@fys.uio.no \
    /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.