From: Jeff Layton <jlayton@primarydata.com>
To: bfields@fieldses.org
Cc: steved@redhat.com, linux-nfs@vger.kernel.org
Subject: [PATCH v4 3/9] nfsd: reject reclaim request when client has already sent RECLAIM_COMPLETE
Date: Mon, 15 Sep 2014 09:14:04 -0400 [thread overview]
Message-ID: <1410786850-18194-4-git-send-email-jlayton@primarydata.com> (raw)
In-Reply-To: <1410786850-18194-1-git-send-email-jlayton@primarydata.com>
As stated in RFC 5661, section 18.51.3:
Once a RECLAIM_COMPLETE is done, there can be no further reclaim
operations for locks whose scope is defined as having completed
recovery. Once the client sends RECLAIM_COMPLETE, the server will
not allow the client to do subsequent reclaims of locking state for
that scope and, if these are attempted, will return
NFS4ERR_NO_GRACE.
Ensure that we enforce that requirement.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
fs/nfsd/nfs4state.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 119d5eeca2cf..d4de5b61e1e7 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5664,6 +5664,9 @@ nfs4_check_open_reclaim(clientid_t *clid,
if (status)
return nfserr_reclaim_bad;
+ if (test_bit(NFSD4_CLIENT_RECLAIM_COMPLETE, &cstate->clp->cl_flags))
+ return nfserr_no_grace;
+
if (nfsd4_client_record_check(cstate->clp))
return nfserr_reclaim_bad;
--
1.9.3
next prev parent reply other threads:[~2014-09-15 13:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 13:14 [PATCH v4 0/9] nfsd: support for lifting grace period early Jeff Layton
2014-09-15 13:14 ` [PATCH v4 1/9] lockd: move lockd's grace period handling into its own module Jeff Layton
2014-09-15 19:02 ` Jeff Layton
2014-09-17 19:36 ` J. Bruce Fields
2014-09-17 20:15 ` Jeff Layton
2014-09-15 13:14 ` [PATCH v4 2/9] nfsd: remove redundant boot_time parm from grace_done client tracking op Jeff Layton
2014-09-15 13:14 ` Jeff Layton [this message]
2014-09-15 13:14 ` [PATCH v4 4/9] lockd: add a /proc/fs/lockd/nlm_end_grace file Jeff Layton
2014-09-15 13:14 ` [PATCH v4 5/9] nfsd: add a v4_end_grace file to /proc/fs/nfsd Jeff Layton
2014-09-15 13:14 ` [PATCH v4 6/9] nfsd: pass extra info in env vars to upcalls to allow for early grace period end Jeff Layton
2014-09-15 13:14 ` [PATCH v4 7/9] nfsd: serialize nfsdcltrack upcalls for a particular client Jeff Layton
2014-09-15 13:14 ` [PATCH v4 8/9] nfsd: set and test NFSD4_CLIENT_STABLE bit to reduce nfsdcltrack upcalls Jeff Layton
2014-09-15 13:14 ` [PATCH v4 9/9] nfsd: skip subsequent UMH "create" operations after the first one for v4.0 clients Jeff Layton
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=1410786850-18194-4-git-send-email-jlayton@primarydata.com \
--to=jlayton@primarydata.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.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).