From: Jeff Layton <jeff.layton@primarydata.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 3/5] nfsd: add a v4_end_grace file to /proc/fs/nfsd
Date: Fri, 5 Sep 2014 07:40:10 -0400 [thread overview]
Message-ID: <20140905074010.0ebc7f3f@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140904195420.GB14576@fieldses.org>
On Thu, 4 Sep 2014 15:54:20 -0400
"J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Tue, Aug 19, 2014 at 02:38:27PM -0400, Jeff Layton wrote:
> > Allow a privileged userland process to end the v4 grace period early.
> > Any write to the file will cause the v4 grace period to be lifted.
> > The basic idea with this will be to allow the userland client tracking
> > program to lift the grace period once it knows that no more clients
> > will be reclaiming state.
> ...
> > +/**
> > + * write_v4_end_grace - release grace period for nfsd's v4.x lock manager
> > + *
> > + * Input:
> > + * buf: ignored
> > + * size: zero
> > + * OR
> > + *
> > + * Input:
> > + * buf: any value
> > + * size: non-zero length of C string in @buf
> > + * Output:
> > + * passed-in buffer filled with "Y" or "N" with a newline
> > + * and NULL-terminated C string. This indicates whether
> > + * the grace period has ended in the current net
> > + * namespace. Return code is the size in bytes of the
> > + * string. Writing to the file will end the grace period
> > + * for nfsd's v4 lock manager.
> > + */
> > +static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size)
> > +{
> > + struct net *net = file->f_dentry->d_sb->s_fs_info;
> > + struct nfsd_net *nn = net_generic(net, nfsd_net_id);
> > +
> > + if (size > 0)
> > + nfsd4_end_grace(nn);
>
> Ditto for this one.
>
Sure. I'll fix that up in the next iteration.
> Do we really need separate files for nlm and nfsd?
>
> I think the separate nlm and nfsd grace periods may just be a historical
> mistake.
>
statd and nfsdcltrack are separate programs, and both will need to
"sign off" before we can lift the grace period. With the way that grace
period management works today, I don't see a way to do this without
separate files. If you have an idea in mind for how to unify this
interface then I'm happy to entertain it however...
--
Jeff Layton <jlayton@primarydata.com>
next prev parent reply other threads:[~2014-09-05 11:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 18:38 [PATCH v2 0/5] nfsd: support for lifting grace period early Jeff Layton
2014-08-19 18:38 ` [PATCH v2 1/5] lockd: move lockd's grace period handling into its own module Jeff Layton
2014-08-28 20:01 ` J. Bruce Fields
2014-08-28 20:24 ` J. Bruce Fields
2014-08-28 23:53 ` Jeff Layton
2014-09-03 21:54 ` J. Bruce Fields
2014-09-15 22:08 ` J. Bruce Fields
2014-09-15 22:09 ` J. Bruce Fields
2014-09-15 22:10 ` J. Bruce Fields
2014-09-15 23:19 ` Jeff Layton
2014-09-16 0:19 ` J. Bruce Fields
2014-09-15 23:11 ` Jeff Layton
2014-08-19 18:38 ` [PATCH v2 2/5] lockd: add a /proc/fs/lockd/nlm_end_grace file Jeff Layton
2014-09-04 19:52 ` J. Bruce Fields
2014-08-19 18:38 ` [PATCH v2 3/5] nfsd: add a v4_end_grace file to /proc/fs/nfsd Jeff Layton
2014-09-04 19:54 ` J. Bruce Fields
2014-09-05 11:40 ` Jeff Layton [this message]
2014-08-19 18:38 ` [PATCH v2 4/5] nfsd: remove redundant boot_time parm from grace_done client tracking op Jeff Layton
2014-09-04 19:54 ` J. Bruce Fields
2014-08-19 18:38 ` [PATCH v2 5/5] nfsd: pass extra info in env vars to upcalls to allow for early grace period end Jeff Layton
2014-09-04 19:59 ` J. Bruce Fields
2014-09-05 11:43 ` Jeff Layton
2014-09-05 15:58 ` J. Bruce Fields
2014-09-26 18:39 ` [PATCH v2 0/5] nfsd: support for lifting grace period early J. Bruce Fields
2014-09-26 18:54 ` Jeff Layton
2014-09-26 19:46 ` J. Bruce Fields
2014-09-26 20:37 ` Trond Myklebust
2014-09-26 20:45 ` J. Bruce Fields
2014-09-26 20:58 ` Trond Myklebust
2014-09-26 21:47 ` J. Bruce Fields
2014-09-26 22:17 ` Trond Myklebust
2014-09-26 22:35 ` Trond Myklebust
2014-09-27 13:04 ` Jeff Layton
2014-09-29 16:44 ` J. Bruce Fields
2014-09-29 16:53 ` Trond Myklebust
2014-09-29 17:11 ` Jeff Layton
2014-09-29 17:55 ` 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=20140905074010.0ebc7f3f@tlielax.poochiereds.net \
--to=jeff.layton@primarydata.com \
--cc=bfields@fieldses.org \
--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).