recovery updated handling of BADSESSION

moved recovery-related fields into struct nfs41_client.recovery.  now uses a com
bination of CRITICAL_SECTION and CONDITION_VARIABLE for use with SleepConditionV
ariableCS()

renamed check_renew_in_progress() to recovery_start_or_wait(), and fixed the loc
king so that we atomically check/set in_recovery

when recovery is finished (including error conditions), call recovery_finish() t
o reset the recovery status and wake any waiting threads

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Olga Kornievskaia 2010-12-06 14:28:13 -05:00
parent 8616b03597
commit 80cb5b5f57
3 changed files with 55 additions and 66 deletions

View file

@ -131,9 +131,13 @@ typedef struct __nfs41_client {
struct pnfs_file_layout_list *layouts;
struct pnfs_file_device_list *devices;
struct list_entry root_entry; /* position in nfs41_root.clients */
HANDLE cond;
struct __nfs41_root *root;
bool_t in_recovery;
struct {
CONDITION_VARIABLE cond;
CRITICAL_SECTION lock;
bool_t in_recovery;
} recovery;
/* for state recovery on server reboot */
struct client_state state;