linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	linux-nfs@vger.kernel.org
Cc: Chuck Lever <chuck.lever@oracle.com>,
	Bruce Fields <bfields@fieldses.com>,
	Gareth Williams <gareth@garethwilliams.me.uk>
Subject: Re: [PATCH 1/4] SUNRPC: Ensure xprt_connect_status handles all potential connection errors
Date: Thu, 02 Jan 2014 12:52:12 +0800	[thread overview]
Message-ID: <52C4F07C.6050205@gmail.com> (raw)
In-Reply-To: <1388518781-33571-1-git-send-email-trond.myklebust@primarydata.com>

Hi Trond, 

With the whole patchset, rpc.nfsd will return immediately as,
[root@localhost linux-2.6]# rpc.nfsd -N 2 -N 3
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
[root@localhost linux-2.6]# dmesg
[ 1263.249079] svc: failed to register nfsdv4 RPC service (errno 13).
[ 1263.257789] svc: failed to register nfsdv4 RPC service (errno 13).

But, I think errno 13 cannot give user the correct meaning.
As before, errno 111 (Connection refused) maybe better.

thanks,
Kinglong Mee

On 01/01/2014 03:39 AM, Trond Myklebust wrote:
> Currently, xprt_connect_status will convert connection error values such
> as ECONNREFUSED, ECONNRESET, ... into EIO, which means that they never
> get handled.
> 
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
> ---
>  net/sunrpc/xprt.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> index 04199bc8416f..ddd198e90292 100644
> --- a/net/sunrpc/xprt.c
> +++ b/net/sunrpc/xprt.c
> @@ -749,6 +749,11 @@ static void xprt_connect_status(struct rpc_task *task)
>  	}
>  
>  	switch (task->tk_status) {
> +	case -ECONNREFUSED:
> +	case -ECONNRESET:
> +	case -ECONNABORTED:
> +	case -ENETUNREACH:
> +	case -EHOSTUNREACH:
>  	case -EAGAIN:
>  		dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
>  		break;
> 


      parent reply	other threads:[~2014-01-02  4:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 17:10 Question ref Running NFS at V4 Only Gareth Williams
2013-12-23 17:39 ` J. Bruce Fields
2013-12-27 10:17   ` Kinglong Mee
2013-12-27 16:05     ` Chuck Lever
2013-12-27 18:43       ` J.;Bruce Fields
2013-12-27 19:40         ` Chuck Lever
     [not found]           ` <6E281EC9-49CB-4BDA-BDF3-7A6F4B703156@gmail.com>
2013-12-29  6:39             ` Kinglong Mee
     [not found]               ` <5D65FDE6-D1AB-442C-BFD8-141AB87FF321@gmail.com>
2013-12-29  9:11                 ` Kinglong Mee
2013-12-30 11:22                   ` Kinglong Mee
2013-12-30 11:24                     ` [PATCH 1/2] SUNRPC: supports ignoring error from svc_register Kinglong Mee
2013-12-30 11:25                     ` [PATCH 2/2] NFSD: supports nfsv4 service without rpcbind Kinglong Mee
2013-12-30 17:54                       ` Chuck Lever
2013-12-31  3:18                         ` Kinglong Mee
2013-12-31  5:17                           ` [PATCH 1/2 v2] SUNRPC/NFSD: Supports new option for ignoring the result of svc_register Kinglong Mee
2013-12-31  5:17                           ` [PATCH 2/2 v2] NFSD: Don't start lockd when only NFSv4 is running Kinglong Mee
2014-01-03 23:18                             ` J.,Bruce Fields
2014-01-06  3:28                               ` NFSD: fix compile warning without CONFIG_NFSD_V3 Kinglong Mee
2014-01-06 18:44                                 ` J.,Bruce Fields
2013-12-31 19:39                   ` [PATCH 1/4] SUNRPC: Ensure xprt_connect_status handles all potential connection errors Trond Myklebust
2013-12-31 19:39                     ` [PATCH 2/4] SUNRPC: Handle connect errors ECONNABORTED and EHOSTUNREACH Trond Myklebust
2013-12-31 19:39                       ` [PATCH 3/4] SUNRPC: Report connection error values to rpc_tasks on the pending queue Trond Myklebust
2013-12-31 19:39                         ` [PATCH 4/4] SUNRPC: Add tracepoint for socket errors Trond Myklebust
2014-01-05 19:54                           ` J. Bruce Fields
2014-01-05 20:19                             ` Trond Myklebust
2014-01-02  4:52                     ` Kinglong Mee [this message]

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=52C4F07C.6050205@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=bfields@fieldses.com \
    --cc=chuck.lever@oracle.com \
    --cc=gareth@garethwilliams.me.uk \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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;
as well as URLs for NNTP newsgroup(s).