nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op
[safe/jmp/linux-2.6] / include / linux / nfsd / state.h
index f1edb1d..836c0d6 100644 (file)
@@ -99,13 +99,18 @@ struct nfs4_callback {
        struct rpc_clnt *       cb_client;
 };
 
+/* Maximum number of slots per session. 128 is useful for long haul TCP */
+#define NFSD_MAX_SLOTS_PER_SESSION     128
 /* Maximum number of pages per slot cache entry */
 #define NFSD_PAGES_PER_SLOT    1
+/* Maximum number of operations per session compound */
+#define NFSD_MAX_OPS_PER_COMPOUND      16
 
 struct nfsd4_cache_entry {
        __be32          ce_status;
        struct kvec     ce_datav; /* encoded NFSv4.1 data in rq_res.head[0] */
        struct page     *ce_respages[NFSD_PAGES_PER_SLOT + 1];
+       int             ce_cachethis;
        short           ce_resused;
        int             ce_opcnt;
        int             ce_rpchdrlen;
@@ -129,7 +134,7 @@ struct nfsd4_session {
        u32                     se_fmaxresp_cached;
        u32                     se_fmaxops;
        u32                     se_fnumslots;
-       struct nfsd4_slot       *se_slots;      /* forward channel slots */
+       struct nfsd4_slot       se_slots[];     /* forward channel slots */
 };
 
 static inline void
@@ -186,8 +191,9 @@ struct nfs4_client {
 
        /* for nfs41 */
        struct list_head        cl_sessions;
-       u32                     cl_seqid;       /* seqid for create_session */
+       struct nfsd4_slot       cl_slot;        /* create_session slot */
        u32                     cl_exchange_flags;
+       struct nfs4_sessionid   cl_sessionid;
 };
 
 /* struct nfs4_client_reset
@@ -327,7 +333,9 @@ struct nfs4_stateid {
        ((err) != nfserr_stale_stateid) &&      \
        ((err) != nfserr_bad_stateid))
 
-extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh,
+struct nfsd4_compound_state;
+
+extern __be32 nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate,
                stateid_t *stateid, int flags, struct file **filp);
 extern void nfs4_lock_state(void);
 extern void nfs4_unlock_state(void);