From: "J. Bruce Fields" <bfields@fieldses.org>
To: Neil Brown <neilb@suse.de>
Cc: Steve Dickson <SteveD@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/4] nfsd: set nlm grace time to make NFSv4 grace time
Date: Thu, 20 Feb 2014 11:40:21 -0500 [thread overview]
Message-ID: <20140220164021.GC15803@fieldses.org> (raw)
In-Reply-To: <20140220063648.6548.44668.stgit@notabene.brown>
On Thu, Feb 20, 2014 at 05:36:48PM +1100, Neil Brown wrote:
> These two values are conceptually very similar, so it probably makes
> sense to set them to the same value at the same time.
Agreed. It was a mistake to add nfsv4gracetime in the first place, but
I guess we can't get rid of it now.
--b.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> utils/nfsd/nfsd.man | 3 ++-
> utils/nfsd/nfssvc.c | 8 ++++++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/utils/nfsd/nfsd.man b/utils/nfsd/nfsd.man
> index 58b53cbff009..c6d3ffbd3675 100644
> --- a/utils/nfsd/nfsd.man
> +++ b/utils/nfsd/nfsd.man
> @@ -89,7 +89,8 @@ clients need to confirm their state with the server. Valid range is
> from 10 to 3600 seconds.
> .TP
> .B \-G " or " \-\-grace-time seconds
> -Set the grace-time used for NFSv4. New file open requests will not be
> +Set the grace-time used for NFSv4 and NLM (for NFSv2 and NFSv3).
> +New file open requests (NFSv4) and new file locks (NLM) will not be
> allowed until after this time has passed to allow clients to recover state.
> .TP
> .I nproc
> diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
> index 337ab169c194..5e14cce58053 100644
> --- a/utils/nfsd/nfssvc.c
> +++ b/utils/nfsd/nfssvc.c
> @@ -317,6 +317,14 @@ nfssvc_set_time(const char *type, const int seconds)
> xlog(L_ERROR, "Unable to set nfsv4%stime: %m", type);
> close(fd);
> }
> + if (strcmp(type, "grace") == 0) {
> + /* set same value for lockd */
> + fd = open("/proc/sys/fs/nfs/nlm_grace_period", O_WRONLY);
> + if (fd >= 0) {
> + write(fd, nbuf, strlen(nbuf));
> + close(fd);
> + }
> + }
> }
>
> void
>
>
> --
> 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
next prev parent reply other threads:[~2014-02-20 16:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 6:36 [nfs-utils RPC-PATCH 0/4] Add options to nfsd etc to avoid needing to write to /proc Neil Brown
2014-02-20 6:36 ` [PATCH 3/4] nfsd: set nlm grace time to make NFSv4 grace time Neil Brown
2014-02-20 16:40 ` J. Bruce Fields [this message]
2014-02-20 6:36 ` [PATCH 4/4] statd: add options to set port number of lockd Neil Brown
2014-02-20 6:36 ` [PATCH 2/4] nfsd: alloc nfsv4leasetime and nfsv4gracetime to be set Neil Brown
2014-02-20 6:36 ` [PATCH 1/4] nfsd: add -r and --rdma options to request rdma service Neil Brown
2014-03-08 15:20 ` Steve Dickson
2014-03-10 0:10 ` NeilBrown
2014-02-20 13:11 ` [nfs-utils RPC-PATCH 0/4] Add options to nfsd etc to avoid needing to write to /proc Trond Myklebust
2014-02-20 14:32 ` Chuck Lever
2014-02-25 1:37 ` NeilBrown
2014-02-25 1:44 ` Trond Myklebust
2014-02-25 1:47 ` Trond Myklebust
2014-03-08 16:56 ` Steve Dickson
2014-03-10 0:47 ` NeilBrown
2014-03-10 16:58 ` Steve Dickson
2014-03-12 5:43 ` NeilBrown
2014-03-11 16:05 ` Steve Dickson
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=20140220164021.GC15803@fieldses.org \
--to=bfields@fieldses.org \
--cc=SteveD@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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.