1 #ifndef _LINUX_SUNRPC_RPC_PIPE_FS_H
2 #define _LINUX_SUNRPC_RPC_PIPE_FS_H
6 #include <linux/workqueue.h>
17 ssize_t (*upcall
)(struct file
*, struct rpc_pipe_msg
*, char __user
*, size_t);
18 ssize_t (*downcall
)(struct file
*, const char __user
*, size_t);
19 void (*release_pipe
)(struct inode
*);
20 int (*open_pipe
)(struct inode
*);
21 void (*destroy_msg
)(struct rpc_pipe_msg
*);
25 struct list_head pipe
;
26 struct list_head in_upcall
;
27 struct list_head in_downcall
;
31 #define RPC_PIPE_WAIT_FOR_OPEN 1
33 struct delayed_work queue_timeout
;
34 const struct rpc_pipe_ops
*ops
;
36 struct dentry
*dentry
;
40 struct inode vfs_inode
;
42 struct rpc_pipe
*pipe
;
43 wait_queue_head_t waitq
;
46 static inline struct rpc_inode
*
47 RPC_I(struct inode
*inode
)
49 return container_of(inode
, struct rpc_inode
, vfs_inode
);
53 SUNRPC_PIPEFS_NFS_PRIO
,
54 SUNRPC_PIPEFS_RPC_PRIO
,
57 extern int rpc_pipefs_notifier_register(struct notifier_block
*);
58 extern void rpc_pipefs_notifier_unregister(struct notifier_block
*);
65 extern struct dentry
*rpc_d_lookup_sb(const struct super_block
*sb
,
66 const unsigned char *dir_name
);
67 extern void rpc_pipefs_init_net(struct net
*net
);
68 extern struct super_block
*rpc_get_sb_net(const struct net
*net
);
69 extern void rpc_put_sb_net(const struct net
*net
);
71 extern ssize_t
rpc_pipe_generic_upcall(struct file
*, struct rpc_pipe_msg
*,
72 char __user
*, size_t);
73 extern int rpc_queue_upcall(struct rpc_pipe
*, struct rpc_pipe_msg
*);
76 extern struct dentry
*rpc_create_client_dir(struct dentry
*, struct qstr
*, struct rpc_clnt
*);
77 extern int rpc_remove_client_dir(struct dentry
*);
80 extern struct dentry
*rpc_create_cache_dir(struct dentry
*,
83 struct cache_detail
*);
84 extern void rpc_remove_cache_dir(struct dentry
*);
86 extern int rpc_rmdir(struct dentry
*dentry
);
88 struct rpc_pipe
*rpc_mkpipe_data(const struct rpc_pipe_ops
*ops
, int flags
);
89 void rpc_destroy_pipe_data(struct rpc_pipe
*pipe
);
90 extern struct dentry
*rpc_mkpipe_dentry(struct dentry
*, const char *, void *,
92 extern int rpc_unlink(struct dentry
*);
93 extern int register_rpc_pipefs(void);
94 extern void unregister_rpc_pipefs(void);