diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2005-01-04 05:49:25 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:49:25 -0800 |
| commit | 1dcde038dcea69875e79fb06eb3c872f91950424 (patch) | |
| tree | 683cef6c3a4b200cbfdb46a8d3ac567468f04b48 /include/linux | |
| parent | 82bd687c078f1be677fc2bf691c2729af0a4b33b (diff) | |
[PATCH] knfsd: add structures for delegation support
Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfsd/state.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 85bec64cb59e..ff199c8fc4be 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -67,6 +67,41 @@ extern stateid_t onestateid; #define ZERO_STATEID(stateid) (!memcmp((stateid), &zerostateid, sizeof(stateid_t))) #define ONE_STATEID(stateid) (!memcmp((stateid), &onestateid, sizeof(stateid_t))) +/* Delegation recall states */ +#define NFS4_NO_RECALL 0x000 +#define NFS4_RECALL_IN_PROGRESS 0x001 +#define NFS4_RECALL_COMPLETE 0x002 +#define NFS4_REAP_DELEG 0x004 + +struct nfs4_cb_recall { + u32 cbr_ident; + int cbr_trunc; + stateid_t cbr_stateid; + u32 cbr_fhlen; + u32 cbr_fhval[NFS4_FHSIZE]; + struct nfs4_delegation *cbr_dp; +}; + +struct nfs4_delegation { + struct list_head dl_del_perfile; /* nfs4_file->fi_del_perfile */ + struct list_head dl_del_perclnt; /* nfs4_client->cl_del_perclnt*/ + struct list_head dl_recall_lru; /* delegation recalled */ + atomic_t dl_recall_cnt; /* resend cb_recall only once */ + atomic_t dl_count; /* ref count */ + atomic_t dl_state; /* recall state */ + struct nfs4_client *dl_client; + struct nfs4_file *dl_file; + struct file_lock *dl_flock; + struct nfs4_stateid *dl_stp; + u32 dl_type; + time_t dl_time; + struct nfs4_cb_recall dl_recall; +}; + +#define dl_stateid dl_recall.cbr_stateid +#define dl_fhlen dl_recall.cbr_fhlen +#define dl_fhval dl_recall.cbr_fhval + /* client delegation callback info */ struct nfs4_callback { /* SETCLIENTID info */ @@ -96,6 +131,7 @@ struct nfs4_client { struct list_head cl_idhash; /* hash by cl_clientid.id */ struct list_head cl_strhash; /* hash by cl_name */ struct list_head cl_perclient; /* list: stateowners */ + struct list_head cl_del_perclnt; /* list: delegations */ struct list_head cl_lru; /* tail queue */ struct xdr_netobj cl_name; /* id generated by client */ nfs4_verifier cl_verifier; /* generated by client */ @@ -194,6 +230,7 @@ struct nfs4_stateowner { struct nfs4_file { struct list_head fi_hash; /* hash by "struct inode *" */ struct list_head fi_perfile; /* list: nfs4_stateid */ + struct list_head fi_del_perfile; /* list: nfs4_delegation */ struct inode *fi_inode; u32 fi_id; /* used with stateowner->so_id * for stateid_hashtbl hash */ |
