]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - include/linux/sunrpc/rpc_pipe_fs.h
rpc: add rpc_queue_empty function
[linux-2.6.git] / include / linux / sunrpc / rpc_pipe_fs.h
index 63929349571fe643eecfd1636636daabb6aac2a4..cf14db975da00b6e8031e7ffe1780e7cc9c88832 100644 (file)
@@ -3,6 +3,8 @@
 
 #ifdef __KERNEL__
 
+#include <linux/workqueue.h>
+
 struct rpc_pipe_msg {
        struct list_head list;
        void *data;
@@ -15,6 +17,7 @@ struct rpc_pipe_ops {
        ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t);
        ssize_t (*downcall)(struct file *, const char __user *, size_t);
        void (*release_pipe)(struct inode *);
+       int (*open_pipe)(struct inode *);
        void (*destroy_msg)(struct rpc_pipe_msg *);
 };
 
@@ -23,14 +26,16 @@ struct rpc_inode {
        void *private;
        struct list_head pipe;
        struct list_head in_upcall;
+       struct list_head in_downcall;
        int pipelen;
        int nreaders;
        int nwriters;
+       int nkern_readwriters;
        wait_queue_head_t waitq;
 #define RPC_PIPE_WAIT_FOR_OPEN 1
        int flags;
-       struct rpc_pipe_ops *ops;
-       struct work_struct queue_timeout;
+       struct delayed_work queue_timeout;
+       const struct rpc_pipe_ops *ops;
 };
 
 static inline struct rpc_inode *
@@ -41,10 +46,24 @@ RPC_I(struct inode *inode)
 
 extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
 
-extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *);
-extern int rpc_rmdir(char *);
-extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags);
-extern int rpc_unlink(char *);
+struct rpc_clnt;
+extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *);
+extern int rpc_remove_client_dir(struct dentry *);
+
+struct cache_detail;
+extern struct dentry *rpc_create_cache_dir(struct dentry *,
+                                          struct qstr *,
+                                          mode_t umode,
+                                          struct cache_detail *);
+extern void rpc_remove_cache_dir(struct dentry *);
+
+extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *,
+                                const struct rpc_pipe_ops *, int flags);
+extern int rpc_unlink(struct dentry *);
+extern struct vfsmount *rpc_get_mount(void);
+extern void rpc_put_mount(void);
+extern int register_rpc_pipefs(void);
+extern void unregister_rpc_pipefs(void);
 
 #endif
 #endif