]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nfs/internal.h
nfs41: add session setup to the state manager
[mv-sheeva.git] / fs / nfs / internal.h
index e4d6a8348adf5178a8d7d63b85a96fe22e0d129b..f3b310e8ea03588eb2e3d0223380f7caf4971e3c 100644 (file)
@@ -44,6 +44,7 @@ struct nfs_parsed_mount_data {
        unsigned int            auth_flavor_len;
        rpc_authflavor_t        auth_flavors[1];
        char                    *client_address;
+       unsigned int            minorversion;
        char                    *fscache_uniq;
 
        struct {
@@ -99,6 +100,7 @@ extern void nfs_free_server(struct nfs_server *server);
 extern struct nfs_server *nfs_clone_server(struct nfs_server *,
                                           struct nfs_fh *,
                                           struct nfs_fattr *);
+extern void nfs_mark_client_ready(struct nfs_client *clp, int state);
 #ifdef CONFIG_PROC_FS
 extern int __init nfs_fs_proc_init(void);
 extern void nfs_fs_proc_exit(void);
@@ -205,6 +207,50 @@ extern int nfs4_path_walk(struct nfs_server *server,
                          const char *path);
 #endif
 
+/* read.c */
+extern void nfs_read_prepare(struct rpc_task *task, void *calldata);
+
+/* write.c */
+extern void nfs_write_prepare(struct rpc_task *task, void *calldata);
+
+/* nfs4proc.c */
+extern int _nfs4_call_sync(struct nfs_server *server,
+                          struct rpc_message *msg,
+                          struct nfs4_sequence_args *args,
+                          struct nfs4_sequence_res *res,
+                          int cache_reply);
+extern int _nfs4_call_sync_session(struct nfs_server *server,
+                                  struct rpc_message *msg,
+                                  struct nfs4_sequence_args *args,
+                                  struct nfs4_sequence_res *res,
+                                  int cache_reply);
+
+/*
+ * Determine if sessions are in use.
+ */
+static inline int nfs4_has_session(const struct nfs_client *clp)
+{
+#ifdef CONFIG_NFS_V4_1
+       if (clp->cl_session)
+               return 1;
+#endif /* CONFIG_NFS_V4_1 */
+       return 0;
+}
+
+#ifdef CONFIG_NFS_V4_1
+extern void nfs41_sequence_free_slot(const struct nfs_client *,
+                                    struct nfs4_sequence_res *res);
+#endif /* CONFIG_NFS_V4_1 */
+
+static inline void nfs4_sequence_free_slot(const struct nfs_client *clp,
+                                          struct nfs4_sequence_res *res)
+{
+#ifdef CONFIG_NFS_V4_1
+       if (nfs4_has_session(clp))
+               nfs41_sequence_free_slot(clp, res);
+#endif /* CONFIG_NFS_V4_1 */
+}
+
 /*
  * Determine the device name as a string
  */