]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/nfs_fs_sb.h
NFSv4/4.1: Fix nfs4_schedule_state_recovery abuses
[mv-sheeva.git] / include / linux / nfs_fs_sb.h
index c82ee7cd6288573186a664d12b16bdd2a3ea07f1..3e112de12d8d61fcc7fd4700c671a369ca15f86a 100644 (file)
@@ -47,11 +47,6 @@ struct nfs_client {
        u64                     cl_clientid;    /* constant */
        unsigned long           cl_state;
 
-       struct rb_root          cl_openowner_id;
-       struct rb_root          cl_lockowner_id;
-
-       struct list_head        cl_delegations;
-       struct rb_root          cl_state_owners;
        spinlock_t              cl_lock;
 
        unsigned long           cl_lease_time;
@@ -71,18 +66,17 @@ struct nfs_client {
         */
        char                    cl_ipaddr[48];
        unsigned char           cl_id_uniquifier;
+       u32                     cl_cb_ident;    /* v4.0 callback identifier */
        const struct nfs4_minor_version_ops *cl_mvops;
-#endif /* CONFIG_NFS_V4 */
 
-#ifdef CONFIG_NFS_V4_1
-       /* clientid returned from EXCHANGE_ID, used by session operations */
-       u64                     cl_ex_clid;
        /* The sequence id to use for the next CREATE_SESSION */
        u32                     cl_seqid;
        /* The flags used for obtaining the clientid during EXCHANGE_ID */
        u32                     cl_exchange_flags;
        struct nfs4_session     *cl_session;    /* sharred session */
-#endif /* CONFIG_NFS_V4_1 */
+       struct list_head        cl_layouts;
+       struct pnfs_deviceid_cache *cl_devid_cache; /* pNFS deviceid cache */
+#endif /* CONFIG_NFS_V4 */
 
 #ifdef CONFIG_NFS_FSCACHE
        struct fscache_cookie   *fscache;       /* client index cache cookie */
@@ -124,6 +118,7 @@ struct nfs_server {
 
        struct nfs_fsid         fsid;
        __u64                   maxfilesize;    /* maximum file size */
+       struct timespec         time_delta;     /* smallest time granularity */
        unsigned long           mount_time;     /* when this fs was mounted */
        dev_t                   s_dev;          /* superblock dev numbers */
 
@@ -144,7 +139,15 @@ struct nfs_server {
        u32                     acl_bitmask;    /* V4 bitmask representing the ACEs
                                                   that are supported on this
                                                   filesystem */
+       struct pnfs_layoutdriver_type  *pnfs_curr_ld; /* Active layout driver */
+       struct rpc_wait_queue   roc_rpcwaitq;
+
+       /* the following fields are protected by nfs_client->cl_lock */
+       struct rb_root          state_owners;
+       struct rb_root          openowner_id;
+       struct rb_root          lockowner_id;
 #endif
+       struct list_head        delegations;
        void (*destroy)(struct nfs_server *);
 
        atomic_t active; /* Keep trace of any activity to this server */
@@ -178,7 +181,7 @@ struct nfs_server {
 /* maximum number of slots to use */
 #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE
 
-#if defined(CONFIG_NFS_V4_1)
+#if defined(CONFIG_NFS_V4)
 
 /* Sessions */
 #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long)))
@@ -192,6 +195,7 @@ struct nfs4_slot_table {
                                                 * op for dynamic resizing */
        int             target_max_slots;       /* Set by CB_RECALL_SLOT as
                                                 * the new max_slots */
+       struct completion complete;
 };
 
 static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp)
@@ -208,7 +212,6 @@ struct nfs4_session {
        unsigned long                   session_state;
        u32                             hash_alg;
        u32                             ssv_len;
-       struct completion               complete;
 
        /* The fore and back channel */
        struct nfs4_channel_attrs       fc_attrs;
@@ -218,5 +221,5 @@ struct nfs4_session {
        struct nfs_client               *clp;
 };
 
-#endif /* CONFIG_NFS_V4_1 */
+#endif /* CONFIG_NFS_V4 */
 #endif