VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / include / linux / nfsd / state.h
index 06da185..32ffcd8 100644 (file)
@@ -38,6 +38,7 @@
 #define _NFSD4_STATE_H
 
 #include <linux/list.h>
+#include <linux/sunrpc/clnt.h>
 
 #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 */