Skip to content

Commit

Permalink
SUNRPC: Don't reencode message if transmission failed with ENOBUFS
Browse files Browse the repository at this point in the history
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: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Jul 3, 2015
1 parent b4839eb commit 93aa6c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,7 @@ call_transmit_status(struct rpc_task *task)

switch (task->tk_status) {
case -EAGAIN:
case -ENOBUFS:
break;
default:
dprint_status(task);
Expand All @@ -1928,7 +1929,6 @@ call_transmit_status(struct rpc_task *task)
case -ECONNABORTED:
case -EADDRINUSE:
case -ENOTCONN:
case -ENOBUFS:
case -EPIPE:
rpc_task_force_reencode(task);
}
Expand Down Expand Up @@ -2057,12 +2057,13 @@ call_status(struct rpc_task *task)
case -ECONNABORTED:
rpc_force_rebind(clnt);
case -EADDRINUSE:
case -ENOBUFS:
rpc_delay(task, 3*HZ);
case -EPIPE:
case -ENOTCONN:
task->tk_action = call_bind;
break;
case -ENOBUFS:
rpc_delay(task, HZ>>2);
case -EAGAIN:
task->tk_action = call_transmit;
break;
Expand Down

0 comments on commit 93aa6c7

Please sign in to comment.