From: Jeff Layton <jlayton@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: chuck.lever@oracle.com,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFSv4 mounts take longer the fail from ENETUNREACH than NFSv3 mounts.
Date: Wed, 20 Oct 2010 20:45:32 -0400 [thread overview]
Message-ID: <20101020204532.2019eb93@corrin.poochiereds.net> (raw)
In-Reply-To: <20101021074028.44bca336@notabene>
On Thu, 21 Oct 2010 07:40:28 +1100
Neil Brown <neilb@suse.de> wrote:
> >
> > Then what happens is that xs_tcp_send_request gets called again to try
> > to resend the packet. In the EHOSTUNREACH case, that returns
> > EHOSTUNREACH which eventually causes an rpc_exit with that error. In
> > the ENETUNREACH case that returns EPIPE, which makes the state machine
> > move next to call_bind and the whole thing starts over again.
>
> This confuses me. Why would xs_tcp_send_request (aka ->send_request) get
> called before the connect has succeeded? Can you make sense of that?
>
It confuses me too. I suspect that this may actually be a bug...
So EINPROGRESS makes the connect_worker task clear the connecting bit
and return. Eventually, the EHOSTUNREACH error is reported to
xs_error_report. That function does this:
xprt_wake_pending_tasks(xprt, -EAGAIN);
The task that was waiting on the connect_worker is then woken up.
call_connect_status does this:
if (status >= 0 || status == -EAGAIN) {
clnt->cl_stats->netreconn++;
task->tk_action = call_transmit;
return;
}
...and we end up in call_transmit without the socket being connected.
So I understand how this happened, but I don't really understand the
design of the connect mechanism well enough to know whether this is
by design or not.
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2010-10-21 0:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 7:17 NFSv4 mounts take longer the fail from ENETUNREACH than NFSv3 mounts Neil Brown
2010-10-20 14:29 ` Chuck Lever
2010-10-20 21:29 ` Neil Brown
2010-10-21 0:56 ` Neil Brown
2010-10-21 12:09 ` Jeff Layton
2010-10-21 13:52 ` Chuck Lever
2010-10-21 14:10 ` Chuck Lever
2010-10-20 17:55 ` Jeff Layton
2010-10-20 19:16 ` Jeff Layton
2010-10-20 20:40 ` Neil Brown
2010-10-21 0:45 ` Jeff Layton [this message]
2010-10-21 3:25 ` Neil Brown
2010-10-21 14:05 ` Trond Myklebust
2010-10-21 14:31 ` Chuck Lever
2010-10-21 14:42 ` Trond Myklebust
2010-10-21 19:40 ` Jeff Layton
2010-10-21 19:47 ` Trond Myklebust
2010-10-21 20:08 ` Jeff Layton
2010-10-21 20:18 ` Trond Myklebust
2011-03-23 6:41 ` 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=20101020204532.2019eb93@corrin.poochiereds.net \
--to=jlayton@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).