aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-09 15:14:29 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-09 15:14:29 -0400
commitbc74b4f5e63a09fb78e245794a0de1e5a2716bbe (patch)
tree5e96e63fd69303162456549f12bff5f9b2ee2a22 /include/linux
parentda77005f0d64486cd760f43d9b7cc2379262a363 (diff)
SUNRPC: Allow the cache_detail to specify alternative upcall mechanisms
For events that are rare, such as referral DNS lookups, it makes limited sense to have a daemon constantly listening for upcalls on a channel. An alternative in those cases might simply be to run the app that fills the cache using call_usermodehelper_exec() and friends. The following patch allows the cache_detail to specify alternative upcall mechanisms for these particular cases. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sunrpc/cache.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index 3d1fad22185a..23ee25981a0c 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -70,9 +70,9 @@ struct cache_detail {
70 char *name; 70 char *name;
71 void (*cache_put)(struct kref *); 71 void (*cache_put)(struct kref *);
72 72
73 void (*cache_request)(struct cache_detail *cd, 73 int (*cache_upcall)(struct cache_detail *,
74 struct cache_head *h, 74 struct cache_head *);
75 char **bpp, int *blen); 75
76 int (*cache_parse)(struct cache_detail *, 76 int (*cache_parse)(struct cache_detail *,
77 char *buf, int len); 77 char *buf, int len);
78 78
@@ -135,6 +135,13 @@ extern struct cache_head *
135sunrpc_cache_update(struct cache_detail *detail, 135sunrpc_cache_update(struct cache_detail *detail,
136 struct cache_head *new, struct cache_head *old, int hash); 136 struct cache_head *new, struct cache_head *old, int hash);
137 137
138extern int
139sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h,
140 void (*cache_request)(struct cache_detail *,
141 struct cache_head *,
142 char **,
143 int *));
144
138 145
139extern void cache_clean_deferred(void *owner); 146extern void cache_clean_deferred(void *owner);
140 147