diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfsd/state.h | 22 | ||||
| -rw-r--r-- | include/linux/nfsd/xdr4.h | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 66422a1c8277..b4d10b7dcc16 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -95,6 +95,27 @@ update_stateid(stateid_t *stateid) stateid->si_generation++; } +/* A reasonable value for REPLAY_ISIZE was estimated as follows: + * The OPEN response, typically the largest, requires + * 4(status) + 8(stateid) + 20(changeinfo) + 4(rflags) + 8(verifier) + + * 4(deleg. type) + 8(deleg. stateid) + 4(deleg. recall flag) + + * 20(deleg. space limit) + ~32(deleg. ace) = 112 bytes + */ + +#define NFSD4_REPLAY_ISIZE 112 + +/* + * Replay buffer, where the result of the last seqid-mutating operation + * is cached. + */ +struct nfs4_replay { + u32 rp_status; + unsigned int rp_buflen; + char *rp_buf; + unsigned intrp_allocated; + char rp_ibuf[NFSD4_REPLAY_ISIZE]; +}; + /* * nfs4_stateowner can either be an open_owner, or (eventually) a lock_owner * @@ -111,6 +132,7 @@ struct nfs4_stateowner { u32 so_seqid; struct xdr_netobj so_owner; /* open owner name */ int so_confirmed; /* successful OPEN_CONFIRM? */ + struct nfs4_replay so_replay; }; /* diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index 54c3049f6068..254d5d2c5647 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h @@ -284,6 +284,7 @@ struct nfsd4_op { struct nfsd4_verify verify; struct nfsd4_write write; } u; + struct nfs4_replay * replay; }; struct nfsd4_compoundargs { @@ -339,6 +340,7 @@ int nfs4svc_decode_compoundargs(struct svc_rqst *, u32 *, int nfs4svc_encode_compoundres(struct svc_rqst *, u32 *, struct nfsd4_compoundres *); void nfsd4_encode_operation(struct nfsd4_compoundres *, struct nfsd4_op *); +void nfsd4_encode_replay(struct nfsd4_compoundres *resp, struct nfsd4_op *op); int nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, u32 *buffer, int *countp, u32 *bmval); |
