Commit graph

17 commits

Author SHA1 Message Date
Casey Bodley
22ff7afc92 session: delay updates to max_slots after a recall/error
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>
2012-06-01 11:35:45 -04:00
Casey Bodley
30e8df149e session: handle NFS4ERR_BADSLOT errors
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>
2012-06-01 11:35:43 -04:00
Casey Bodley
a3146af76d session: use target_highest_slotid to limit slot table
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>
2012-06-01 11:35:42 -04:00
Casey Bodley
1905abd027 session: simplify slot table error handling
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>
2012-06-01 11:35:40 -04:00
Casey Bodley
94fc1d946c session: slot table uses SleepConditionVariableCS
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>
2012-06-01 11:35:38 -04:00
Casey Bodley
bbb1ed696c license changed to LGPL: added COPYING file, changed source file comments
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2012-03-19 12:24:43 -04:00
Olga Kornievskaia
4af8bbf362 [pnfs] allow callbacks to data servers 2012-03-05 18:52:06 -05:00
Olga Kornievskaia
c90811be75 dont use named events or mutexs
in case of multiple sessions (in multiuser environment)
we can't create event with the same name.
2011-09-30 12:41:54 -04:00
Olga Kornievskaia
a4e3d4d121 minor changes to nfs41_session.c 2011-08-25 15:21:11 -04:00
Olga Kornievskaia
04ab888492 [cosmetic] minor license changes
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)
2011-08-12 13:20:12 -04:00
Casey Bodley
2f0393e7d3 callback: clear replay cache on session recovery
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2011-07-18 10:52:39 -04:00
Olga Kornievskaia
cb54018555 asking for persistent session from a server 2011-05-23 16:35:38 -04:00
Casey Bodley
cc2efe6a96 callback: replay cache for back channel
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>
2011-04-12 15:32:47 -04:00
Olga Kornievskaia
47b0ccda9c turning callback off for krb5p
sspi requires strict ordering of messages. we can't have more than 1 outstanding rpc thus, hold the lock over send and receive and turn off callbacks.
2011-02-03 13:13:10 -05:00
Casey Bodley
034b2b4ea2 nfs41_session_renew() error handling
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>
2011-01-10 15:16:18 -05:00
Casey Bodley
757b637607 create_session uses compound_encode_send_decode()
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>
2011-01-10 15:16:17 -05:00
Casey Bodley
0ad4db4fad fresh git tree for public release
we regretfully had to remove our git history for licensing reasons

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
2010-10-12 10:15:48 -04:00