recovery: recover from delegation stateid errors
delegation stateid arguments to DELEGRETURN and OPEN are now stateid_arg, for use with recover_stateid_delegation(). added a nfs41_delegation_state pointer to stateid_arg, for when a delegation stateid is used in the absence of nfs41_open_state (DELEGRETURN, SETATTR) recovery during a call to nfs41_delegation_to_open() requires special attention; recover_stateid_delegation() has to handle the case where recover_open() already reclaimed the open stateid. it does this by returning BAD_STATEID instead of retrying the OPEN (which would generate yet another open stateid) Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
4f47ae9a37
commit
d44470c877
7 changed files with 104 additions and 21 deletions
|
|
@ -127,6 +127,7 @@ void nfs41_open_stateid_arg(
|
|||
OUT stateid_arg *arg)
|
||||
{
|
||||
arg->open = state;
|
||||
arg->delegation = NULL;
|
||||
|
||||
AcquireSRWLockShared(&state->lock);
|
||||
|
||||
|
|
@ -659,6 +660,7 @@ static void cancel_open(IN nfs41_upcall *upcall)
|
|||
if (state->do_close) {
|
||||
stateid_arg stateid;
|
||||
stateid.open = state;
|
||||
stateid.delegation = NULL;
|
||||
stateid.type = STATEID_OPEN;
|
||||
memcpy(&stateid.stateid, &state->stateid, sizeof(stateid4));
|
||||
|
||||
|
|
@ -742,6 +744,7 @@ static int handle_close(nfs41_upcall *upcall)
|
|||
if (state->do_close) {
|
||||
stateid_arg stateid;
|
||||
stateid.open = state;
|
||||
stateid.delegation = NULL;
|
||||
stateid.type = STATEID_OPEN;
|
||||
memcpy(&stateid.stateid, &state->stateid, sizeof(stateid4));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue