Commit aae2006e authored by Andy Adamson's avatar Andy Adamson Committed by Benny Halevy

nfs41: sunrpc: Export the call prepare state for session reset

Signed-off-by: Andy Adamson<andros@netapp.com>
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c3fad1b1
...@@ -143,6 +143,7 @@ int rpc_call_sync(struct rpc_clnt *clnt, ...@@ -143,6 +143,7 @@ int rpc_call_sync(struct rpc_clnt *clnt,
const struct rpc_message *msg, int flags); const struct rpc_message *msg, int flags);
struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred,
int flags); int flags);
void rpc_restart_call_prepare(struct rpc_task *);
void rpc_restart_call(struct rpc_task *); void rpc_restart_call(struct rpc_task *);
void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
size_t rpc_max_payload(struct rpc_clnt *); size_t rpc_max_payload(struct rpc_clnt *);
......
...@@ -237,6 +237,7 @@ void rpc_show_tasks(void); ...@@ -237,6 +237,7 @@ void rpc_show_tasks(void);
int rpc_init_mempool(void); int rpc_init_mempool(void);
void rpc_destroy_mempool(void); void rpc_destroy_mempool(void);
extern struct workqueue_struct *rpciod_workqueue; extern struct workqueue_struct *rpciod_workqueue;
void rpc_prepare_task(struct rpc_task *task);
static inline void rpc_exit(struct rpc_task *task, int status) static inline void rpc_exit(struct rpc_task *task, int status)
{ {
......
...@@ -694,6 +694,19 @@ void rpc_force_rebind(struct rpc_clnt *clnt) ...@@ -694,6 +694,19 @@ void rpc_force_rebind(struct rpc_clnt *clnt)
} }
EXPORT_SYMBOL_GPL(rpc_force_rebind); EXPORT_SYMBOL_GPL(rpc_force_rebind);
/*
* Restart an (async) RPC call from the call_prepare state.
* Usually called from within the exit handler.
*/
void
rpc_restart_call_prepare(struct rpc_task *task)
{
if (RPC_ASSASSINATED(task))
return;
task->tk_action = rpc_prepare_task;
}
EXPORT_SYMBOL_GPL(rpc_restart_call_prepare);
/* /*
* Restart an (async) RPC call. Usually called from within the * Restart an (async) RPC call. Usually called from within the
* exit handler. * exit handler.
......
...@@ -569,7 +569,7 @@ EXPORT_SYMBOL_GPL(rpc_delay); ...@@ -569,7 +569,7 @@ EXPORT_SYMBOL_GPL(rpc_delay);
/* /*
* Helper to call task->tk_ops->rpc_call_prepare * Helper to call task->tk_ops->rpc_call_prepare
*/ */
static void rpc_prepare_task(struct rpc_task *task) void rpc_prepare_task(struct rpc_task *task)
{ {
task->tk_ops->rpc_call_prepare(task, task->tk_calldata); task->tk_ops->rpc_call_prepare(task, task->tk_calldata);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment