recovery: handle state revocation flags in SEQUENCE response
if any of (SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED | SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED | SEQ4_STATUS_ADMIN_STATE_REVOKED) are set in the session flags returned by SEQUENCE: * enter client recovery mode * determine which state was lost with TEST_STATEID (consider all delegations, opens, locks, and layouts) * send FREE_STATEID for each stateid revoked * recall all layouts and forget devices (required by 12.7.2: Dealing with Lease Expiration on the Client) * call recover_delegation(), recover_open() or recover_locks() to reclaim each lock Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
ed2ec18d2d
commit
78a0bb0ac5
3 changed files with 195 additions and 17 deletions
|
|
@ -190,6 +190,20 @@ retry:
|
|||
status = nfs41_session_bump_seq(session, args->sa_slotid);
|
||||
if (status)
|
||||
goto out_free_slot;
|
||||
|
||||
if (try_recovery) {
|
||||
/* check status flags for state revocation */
|
||||
uint32_t revoked = seq->sr_resok4.sr_status_flags &
|
||||
(SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED
|
||||
| SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED
|
||||
| SEQ4_STATUS_ADMIN_STATE_REVOKED);
|
||||
|
||||
if (revoked && nfs41_recovery_start_or_wait(session->client)) {
|
||||
/* free stateids and attempt to recover them */
|
||||
nfs41_client_state_revoked(session, session->client, revoked);
|
||||
nfs41_recovery_finish(session->client);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue