diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-24 12:19:19 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-09-26 16:29:29 -0400 |
commit | 0162ac2b978e18792fa8cf3c0b4304321b4a3983 (patch) | |
tree | 7b395d5baedb818afce87ec4142ea6c767ccf187 /fs/nfsd/state.h | |
parent | f0b5de1b6b8b66552bcc7ae692f45940d411cf05 (diff) |
nfsd: introduce nfsd4_callback_ops
Add a higher level abstraction than the rpc_ops for callback operations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 3c3a1903b4fa..bf52dc7b15e7 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -66,11 +66,17 @@ struct nfsd4_callback { struct list_head cb_per_client; u32 cb_minorversion; struct rpc_message cb_msg; - const struct rpc_call_ops *cb_ops; + struct nfsd4_callback_ops *cb_ops; struct work_struct cb_work; bool cb_done; }; +struct nfsd4_callback_ops { + void (*prepare)(struct nfsd4_callback *); + int (*done)(struct nfsd4_callback *, struct rpc_task *); + void (*release)(struct nfsd4_callback *); +}; + /* * A core object that represents a "common" stateid. These are generally * embedded within the different (more specific) stateid objects and contain @@ -538,13 +544,11 @@ extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir, extern __be32 nfs4_check_open_reclaim(clientid_t *clid, struct nfsd4_compound_state *cstate, struct nfsd_net *nn); extern int set_callback_cred(void); -void nfsd4_run_cb_null(struct work_struct *w); -void nfsd4_run_cb_recall(struct work_struct *w); extern void nfsd4_probe_callback(struct nfs4_client *clp); extern void nfsd4_probe_callback_sync(struct nfs4_client *clp); extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *); extern void nfsd4_init_cb(struct nfsd4_callback *cb, struct nfs4_client *clp, - enum nfsd4_cb_op op); + struct nfsd4_callback_ops *ops, enum nfsd4_cb_op op); extern void nfsd4_run_cb(struct nfsd4_callback *cb); extern int nfsd4_create_callback_queue(void); extern void nfsd4_destroy_callback_queue(void); |