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>
This commit is contained in:
Casey Bodley 2011-01-07 11:50:35 -05:00
parent f2095915aa
commit 757b637607
4 changed files with 30 additions and 56 deletions

View file

@ -284,7 +284,7 @@ int nfs41_session_create(
session->flags |= CREATE_SESSION4_FLAG_CONN_BACK_CHAN;
ReleaseSRWLockShared(&client->exid_lock);
status = nfs41_create_session(client, session);
status = nfs41_create_session(client, session, TRUE);
if (status) {
eprintf("nfs41_create_session failed %d\n", status);
status = ERROR_BAD_NET_RESP;
@ -316,7 +316,7 @@ int nfs41_session_renew(
eprintf("init_slot_table failed %d\n", status);
goto out_err_session;
}
status = nfs41_create_session(session->client, session);
status = nfs41_create_session(session->client, session, FALSE);
if (status && status != NFS4ERR_STALE_CLIENTID) {
eprintf("nfs41_create_session failed %d\n", status);
status = ERROR_BAD_NET_RESP;