提交 45b4310b 编写于 作者: T Trond Myklebust 提交者: Yang Yingliang

SUNRPC: Make "no retrans timeout" soft tasks behave like softconn for timeouts

mainline inclusion
from mainline-5.2-rc1
commit e4ec48d3
category: bugfix
bugzilla: 51818
CVE: NA

-------------------------------------------------

If a soft NFSv4 request is sent, then we don't need it to time out unless
the connection breaks. The reason is that as long as the connection is
unbroken, the protocol states that the server is not allowed to drop the
request.  IOW: as long as the connection remains unbroken, the client may
assume that all transmitted RPC requests are being processed by the server,
and that retransmissions and timeouts of those requests are unwarranted.
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 8d373da6
...@@ -2229,6 +2229,15 @@ call_timeout(struct rpc_task *task) ...@@ -2229,6 +2229,15 @@ call_timeout(struct rpc_task *task)
} }
if (RPC_IS_SOFT(task)) { if (RPC_IS_SOFT(task)) {
/*
* Once a "no retrans timeout" soft tasks (a.k.a NFSv4) has
* been sent, it should time out only if the transport
* connection gets terminally broken.
*/
if ((task->tk_flags & RPC_TASK_NO_RETRANS_TIMEOUT) &&
rpc_check_connected(task->tk_rqstp))
return;
if (clnt->cl_chatty) { if (clnt->cl_chatty) {
printk(KERN_NOTICE "%s: server %s not responding, timed out\n", printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
clnt->cl_program->name, clnt->cl_program->name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册