recovery: handle delegation.recalled on reclaim

while the server is required to grant us delegations we reclaim through CLAIM_PREVIOUS, it may set the flag recalled=TRUE if it's not ready to grant the delegation.  the client is then responsible for flushing modified state to the server and returning the delegation

new function nfs41_client_delegation_recovery() cleans up after delegation recovery by a) returning any delegations flagged as recalled, and b) 'forgetting' any delegations that we failed to reclaim.  this function is called under the client's state recovery lock, directly after open and delegation state is recovered

added 'try_recovery' argument to delegation_return(), allowing it to be called during client state recovery.  split out the code that removes the delegation from the client and its opens into delegation_remove(), which is what nfs41_client_delegation_recovery() uses to 'forget' a delegation

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-07-20 15:34:04 -04:00 committed by unknown
parent d44470c877
commit 8e310c5711
4 changed files with 108 additions and 36 deletions

View file

@ -354,7 +354,8 @@ int nfs41_recover_client_state(
}
}
/* TODO: return any delegations that were reclaimed as 'recalled' */
/* return any delegations that were reclaimed as 'recalled' */
status = nfs41_client_delegation_recovery(client);
unlock:
LeaveCriticalSection(&state->lock);