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>
This commit is contained in:
@ -70,9 +70,9 @@ struct cache_detail {
|
||||
char *name;
|
||||
void (*cache_put)(struct kref *);
|
||||
|
||||
void (*cache_request)(struct cache_detail *cd,
|
||||
struct cache_head *h,
|
||||
char **bpp, int *blen);
|
||||
int (*cache_upcall)(struct cache_detail *,
|
||||
struct cache_head *);
|
||||
|
||||
int (*cache_parse)(struct cache_detail *,
|
||||
char *buf, int len);
|
||||
|
||||
@ -135,6 +135,13 @@ extern struct cache_head *
|
||||
sunrpc_cache_update(struct cache_detail *detail,
|
||||
struct cache_head *new, struct cache_head *old, int hash);
|
||||
|
||||
extern int
|
||||
sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h,
|
||||
void (*cache_request)(struct cache_detail *,
|
||||
struct cache_head *,
|
||||
char **,
|
||||
int *));
|
||||
|
||||
|
||||
extern void cache_clean_deferred(void *owner);
|
||||
|
||||
|
Reference in New Issue
Block a user