X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnfsd%2Fxdr4.h;h=77adba7d228105fa1fd0f7fde49720814d92ca55;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=bf94561ca623b63890e3a74f2d3043216841952f;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index bf94561ca..77adba7d2 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h @@ -44,16 +44,6 @@ #define NFSD4_MAX_TAGLEN 128 #define XDR_LEN(n) (((n) + 3) & ~3) -typedef u32 delegation_zero_t; -typedef u32 delegation_boot_t; -typedef u64 delegation_id_t; - -typedef struct { - delegation_zero_t ds_zero; - delegation_boot_t ds_boot; - delegation_id_t ds_id; -} delegation_stateid_t; - struct nfsd4_change_info { u32 atomic; u32 before_ctime_sec; @@ -104,6 +94,10 @@ struct nfsd4_create { #define cr_specdata1 u.dev.specdata1 #define cr_specdata2 u.dev.specdata2 +struct nfsd4_delegreturn { + stateid_t dr_stateid; +}; + struct nfsd4_getattr { u32 ga_bmval[2]; /* request */ struct svc_fh *ga_fhp; /* response */ @@ -116,6 +110,7 @@ struct nfsd4_link { }; struct nfsd4_lock_denied { + clientid_t ld_clientid; struct nfs4_stateowner *ld_sop; u64 ld_start; u64 ld_length; @@ -150,8 +145,9 @@ struct nfsd4_lock { } ok; struct nfsd4_lock_denied denied; } u; - - struct nfs4_stateowner *lk_stateowner; + /* The lk_replay_owner is the open owner in the open_to_lock_owner + * case and the lock owner otherwise: */ + struct nfs4_stateowner *lk_replay_owner; }; #define lk_new_open_seqid v.new.open_seqid #define lk_new_open_stateid v.new.open_stateid @@ -201,13 +197,13 @@ struct nfsd4_open { u32 op_claim_type; /* request */ struct xdr_netobj op_fname; /* request - everything but CLAIM_PREV */ u32 op_delegate_type; /* request - CLAIM_PREV only */ - delegation_stateid_t op_delegate_stateid; /* request - CLAIM_DELEGATE_CUR only */ + stateid_t op_delegate_stateid; /* request - response */ u32 op_create; /* request */ u32 op_createmode; /* request */ u32 op_bmval[2]; /* request */ union { /* request */ - struct iattr iattr; /* UNCHECKED4,GUARDED4 */ - nfs4_verifier verf; /* EXCLUSIVE4 */ + struct iattr iattr; /* UNCHECKED4,GUARDED4 */ + nfs4_verifier verf; /* EXCLUSIVE4 */ } u; clientid_t op_clientid; /* request */ struct xdr_netobj op_owner; /* request */ @@ -215,6 +211,7 @@ struct nfsd4_open { u32 op_share_access; /* request */ u32 op_share_deny; /* request */ stateid_t op_stateid; /* response */ + u32 op_recall; /* recall */ struct nfsd4_change_info op_cinfo; /* response */ u32 op_rflags; /* response */ int op_truncate; /* used during processing */ @@ -246,6 +243,7 @@ struct nfsd4_read { u32 rd_length; /* request */ struct kvec rd_iov[RPCSVC_MAXPAGES]; int rd_vlen; + struct file *rd_filp; struct svc_rqst *rd_rqstp; /* response */ struct svc_fh * rd_fhp; /* response */ @@ -344,6 +342,7 @@ struct nfsd4_op { struct nfsd4_close close; struct nfsd4_commit commit; struct nfsd4_create create; + struct nfsd4_delegreturn delegreturn; struct nfsd4_getattr getattr; struct svc_fh * getfh; struct nfsd4_link link; @@ -440,21 +439,28 @@ extern int nfsd4_process_open1(struct nfsd4_open *open); extern int nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open); extern int nfsd4_open_confirm(struct svc_rqst *rqstp, - struct svc_fh *current_fh, struct nfsd4_open_confirm *oc); + struct svc_fh *current_fh, struct nfsd4_open_confirm *oc, + struct nfs4_stateowner **); extern int nfsd4_close(struct svc_rqst *rqstp, struct svc_fh *current_fh, - struct nfsd4_close *close); + struct nfsd4_close *close, + struct nfs4_stateowner **replay_owner); extern int nfsd4_open_downgrade(struct svc_rqst *rqstp, - struct svc_fh *current_fh, struct nfsd4_open_downgrade *od); + struct svc_fh *current_fh, struct nfsd4_open_downgrade *od, + struct nfs4_stateowner **replay_owner); extern int nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, - struct nfsd4_lock *lock); + struct nfsd4_lock *lock, + struct nfs4_stateowner **replay_owner); extern int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lockt *lockt); extern int nfsd4_locku(struct svc_rqst *rqstp, struct svc_fh *current_fh, - struct nfsd4_locku *locku); + struct nfsd4_locku *locku, + struct nfs4_stateowner **replay_owner); extern int nfsd4_release_lockowner(struct svc_rqst *rqstp, struct nfsd4_release_lockowner *rlockowner); extern void nfsd4_release_compoundargs(struct nfsd4_compoundargs *); +extern int nfsd4_delegreturn(struct svc_rqst *rqstp, + struct svc_fh *current_fh, struct nfsd4_delegreturn *dr); #endif /*