On Fri, 2016-09-16 at 00:38 -0400, Oleg Drokin wrote: > On Sep 15, 2016, at 12:45 PM, Trond Myklebust wrote: > > > > > According to RFC5661, if any of the SEQUENCE status bits > > SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED, > > SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED, > > SEQ4_STATUS_ADMIN_STATE_REVOKED, > > or SEQ4_STATUS_RECALLABLE_STATE_REVOKED are set, then we need to > > use > > TEST_STATEID to figure out which stateids have been revoked, so we > > can acknowledge the loss of state using FREE_STATEID. > > > > While we already do this for open and lock state, we have not been > > doing > > so for all the delegations. > > > > v2: nfs_v4_2_minor_ops needs to set .test_and_free_expired too > > v3: Now with added lock revoke fixes and close/delegreturn/locku > > fixes > > v4: Close a bunch of corner cases > > This one seems to be looping on the client in a way very similar > to the first failure in that it's the serverip-named process that's > using the cpu, but the debug log is very similar to the second > failure > in test stateid, except this time it's not "success 0", but "success > -10025": > Ah... I think I see what the issue is... Does the following help? Cheers Trond 8<--------------------------------------------------------------- >From d9887345dbeffcc7b8bde17b06df8f0767f21abf Mon Sep 17 00:00:00 2001 From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Date: Fri, 16 Sep 2016 11:17:04 -0400 Subject: [PATCH v5 14/22] NFSv4: Ensure we don't re-test revoked and freed stateids This fixes a potential infinite loop in nfs_reap_expired_delegations. Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> --- fs/nfs/delegation.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index f431fde13e90..34aa5dfbe99e 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -647,6 +647,7 @@ static void nfs_mark_delegation_revoked(struct nfs_server *server, struct nfs_delegation *delegation) { set_bit(NFS_DELEGATION_REVOKED, &delegation->flags); + delegation->stateid.type = NFS4_INVALID_STATEID_TYPE; nfs_mark_return_delegation(server, delegation); } @@ -885,6 +886,8 @@ static inline bool nfs4_server_rebooted(const struct nfs_client *clp) static void nfs_mark_test_expired_delegation(struct nfs_server *server, struct nfs_delegation *delegation) { + if (delegation->stateid.type == NFS4_INVALID_STATEID_TYPE) + return; clear_bit(NFS_DELEGATION_NEED_RECLAIM, &delegation->flags); set_bit(NFS_DELEGATION_TEST_EXPIRED, &delegation->flags); set_bit(NFS4CLNT_DELEGATION_EXPIRED, &server->nfs_client->cl_state); -- 2.7.4��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥