because there could be lots of rpcs in flight when we get a CB_RECALL_SLOT or NFS4ERR_BADSLOT error, we're likely to get some replies with an old value for target_highest_slotid. added a MAX_SLOTS_DELAY of 2 seconds to ignore changes to target_highest_slotid after CB_RECALL_SLOT or NFS4ERR_BADSLOT to prevent max_slots from jumping around between the old and new values
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
NFS4ERR_BADSLOT indicates that the supplied slotid is outside the server's expected range. update table.max_slots to this value to prevent it from being used again, then acquire a new slot and retry the rpc
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
adds support for CB_RECALL_SLOT with function nfs41_session_recall_slot()
when SEQUENCE or CB_RECALL_SLOT gives us a valid target_highest_slotid, use it to update max_slots
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
due to the slot table's use of CRITICAL_SECTION and CONDITION_VARIABLE, the slot table no longer returns errors for following functions:
nfs41_session_bump_seq()
nfs41_session_free_slot()
nfs41_session_get_slot()
nfs41_session_sequence()
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
changed nfs41_slot_table.lock and .cond to a CRITICAL_SECTION and CONDITION_VARIABLE for use with SleepConditionVariableCS()
added a 'num_used' field to simplify the condition variable's predicate function slot_table_avail()
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
added 2011 year to the copyright line
added authors info to the license
added UofM license to libtirpc files that we modified
(but i probably missed some)
nfs41_cb_session stores the last cb_compound reply (whether or not cachethis was set) to handle retry attempts, along with the cb_compound arguments for improved NFS4ERR_SEQ_FALSE_RETRY detection
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
on failure to renew a session, we don't need to free the session (this leads to crashes). if we simply return the error to compound_encode_send_decode(), we'll fail any subsequent operations on the session, but still be able to unmount and remain stable
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
send CREATE_SESSION with compound_encode_send_decode() instead of nfs41_send_compound() for its NFS4ERR_DELAY and NFS4ERR_STALE_CLIENTID handling
added 'try_recovery' argument to nfs41_create_session(), which is passed on to compound_encode_send_decode(). nfs41_session_renew() uses try_recovery=FALSE, because it handles the NFS4ERR_STALE_CLIENTID error on its own. nfs41_session_create() uses try_recovery=TRUE to make use of the NFS4ERR_STALE_CLIENTID error handling. modified the NFS4ERR_STALE_CLIENTID block to call nfs41_client_renew() and retry the operation (i.e. CREATE_SESSION), instead of falling through to session recovery
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>