linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested
@ 2012-03-06 14:54 andros
  0 siblings, 0 replies; 6+ messages in thread
From: andros @ 2012-03-06 14:54 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs, Andy Adamson, stable

From: Andy Adamson <andros@netapp.com>

nfs41_open_expired() will test the delegation stateid based on
NFS_DELEGATED_STATE being set. If the stateid is bad, nfs4_open_recover
will clear the NFS_DELEGATED_STATE bit recovering the delegation.

Signed-off-by: Andy Adamson <andros@netapp.com>
Cc: stable@vger.kernel.org
---
 fs/nfs/nfs4state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 7bd9822..5c92185 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1097,7 +1097,7 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
 {
 	struct nfs_client *clp = server->nfs_client;
 
-	if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags))
+	if (test_bit(NFS_DELEGATED_STATE, &state->flags))
 		nfs_async_inode_return_delegation(state->inode, &state->stateid);
 	nfs4_state_mark_reclaim_nograce(clp, state);
 	nfs4_schedule_state_manager(clp);
-- 
1.7.6.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 0/3] NFS recover from delegation stateid error
@ 2012-03-06 14:46 andros
  2012-03-06 14:46 ` [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested andros
  0 siblings, 1 reply; 6+ messages in thread
From: andros @ 2012-03-06 14:46 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

These patches fix recovery from NFS4ERR_BAD_STATEID, NFS4ERR_ADMIN_REVOKED, and
NFS4ERR_DELEG_REVOKED errors by removing the delegation record, testing the
delegation stateid, and recovering via an OPEN with CLAIM_NULL.

Tested with a pynfs test that removes the pynfs server delegation stateid 
and return NFS4ERR_BAD_STATEID upon a READ.

Andy Adamson (1):
  NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested

Trond Myklebust (2):
  NFSv4.1: Fix the checking of the stateid when returning a delegation
  NFS: Properly handle the case where the delegation is revoked

 fs/nfs/callback_proc.c |    6 +++---
 fs/nfs/delegation.c    |   13 ++++++++++++-
 fs/nfs/delegation.h    |    1 +
 fs/nfs/nfs4_fs.h       |    2 ++
 fs/nfs/nfs4proc.c      |   16 ++++++++++++++--
 fs/nfs/nfs4state.c     |   31 ++++++++++++++++++++++++++++++-
 6 files changed, 62 insertions(+), 7 deletions(-)

-- 
1.7.6.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-06 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 14:54 [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested andros
  -- strict thread matches above, loose matches on Subject: below --
2012-03-06 14:46 [PATCH 0/3] NFS recover from delegation stateid error andros
2012-03-06 14:46 ` [PATCH 3/3] NFSv4.1 do not clear NFS_DELEAGED_STATE until stateid is tested andros
2012-03-06 14:53   ` Myklebust, Trond
2012-03-06 14:55     ` Andy Adamson
2012-03-06 15:12     ` Andy Adamson
2012-03-06 15:17       ` Myklebust, Trond

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).