diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 20:59:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-06-17 20:59:58 -0400 |
commit | 301933a0acfdec837fd8b4884093b3f0fff01d8a (patch) | |
tree | 1f2412a30d710493179b1b3743cf30302872df15 /fs/nfs/internal.h | |
parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) | |
parent | 68f3f90133d56e0c38f04f991e662c2b21592b31 (diff) |
Merge commit 'linux-pnfs/nfs41-for-2.6.31' into nfsv41-for-2.6.31
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index e4d6a8348adf..acee3274d275 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * NFS internal definitions | 2 | * NFS internal definitions |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include "nfs4_fs.h" | ||
5 | #include <linux/mount.h> | 6 | #include <linux/mount.h> |
6 | #include <linux/security.h> | 7 | #include <linux/security.h> |
7 | 8 | ||
@@ -17,6 +18,18 @@ struct nfs_string; | |||
17 | */ | 18 | */ |
18 | #define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) | 19 | #define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) |
19 | 20 | ||
21 | /* | ||
22 | * Determine if sessions are in use. | ||
23 | */ | ||
24 | static inline int nfs4_has_session(const struct nfs_client *clp) | ||
25 | { | ||
26 | #ifdef CONFIG_NFS_V4_1 | ||
27 | if (clp->cl_session) | ||
28 | return 1; | ||
29 | #endif /* CONFIG_NFS_V4_1 */ | ||
30 | return 0; | ||
31 | } | ||
32 | |||
20 | struct nfs_clone_mount { | 33 | struct nfs_clone_mount { |
21 | const struct super_block *sb; | 34 | const struct super_block *sb; |
22 | const struct dentry *dentry; | 35 | const struct dentry *dentry; |
@@ -44,6 +57,7 @@ struct nfs_parsed_mount_data { | |||
44 | unsigned int auth_flavor_len; | 57 | unsigned int auth_flavor_len; |
45 | rpc_authflavor_t auth_flavors[1]; | 58 | rpc_authflavor_t auth_flavors[1]; |
46 | char *client_address; | 59 | char *client_address; |
60 | unsigned int minorversion; | ||
47 | char *fscache_uniq; | 61 | char *fscache_uniq; |
48 | 62 | ||
49 | struct { | 63 | struct { |
@@ -99,6 +113,8 @@ extern void nfs_free_server(struct nfs_server *server); | |||
99 | extern struct nfs_server *nfs_clone_server(struct nfs_server *, | 113 | extern struct nfs_server *nfs_clone_server(struct nfs_server *, |
100 | struct nfs_fh *, | 114 | struct nfs_fh *, |
101 | struct nfs_fattr *); | 115 | struct nfs_fattr *); |
116 | extern void nfs_mark_client_ready(struct nfs_client *clp, int state); | ||
117 | extern int nfs4_check_client_ready(struct nfs_client *clp); | ||
102 | #ifdef CONFIG_PROC_FS | 118 | #ifdef CONFIG_PROC_FS |
103 | extern int __init nfs_fs_proc_init(void); | 119 | extern int __init nfs_fs_proc_init(void); |
104 | extern void nfs_fs_proc_exit(void); | 120 | extern void nfs_fs_proc_exit(void); |
@@ -146,6 +162,20 @@ extern __be32 * nfs_decode_dirent(__be32 *, struct nfs_entry *, int); | |||
146 | extern struct rpc_procinfo nfs3_procedures[]; | 162 | extern struct rpc_procinfo nfs3_procedures[]; |
147 | extern __be32 *nfs3_decode_dirent(__be32 *, struct nfs_entry *, int); | 163 | extern __be32 *nfs3_decode_dirent(__be32 *, struct nfs_entry *, int); |
148 | 164 | ||
165 | /* nfs4proc.c */ | ||
166 | static inline void nfs4_restart_rpc(struct rpc_task *task, | ||
167 | const struct nfs_client *clp) | ||
168 | { | ||
169 | #ifdef CONFIG_NFS_V4_1 | ||
170 | if (nfs4_has_session(clp) && | ||
171 | test_bit(NFS4CLNT_SESSION_SETUP, &clp->cl_state)) { | ||
172 | rpc_restart_call_prepare(task); | ||
173 | return; | ||
174 | } | ||
175 | #endif /* CONFIG_NFS_V4_1 */ | ||
176 | rpc_restart_call(task); | ||
177 | } | ||
178 | |||
149 | /* nfs4xdr.c */ | 179 | /* nfs4xdr.c */ |
150 | #ifdef CONFIG_NFS_V4 | 180 | #ifdef CONFIG_NFS_V4 |
151 | extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus); | 181 | extern __be32 *nfs4_decode_dirent(__be32 *p, struct nfs_entry *entry, int plus); |
@@ -205,6 +235,38 @@ extern int nfs4_path_walk(struct nfs_server *server, | |||
205 | const char *path); | 235 | const char *path); |
206 | #endif | 236 | #endif |
207 | 237 | ||
238 | /* read.c */ | ||
239 | extern void nfs_read_prepare(struct rpc_task *task, void *calldata); | ||
240 | |||
241 | /* write.c */ | ||
242 | extern void nfs_write_prepare(struct rpc_task *task, void *calldata); | ||
243 | |||
244 | /* nfs4proc.c */ | ||
245 | extern int _nfs4_call_sync(struct nfs_server *server, | ||
246 | struct rpc_message *msg, | ||
247 | struct nfs4_sequence_args *args, | ||
248 | struct nfs4_sequence_res *res, | ||
249 | int cache_reply); | ||
250 | extern int _nfs4_call_sync_session(struct nfs_server *server, | ||
251 | struct rpc_message *msg, | ||
252 | struct nfs4_sequence_args *args, | ||
253 | struct nfs4_sequence_res *res, | ||
254 | int cache_reply); | ||
255 | |||
256 | #ifdef CONFIG_NFS_V4_1 | ||
257 | extern void nfs41_sequence_free_slot(const struct nfs_client *, | ||
258 | struct nfs4_sequence_res *res); | ||
259 | #endif /* CONFIG_NFS_V4_1 */ | ||
260 | |||
261 | static inline void nfs4_sequence_free_slot(const struct nfs_client *clp, | ||
262 | struct nfs4_sequence_res *res) | ||
263 | { | ||
264 | #ifdef CONFIG_NFS_V4_1 | ||
265 | if (nfs4_has_session(clp)) | ||
266 | nfs41_sequence_free_slot(clp, res); | ||
267 | #endif /* CONFIG_NFS_V4_1 */ | ||
268 | } | ||
269 | |||
208 | /* | 270 | /* |
209 | * Determine the device name as a string | 271 | * Determine the device name as a string |
210 | */ | 272 | */ |