From: Trond Myklebust <trond.myklebust@primarydata.com>
To: Neil Brown <neilb@suse.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 1/2] SUNRPC: Don't reencode message if transmission failed with ENOBUFS
Date: Fri, 3 Jul 2015 09:49:38 -0400 [thread overview]
Message-ID: <1435931379-6654-2-git-send-email-trond.myklebust@primarydata.com> (raw)
In-Reply-To: <1435931379-6654-1-git-send-email-trond.myklebust@primarydata.com>
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>
---
net/sunrpc/clnt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index cbc6af923dd1..23608eb0ded2 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1902,6 +1902,7 @@ call_transmit_status(struct rpc_task *task)
switch (task->tk_status) {
case -EAGAIN:
+ case -ENOBUFS:
break;
default:
dprint_status(task);
@@ -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);
}
@@ -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;
--
2.4.3
next prev parent reply other threads:[~2015-07-03 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 4:26 [PATCH] SUNRPC: handle -EAGAIN from socket writes better NeilBrown
2015-07-03 13:49 ` Trond Myklebust
2015-07-03 13:49 ` Trond Myklebust [this message]
2015-07-03 13:49 ` [PATCH 2/2] SUNRPC: Don't confuse ENOBUFS with a write_space issue Trond Myklebust
2015-07-06 1:26 ` [PATCH] SUNRPC: handle -EAGAIN from socket writes better NeilBrown
2015-07-06 13:36 ` Trond Myklebust
2015-07-07 21:01 ` NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435931379-6654-2-git-send-email-trond.myklebust@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox