X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnfsd%2Fstate.h;h=32ffcd82d2cee88c223141988e5af4f1922735d1;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=06da1850612273dc305319a11ebed0462299ce06;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 06da18506..32ffcd82d 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -38,6 +38,7 @@ #define _NFSD4_STATE_H #include +#include #define NFS4_OPAQUE_LIMIT 1024 typedef struct { @@ -65,6 +66,22 @@ extern stateid_t onestateid; #define ZERO_STATEID(stateid) (!memcmp((stateid), &zerostateid, sizeof(stateid_t))) #define ONE_STATEID(stateid) (!memcmp((stateid), &onestateid, sizeof(stateid_t))) +/* client delegation callback info */ +struct nfs4_callback { + /* SETCLIENTID info */ + u32 cb_parsed; /* addr parsed */ + u32 cb_addr; + unsigned short cb_port; + u32 cb_prog; + u32 cb_ident; + struct xdr_netobj cb_netid; + /* RPC client info */ + u32 cb_set; /* successful CB_NULL call */ + struct rpc_program cb_program; + struct rpc_stat cb_stat; + struct rpc_clnt * cb_client; +}; + /* * struct nfs4_client - one per client. Clientids live here. * o Each nfs4_client is hashed by clientid. @@ -87,6 +104,20 @@ struct nfs4_client { struct svc_cred cl_cred; /* setclientid principal */ clientid_t cl_clientid; /* generated by server */ nfs4_verifier cl_confirm; /* generated by server */ + struct nfs4_callback cl_callback; /* callback info */ + time_t cl_first_state; /* first state aquisition*/ +}; + +/* struct nfs4_client_reset + * one per old client. Populates reset_str_hashtbl. Filled from conf_id_hashtbl + * upon lease reset, or from upcall to state_daemon (to read in state + * from non-volitile storage) upon reboot. + */ +struct nfs4_client_reclaim { + struct list_head cr_strhash; /* hash by cr_name */ + struct xdr_netobj cr_name; /* id generated by client */ + time_t cr_first_state; /* first state aquisition */ + u32 cr_expired; /* boolean: lease expired? */ }; static inline void @@ -216,5 +247,5 @@ extern int nfs4_share_conflict(struct svc_fh *current_fh, extern void nfs4_lock_state(void); extern void nfs4_unlock_state(void); extern int nfs4_in_grace(void); -extern int nfs4_in_no_grace(void); +extern int nfs4_check_open_reclaim(clientid_t *clid); #endif /* NFSD4_STATE_H */