From 04ffa5502c5cd8b1f1b1b0ea4425600fa4258660 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 11 Oct 2002 05:40:05 -0700 Subject: [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. --- include/linux/sunrpc/cache.h | 7 +++++++ include/linux/sunrpc/stats.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'include/linux') 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 #include +#include /* * 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) {} -- cgit v1.2.3