summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/sched.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2017-08-13 17:03:59 +0300
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-08-16 22:10:15 +0300
commit729749bb8da186e68d97d1b0439f0b1e0059c41d (patch)
treec1d450aa081919168535f06755247f022a09a517 /include/linux/sunrpc/sched.h
parent2ce209c42c01ca976ad680fea52a8e8b9a53643b (diff)
downloadlinux-729749bb8da186e68d97d1b0439f0b1e0059c41d.tar.xz
SUNRPC: Don't hold the transport lock across socket copy operations
Instead add a mechanism to ensure that the request doesn't disappear from underneath us while copying from the socket. We do this by preventing xprt_release() from freeing the XDR buffers until the flag RPC_TASK_MSG_RECV has been cleared from the request. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc/sched.h')
-rw-r--r--include/linux/sunrpc/sched.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index 50a99a117da7..c1768f9d993b 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -139,6 +139,8 @@ struct rpc_task_setup {
#define RPC_TASK_RUNNING 0
#define RPC_TASK_QUEUED 1
#define RPC_TASK_ACTIVE 2
+#define RPC_TASK_MSG_RECV 3
+#define RPC_TASK_MSG_RECV_WAIT 4
#define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
#define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)