aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/bind.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockd/bind.h')
-rw-r--r--include/linux/lockd/bind.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h
index 140edab64446..05728396a1a1 100644
--- a/include/linux/lockd/bind.h
+++ b/include/linux/lockd/bind.h
@@ -18,6 +18,7 @@
18 18
19/* Dummy declarations */ 19/* Dummy declarations */
20struct svc_rqst; 20struct svc_rqst;
21struct rpc_task;
21 22
22/* 23/*
23 * This is the set of functions for lockd->nfsd communication 24 * This is the set of functions for lockd->nfsd communication
@@ -43,6 +44,7 @@ struct nlmclnt_initdata {
43 u32 nfs_version; 44 u32 nfs_version;
44 int noresvport; 45 int noresvport;
45 struct net *net; 46 struct net *net;
47 const struct nlmclnt_operations *nlmclnt_ops;
46}; 48};
47 49
48/* 50/*
@@ -52,8 +54,26 @@ struct nlmclnt_initdata {
52extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init); 54extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
53extern void nlmclnt_done(struct nlm_host *host); 55extern void nlmclnt_done(struct nlm_host *host);
54 56
55extern int nlmclnt_proc(struct nlm_host *host, int cmd, 57/*
56 struct file_lock *fl); 58 * NLM client operations provide a means to modify RPC processing of NLM
59 * requests. Callbacks receive a pointer to data passed into the call to
60 * nlmclnt_proc().
61 */
62struct nlmclnt_operations {
63 /* Called on successful allocation of nlm_rqst, use for allocation or
64 * reference counting. */
65 void (*nlmclnt_alloc_call)(void *);
66
67 /* Called in rpc_task_prepare for unlock. A return value of true
68 * indicates the callback has put the task to sleep on a waitqueue
69 * and NLM should not call rpc_call_start(). */
70 bool (*nlmclnt_unlock_prepare)(struct rpc_task*, void *);
71
72 /* Called when the nlm_rqst is freed, callbacks should clean up here */
73 void (*nlmclnt_release_call)(void *);
74};
75
76extern int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data);
57extern int lockd_up(struct net *net); 77extern int lockd_up(struct net *net);
58extern void lockd_down(struct net *net); 78extern void lockd_down(struct net *net);
59 79