SUNRPC: Add an rpc_pipefs front end for the sunrpc cache code
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -64,6 +64,10 @@ struct cache_detail_procfs {
|
||||
struct proc_dir_entry *flush_ent, *channel_ent, *content_ent;
|
||||
};
|
||||
|
||||
struct cache_detail_pipefs {
|
||||
struct dentry *dir;
|
||||
};
|
||||
|
||||
struct cache_detail {
|
||||
struct module * owner;
|
||||
int hash_size;
|
||||
@@ -110,6 +114,7 @@ struct cache_detail {
|
||||
|
||||
union {
|
||||
struct cache_detail_procfs procfs;
|
||||
struct cache_detail_pipefs pipefs;
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -135,6 +140,10 @@ struct cache_deferred_req {
|
||||
};
|
||||
|
||||
|
||||
extern const struct file_operations cache_file_operations_pipefs;
|
||||
extern const struct file_operations content_file_operations_pipefs;
|
||||
extern const struct file_operations cache_flush_operations_pipefs;
|
||||
|
||||
extern struct cache_head *
|
||||
sunrpc_cache_lookup(struct cache_detail *detail,
|
||||
struct cache_head *key, int hash);
|
||||
@@ -186,6 +195,10 @@ extern void cache_purge(struct cache_detail *detail);
|
||||
extern int cache_register(struct cache_detail *cd);
|
||||
extern void cache_unregister(struct cache_detail *cd);
|
||||
|
||||
extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *,
|
||||
mode_t, struct cache_detail *);
|
||||
extern void sunrpc_cache_unregister_pipefs(struct cache_detail *);
|
||||
|
||||
extern void qword_add(char **bpp, int *lp, char *str);
|
||||
extern void qword_addhex(char **bpp, int *lp, char *buf, int blen);
|
||||
extern int qword_get(char **bpp, char *dest, int bufsize);
|
||||
|
@@ -47,6 +47,14 @@ extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
|
||||
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 *);
|
||||
|
Reference in New Issue
Block a user