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:
Casey Bodley 2011-07-20 15:28:31 -04:00 committed by unknown
parent 4f47ae9a37
commit d44470c877
7 changed files with 104 additions and 21 deletions

View file

@ -1644,7 +1644,7 @@ static bool_t encode_op_delegreturn(
if (unexpected_op(argop->op, OP_DELEGRETURN))
return FALSE;
return xdr_stateid4(xdr, args->stateid);
return xdr_stateid4(xdr, &args->stateid->stateid);
}
static bool_t decode_op_delegreturn(
@ -1930,9 +1930,11 @@ static bool_t encode_open_claim4(
return TRUE; /* use current file handle */
case CLAIM_DELEGATE_CUR:
return encode_claim_deleg_cur(xdr,
oc->u.deleg_cur.delegate_stateid, oc->u.deleg_cur.name);
&oc->u.deleg_cur.delegate_stateid->stateid,
oc->u.deleg_cur.name);
case CLAIM_DELEG_CUR_FH:
return xdr_stateid4(xdr, oc->u.deleg_cur_fh.delegate_stateid);
return xdr_stateid4(xdr,
&oc->u.deleg_cur_fh.delegate_stateid->stateid);
case CLAIM_DELEGATE_PREV:
return encode_component(xdr, oc->u.deleg_prev.filename);
case CLAIM_DELEG_PREV_FH: