summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/cache.h
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2002-10-11 05:40:10 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-11 05:40:10 -0700
commita9f2e47fa06c2f784a76c0433c93a2579fed4e08 (patch)
tree5fc2d23782919ac01f56cbe1d567c3e37a2cfec2 /include/linux/sunrpc/cache.h
parent04ffa5502c5cd8b1f1b1b0ea4425600fa4258660 (diff)
[PATCH] kNFSd: Provide generic code for making an upcall.
This code enhances 'cache_check' to try to initiate an up-call if the cache entry is not up-to-date, and also defines add_word and add_hex for formating up-call requests. See rpc-cache.txt for more detail.
Diffstat (limited to 'include/linux/sunrpc/cache.h')
-rw-r--r--include/linux/sunrpc/cache.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index c501845cac0a..7d9f0bc0f906 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -72,9 +72,9 @@ struct cache_detail {
void (*cache_put)(struct cache_head *,
struct cache_detail*);
- /* request and update functions for interaction with userspace
- * will go here
- */
+ void (*cache_request)(struct cache_detail *cd,
+ struct cache_head *h,
+ char **bpp, int *blen);
int (*cache_parse)(struct cache_detail *,
char *buf, int len);
@@ -90,6 +90,8 @@ struct cache_detail {
/* fields for communication over channel */
struct list_head queue;
struct proc_dir_entry *proc_ent;
+ atomic_t readers; /* how many time is /chennel open */
+ time_t last_close; /* it no readers, when did last close */
};
@@ -269,4 +271,7 @@ extern int cache_unregister(struct cache_detail *cd);
extern struct cache_detail *cache_find(char *name);
extern void cache_drop(struct cache_detail *detail);
+extern void add_word(char **bpp, int *lp, char *str);
+extern void add_hex(char **bpp, int *lp, char *buf, int blen);
+
#endif /* _LINUX_SUNRPC_CACHE_H_ */