diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/sunrpc/rpc_pipe_fs.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/sunrpc/rpc_pipe_fs.h')
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h new file mode 100644 index 000000000000..63929349571f --- /dev/null +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H | ||
2 | #define _LINUX_SUNRPC_RPC_PIPE_FS_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | struct rpc_pipe_msg { | ||
7 | struct list_head list; | ||
8 | void *data; | ||
9 | size_t len; | ||
10 | size_t copied; | ||
11 | int errno; | ||
12 | }; | ||
13 | |||
14 | struct rpc_pipe_ops { | ||
15 | ssize_t (*upcall)(struct file *, struct rpc_pipe_msg *, char __user *, size_t); | ||
16 | ssize_t (*downcall)(struct file *, const char __user *, size_t); | ||
17 | void (*release_pipe)(struct inode *); | ||
18 | void (*destroy_msg)(struct rpc_pipe_msg *); | ||
19 | }; | ||
20 | |||
21 | struct rpc_inode { | ||
22 | struct inode vfs_inode; | ||
23 | void *private; | ||
24 | struct list_head pipe; | ||
25 | struct list_head in_upcall; | ||
26 | int pipelen; | ||
27 | int nreaders; | ||
28 | int nwriters; | ||
29 | wait_queue_head_t waitq; | ||
30 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | ||
31 | int flags; | ||
32 | struct rpc_pipe_ops *ops; | ||
33 | struct work_struct queue_timeout; | ||
34 | }; | ||
35 | |||
36 | static inline struct rpc_inode * | ||
37 | RPC_I(struct inode *inode) | ||
38 | { | ||
39 | return container_of(inode, struct rpc_inode, vfs_inode); | ||
40 | } | ||
41 | |||
42 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | ||
43 | |||
44 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); | ||
45 | extern int rpc_rmdir(char *); | ||
46 | extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags); | ||
47 | extern int rpc_unlink(char *); | ||
48 | |||
49 | #endif | ||
50 | #endif | ||