From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: chuck.lever@oracle.com
Cc: Florin Iucha <florin@iucha.net>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Adrian Bunk <bunk@stusta.de>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] 2.6.21-rc7 NFS writes: fix a series of issues
Date: Thu, 19 Apr 2007 11:17:28 -0400 [thread overview]
Message-ID: <1176995848.6663.1.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <462786C9.7090405@oracle.com>
On Thu, 2007-04-19 at 11:12 -0400, Chuck Lever wrote:
> Perhaps instead of looking at the number of bytes sent, the logic in the
> last hunk of this patch should check which queue the request is sitting on.
??? It would be a bug for the request to be sitting on _any_ queue when
it enters xprt_transmit().
Here is the patch that I'm currently testing.
Cheers
Trond
---------------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Thu, 19 Apr 2007 09:55:44 -0400
RPC: Fix the TCP resend semantics for NFSv4
Fix a regression due to the patch "NFS: disconnect before retrying NFSv4
requests over TCP"
The assumption made in xprt_transmit() that the condition
"req->rq_bytes_sent == 0 and request is on the receive list"
should imply that we're dealing with a retransmission is false.
Firstly, it may simply happen that the socket send queue was full
at the time the request was initially sent through xprt_transmit().
Secondly, doing this for each request that was retransmitted implies
that we disconnect and reconnect for _every_ request that happened to
be retransmitted irrespective of whether or not a disconnection has
already occurred.
Fix is to move this logic into the call_status request timeout handler.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
net/sunrpc/clnt.c | 4 ++++
net/sunrpc/xprt.c | 10 ----------
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 6d7221f..396cdbe 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1046,6 +1046,8 @@ call_status(struct rpc_task *task)
rpc_delay(task, 3*HZ);
case -ETIMEDOUT:
task->tk_action = call_timeout;
+ if (task->tk_client->cl_discrtry)
+ xprt_disconnect(task->tk_xprt);
break;
case -ECONNREFUSED:
case -ENOTCONN:
@@ -1169,6 +1171,8 @@ call_decode(struct rpc_task *task)
out_retry:
req->rq_received = req->rq_private_buf.len = 0;
task->tk_status = 0;
+ if (task->tk_client->cl_discrtry)
+ xprt_disconnect(task->tk_xprt);
}
/*
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index ee6ffa0..456a145 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -735,16 +735,6 @@ void xprt_transmit(struct rpc_task *task)
xprt_reset_majortimeo(req);
/* Turn off autodisconnect */
del_singleshot_timer_sync(&xprt->timer);
- } else {
- /* If all request bytes have been sent,
- * then we must be retransmitting this one */
- if (!req->rq_bytes_sent) {
- if (task->tk_client->cl_discrtry) {
- xprt_disconnect(xprt);
- task->tk_status = -ENOTCONN;
- return;
- }
- }
}
} else if (!req->rq_bytes_sent)
return;
next prev parent reply other threads:[~2007-04-19 15:17 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070416125905.GA2769@iucha.net>
[not found] ` <1176736734.6761.45.camel@heimdal.trondhjem.org>
[not found] ` <Pine.LNX.4.64.0704160904560.5473@woody.linux-foundation.org>
[not found] ` <1176740307.6761.56.camel@heimdal.trondhjem.org>
[not found] ` <1176741408.6761.62.camel@heimdal.trondhjem.org>
[not found] ` <1176792399.3035.30.camel@twins>
[not found] ` <1176796503.3035.33.camel@twins>
2007-04-17 17:01 ` nfs: desynchronized value of nfs_i.ncommit OGAWA Hirofumi
2007-04-17 22:44 ` Trond Myklebust
2007-04-18 1:19 ` [PATCH 0/4] 2.6.21-rc7 NFS writes: fix a series of issues Trond Myklebust
2007-04-18 1:29 ` [PATCH 1/4] NFS: clean up the unstable write code Trond Myklebust
2007-04-18 1:29 ` [PATCH 2/4] NFS: Don't clear PG_writeback until after we've processed unstable writes Trond Myklebust
2007-04-18 1:29 ` [PATCH 3/4] NFS: Fix the 'desynchronized value of nfs_i.ncommit' error Trond Myklebust
2007-04-18 1:29 ` [PATCH 4/4] NFS: Fix race in nfs_set_page_dirty Trond Myklebust
2007-04-18 2:58 ` [PATCH 0/4] 2.6.21-rc7 NFS writes: fix a series of issues Andrew Morton
2007-04-18 3:06 ` Trond Myklebust
2007-04-18 3:30 ` Florin Iucha
2007-04-18 3:54 ` Trond Myklebust
2007-04-18 4:07 ` Florin Iucha
2007-04-18 4:13 ` Andrew Morton
2007-04-18 4:30 ` Florin Iucha
2007-04-18 5:14 ` Linus Torvalds
2007-04-18 5:26 ` Florin Iucha
2007-04-18 5:37 ` Andrew Morton
2007-04-18 12:38 ` Florin Iucha
2007-04-18 13:15 ` Trond Myklebust
2007-04-18 13:42 ` Florin Iucha
2007-04-18 14:11 ` Trond Myklebust
2007-04-18 14:17 ` Florin Iucha
2007-04-18 14:19 ` Trond Myklebust
2007-04-19 1:52 ` Florin Iucha
2007-04-19 2:45 ` Trond Myklebust
2007-04-19 4:38 ` Success! Was: " Florin Iucha
2007-04-19 15:12 ` Chuck Lever
2007-04-19 15:17 ` Trond Myklebust [this message]
2007-04-19 15:50 ` Florin Iucha
2007-04-19 16:09 ` Trond Myklebust
2007-04-19 19:58 ` Failure! " Florin Iucha
2007-04-19 21:30 ` Trond Myklebust
2007-04-19 21:49 ` Florin Iucha
2007-04-20 13:30 ` Success! Was: " Florin Iucha
2007-04-20 13:37 ` Trond Myklebust
2007-04-20 13:51 ` Florin Iucha
2007-04-18 14:14 ` Florin Iucha
2007-04-29 19:41 ` Rogier Wolff
2007-04-29 20:09 ` Peter Zijlstra
2007-04-18 11:38 ` Trond Myklebust
2007-04-18 9:54 ` OGAWA Hirofumi
2007-04-18 8:19 ` Peter Zijlstra
2007-04-18 16:41 ` Peter Zijlstra
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=1176995848.6663.1.camel@heimdal.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=chuck.lever@oracle.com \
--cc=florin@iucha.net \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®