recovery: avoid recursive state recovery

avoid the recursive case where state recovery operations (OPEN for reclaim and RECLAIM_COMPLETE) return BADSESSION, which kicks off another round of recovery

added a 'bool_t try_recovery' argument to compound_encode_send_decode() in place of its unused 'bufsize_in' and 'bufsize_out'.  when try_recovery=FALSE, return BADSESSION/STALE_CLIENTID errors instead of attempting recovery.  nfs41_open_reclaim(), nfs41_reclaim_complete(), and nfs41_destroy_session() now pass try_recovery=FALSE

during state recovery, we can now check the return values of nfs41_open_reclaim() and nfs41_reclaim_complete() for BADSESSION, and use a goto to restart session recovery

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-11-18 11:23:49 -05:00 committed by unknown
parent 80cb5b5f57
commit 7c8f58b992
5 changed files with 45 additions and 47 deletions

View file

@ -1099,7 +1099,7 @@ static int rpc_array_putfh(
putfh_args[i].in_recovery = 1;
}
status = compound_encode_send_decode(session, &compound, 0, 0);
status = compound_encode_send_decode(session, &compound, TRUE);
if (status) goto out;
status = sequence_res.sr_status;