summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2002-10-11 05:40:05 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-10-11 05:40:05 -0700
commit04ffa5502c5cd8b1f1b1b0ea4425600fa4258660 (patch)
tree9d9d87c9403e4f7cb5405dde47f594988b717fb9 /include/linux
parentea2212232c15d28b58e817d374c7986b0190d7d4 (diff)
[PATCH] kNFSd: Create files: /proc/net/rpc/$CACHENAME/channel for communicating cache updates with kernel
Each cache gets it's own 'channel' at /proc/net/rpc/$CACHENAME/channel Reads from the file will return all pending requests, one at a time. select will block when at end of file. writes will pass full lines in to be processed.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sunrpc/cache.h7
-rw-r--r--include/linux/sunrpc/stats.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index ef69dfa21817..c501845cac0a 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <asm/atomic.h>
+#include <linux/proc_fs.h>
/*
* Each cache requires:
@@ -74,6 +75,8 @@ struct cache_detail {
/* request and update functions for interaction with userspace
* will go here
*/
+ int (*cache_parse)(struct cache_detail *,
+ char *buf, int len);
/* fields below this comment are for internal use
* and should not be touched by cache owners
@@ -83,6 +86,10 @@ struct cache_detail {
struct list_head others;
time_t nextcheck;
int entries;
+
+ /* fields for communication over channel */
+ struct list_head queue;
+ struct proc_dir_entry *proc_ent;
};
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index 13c7989d67d7..8553d06059bd 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -57,6 +57,8 @@ int svc_proc_read(char *, char **, off_t, int,
int *, void *);
void svc_proc_zero(struct svc_program *);
+extern struct proc_dir_entry *proc_net_rpc;
+
#else
static inline void svc_proc_unregister(const char *p) {}