diff options
Diffstat (limited to 'include/linux/nfs_fs_sb.h')
-rw-r--r-- | include/linux/nfs_fs_sb.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index e9a51fe46aa..b47c0fc55d4 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -4,9 +4,12 @@ | |||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/backing-dev.h> | 5 | #include <linux/backing-dev.h> |
6 | #include <linux/wait.h> | 6 | #include <linux/wait.h> |
7 | #include <linux/nfs_xdr.h> | ||
8 | #include <linux/sunrpc/xprt.h> | ||
7 | 9 | ||
8 | #include <asm/atomic.h> | 10 | #include <asm/atomic.h> |
9 | 11 | ||
12 | struct nfs4_session; | ||
10 | struct nfs_iostats; | 13 | struct nfs_iostats; |
11 | struct nlm_host; | 14 | struct nlm_host; |
12 | 15 | ||
@@ -66,6 +69,10 @@ struct nfs_client { | |||
66 | unsigned char cl_id_uniquifier; | 69 | unsigned char cl_id_uniquifier; |
67 | #endif /* CONFIG_NFS_V4 */ | 70 | #endif /* CONFIG_NFS_V4 */ |
68 | 71 | ||
72 | #ifdef CONFIG_NFS_V4_1 | ||
73 | struct nfs4_session *cl_session; /* sharred session */ | ||
74 | #endif /* CONFIG_NFS_V4_1 */ | ||
75 | |||
69 | #ifdef CONFIG_NFS_FSCACHE | 76 | #ifdef CONFIG_NFS_FSCACHE |
70 | struct fscache_cookie *fscache; /* client index cache cookie */ | 77 | struct fscache_cookie *fscache; /* client index cache cookie */ |
71 | #endif | 78 | #endif |
@@ -146,4 +153,46 @@ struct nfs_server { | |||
146 | #define NFS_CAP_ACLS (1U << 3) | 153 | #define NFS_CAP_ACLS (1U << 3) |
147 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) | 154 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) |
148 | 155 | ||
156 | |||
157 | /* maximum number of slots to use */ | ||
158 | #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE | ||
159 | |||
160 | #if defined(CONFIG_NFS_V4_1) | ||
161 | |||
162 | /* Sessions */ | ||
163 | #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long))) | ||
164 | struct nfs4_slot_table { | ||
165 | struct nfs4_slot *slots; /* seqid per slot */ | ||
166 | unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */ | ||
167 | spinlock_t slot_tbl_lock; | ||
168 | struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */ | ||
169 | int max_slots; /* # slots in table */ | ||
170 | int highest_used_slotid; /* sent to server on each SEQ. | ||
171 | * op for dynamic resizing */ | ||
172 | }; | ||
173 | |||
174 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | ||
175 | { | ||
176 | return sp - tbl->slots; | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Session related parameters | ||
181 | */ | ||
182 | struct nfs4_session { | ||
183 | struct nfs4_sessionid sess_id; | ||
184 | u32 flags; | ||
185 | unsigned long session_state; | ||
186 | u32 hash_alg; | ||
187 | u32 ssv_len; | ||
188 | |||
189 | /* The fore and back channel */ | ||
190 | struct nfs4_channel_attrs fc_attrs; | ||
191 | struct nfs4_slot_table fc_slot_table; | ||
192 | struct nfs4_channel_attrs bc_attrs; | ||
193 | /* back channel has one slot */ | ||
194 | struct nfs_client *clp; | ||
195 | }; | ||
196 | |||
197 | #endif /* CONFIG_NFS_V4_1 */ | ||
149 | #endif | 198 | #endif |