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

@ -92,4 +92,10 @@ int nfs41_delegation_recall(
IN const stateid4 *stateid,
IN bool_t truncate);
/* after client state recovery, return any 'recalled' delegations;
* must be called under the client's state lock */
int nfs41_client_delegation_recovery(
IN nfs41_client *client);
#endif /* DELEGATION_H */