recovery: reclaim opens on client renewal

after the client and session have been recovered, loop through the client's list of open state, calling nfs41_open_reclaim() and updating the stateid on success

nfs41_open_state saves the share_access and share_deny fields from the initial open, for use with nfs41_open_reclaim()

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-11-16 11:44:34 -05:00 committed by unknown
parent 7240c69b5d
commit d59d17c3b4
3 changed files with 38 additions and 5 deletions

View file

@ -395,9 +395,10 @@ static int handle_open(nfs41_upcall *upcall)
args->mode = info.mode;
args->changeattr = info.change;
} else {
uint32_t allow = 0, deny = 0, create = 0;
uint32_t create = 0;
map_access_2_allowdeny(args->access_mask, args->access_mode, &allow, &deny);
map_access_2_allowdeny(args->access_mask, args->access_mode,
&state->share_access, &state->share_deny);
status = map_disposition_2_nfsopen(args->disposition, status, &create, &upcall->last_error);
if (status)
goto out_free_state;
@ -414,8 +415,8 @@ static int handle_open(nfs41_upcall *upcall)
args->std_info.Directory = 1;
args->created = status == NFS4_OK ? TRUE : FALSE;
} else {
status = nfs41_open(state->session, allow, deny, create,
args->mode, state, &info);
status = nfs41_open(state->session, state->share_access,
state->share_deny, create, args->mode, state, &info);
if (status == NFS4_OK) {
/* add to the client's list of state for recovery */