提交 93aa6c7b 编写于 作者: T Trond Myklebust

SUNRPC: Don't reencode message if transmission failed with ENOBUFS

If we're running out of buffer memory when transmitting data, then
we want to just delay for a moment, and then continue transmitting
the remainder of the message.
Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
上级 b4839ebe
...@@ -1902,6 +1902,7 @@ call_transmit_status(struct rpc_task *task) ...@@ -1902,6 +1902,7 @@ call_transmit_status(struct rpc_task *task)
switch (task->tk_status) { switch (task->tk_status) {
case -EAGAIN: case -EAGAIN:
case -ENOBUFS:
break; break;
default: default:
dprint_status(task); dprint_status(task);
...@@ -1928,7 +1929,6 @@ call_transmit_status(struct rpc_task *task) ...@@ -1928,7 +1929,6 @@ call_transmit_status(struct rpc_task *task)
case -ECONNABORTED: case -ECONNABORTED:
case -EADDRINUSE: case -EADDRINUSE:
case -ENOTCONN: case -ENOTCONN:
case -ENOBUFS:
case -EPIPE: case -EPIPE:
rpc_task_force_reencode(task); rpc_task_force_reencode(task);
} }
...@@ -2057,12 +2057,13 @@ call_status(struct rpc_task *task) ...@@ -2057,12 +2057,13 @@ call_status(struct rpc_task *task)
case -ECONNABORTED: case -ECONNABORTED:
rpc_force_rebind(clnt); rpc_force_rebind(clnt);
case -EADDRINUSE: case -EADDRINUSE:
case -ENOBUFS:
rpc_delay(task, 3*HZ); rpc_delay(task, 3*HZ);
case -EPIPE: case -EPIPE:
case -ENOTCONN: case -ENOTCONN:
task->tk_action = call_bind; task->tk_action = call_bind;
break; break;
case -ENOBUFS:
rpc_delay(task, HZ>>2);
case -EAGAIN: case -EAGAIN:
task->tk_action = call_transmit; task->tk_action = call_transmit;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册