recovery: support for WANT_DELEGATION
for delegations without an associated open, try the optional WANT_DELEGATION operation with CLAIM_PREVIOUS before falling back to OPEN/CLAIM_PREVIOUS. the advantage of WANT_DELEGATION is that it doesn't generate an open stateid, so we don't need the corresponding CLOSE as in recover_delegation_open(). if WANT_DELEGATION fails with NFS4ERR_NOTSUPP, don't try it again during that round of state recovery Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
b9b3b00e76
commit
8e5ab92b2b
4 changed files with 238 additions and 42 deletions
|
|
@ -667,8 +667,6 @@ typedef struct __nfs41_op_open_res_ok {
|
|||
uint32_t rflags;
|
||||
bitmap4 attrset;
|
||||
open_delegation4 *delegation;
|
||||
uint32_t why_no_deleg;
|
||||
uint32_t why_none_flag;
|
||||
} nfs41_op_open_res_ok;
|
||||
|
||||
typedef struct __nfs41_op_open_res {
|
||||
|
|
@ -798,6 +796,25 @@ typedef struct __nfs41_setattr_res {
|
|||
} nfs41_setattr_res;
|
||||
|
||||
|
||||
/* OP_WANT_DELEGATION */
|
||||
typedef struct __deleg_claim4 {
|
||||
uint32_t claim;
|
||||
/* case CLAIM_PREVIOUS: */
|
||||
uint32_t prev_delegate_type;
|
||||
} deleg_claim4;
|
||||
|
||||
typedef struct __nfs41_want_delegation_args {
|
||||
uint32_t want;
|
||||
deleg_claim4 *claim;
|
||||
} nfs41_want_delegation_args;
|
||||
|
||||
typedef struct __nfs41_want_delegation_res {
|
||||
uint32_t status;
|
||||
/* case NFS4_OK: */
|
||||
open_delegation4 *delegation;
|
||||
} nfs41_want_delegation_res;
|
||||
|
||||
|
||||
/* OP_WRITE */
|
||||
enum stable_how4 {
|
||||
UNSTABLE4 = 0,
|
||||
|
|
@ -1158,6 +1175,14 @@ int nfs41_access(
|
|||
OUT uint32_t *supported OPTIONAL,
|
||||
OUT uint32_t *access OPTIONAL);
|
||||
|
||||
enum nfsstat4 nfs41_want_delegation(
|
||||
IN nfs41_session *session,
|
||||
IN nfs41_path_fh *file,
|
||||
IN deleg_claim4 *claim,
|
||||
IN uint32_t want,
|
||||
IN bool_t try_recovery,
|
||||
OUT open_delegation4 *delegation);
|
||||
|
||||
int nfs41_delegpurge(
|
||||
IN nfs41_session *session);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue