From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jeff.layton@primarydata.com>
Cc: Jeff Layton <jlayton@primarydata.com>, linux-nfs@vger.kernel.org
Subject: Re: grace-period ending & NLM
Date: Fri, 7 Aug 2015 11:19:36 -0400 [thread overview]
Message-ID: <20150807151936.GC15313@fieldses.org> (raw)
In-Reply-To: <20150807071058.689d83e9@tlielax.poochiereds.net>
On Fri, Aug 07, 2015 at 07:10:58AM -0400, Jeff Layton wrote:
> On Thu, 6 Aug 2015 21:02:34 -0400
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> > On Thu, Aug 06, 2015 at 06:24:42PM -0400, Jeff Layton wrote:
> > > On Thu, 6 Aug 2015 16:23:36 -0400
> > > bfields@fieldses.org (J. Bruce Fields) wrote:
> > >
> > > > We have two grace periods, one for NLM and one for NFSv4+, and don't
> > > > permit normal locking until both are over.
> > > >
> > > > As far as I can tell nfsdcltrack doesn't understand statd/NSM state; it
> > > > only concerns itself with NFSv4+. It can end the NFSv4 grace period
> > > > early, but that still leaves the server returning GRACE errors until NSM
> > > > exits its grace period.
> > > >
> > > > The server has never had any smarts to end the NSM grace period early,
> > > > even though there are common cases (e.g., no clients at all) where it
> > > > easily could. We could fix that.
> > > >
> > >
> > > Erm...but it does have those smarts. statd should end the grace period
> > > early if there were no clients to be notified when it starts. That's
> > > done by writing to /proc/fs/lockd/nlm_end_grace. Those patches were
> > > merged upstream in the kernel and nfs-utils around the same time as the
> > > other early grace lifting patches.
> >
> > Yeah, I don't know how I forgot that. Thanks for the reminder. That
> > doesn't seem to be working for me on Fedora 21. I'll take another look.
> >
> > (I may still apply ths patch if you don't see a problem with it.)
> >
> > --b.
> >
>
> No objection. I think it looks reasonable.
>
> I'd also be interested to know why the NLM grace period isn't being
> lifted early for you. That did work when I tested it last.
>
> Oh, and I misstated earlier...it's not statd that lifts the grace
> period early, it's sm-notify. sm-notify is in charge of notifying hosts
> after a reboot and if it has none to notify it'll write "Y" to that file
> (if it exists).
Yes, sorry, and I just wasn't running the test right: sm-notify only
gets run on a real reboot. (nfs-server.service does start it, but it
exits immediately if it sees the pid file it wrote before). Adding
SMNOTIFYARGS='-f' to /etc/sysconfig/nfs makes this work as expected.
(In my defense, that's kind of weird behavior: but as I understand it
statd lumps together all clients and servers on the same machine, so a
a notify would cause us to lose locks on any nfs mounts? In which case
maybe this is the only safe thing to do.)
--b.
next prev parent reply other threads:[~2015-08-07 15:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 20:23 grace-period ending & NLM J. Bruce Fields
2015-08-06 22:24 ` Jeff Layton
2015-08-07 1:02 ` J. Bruce Fields
2015-08-07 11:10 ` Jeff Layton
2015-08-07 15:19 ` J. Bruce Fields [this message]
2015-08-06 23:48 ` Frank Filz
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=20150807151936.GC15313@fieldses.org \
--to=bfields@fieldses.org \
--cc=jeff.layton@primarydata.com \
--cc=jlayton@primarydata.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