All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: Chuck Lever <chuck.lever@oracle.com>,
	NFS <linux-nfs@vger.kernel.org>,
	Carsten Ziepke <kieltux@gmail.com>
Subject: Re: [PATCH - nfs-utils] Fix fallback from tcp to udp
Date: Thu, 20 Feb 2014 12:50:15 -0500	[thread overview]
Message-ID: <53064057.70703@RedHat.com> (raw)
In-Reply-To: <20140218104307.34205fc8@notabene.brown>



On 02/17/2014 06:43 PM, NeilBrown wrote:
> 
> Protocol negotiation in mount.nfs does not correctly negotiate with a
> server which only support NFSv3 and UDP.
> 
> When mount.nfs attempts an NFSv4 mount and fails with ECONNREFUSED
> it does not fall back to NFSv3, as this is not recognised as a
> "does not support NFSv4" error.
> However ECONNREFUSED is a clear indication that the server doesn't
> support TCP, and ipso facto does not support NFSv4.
> So ECONNREFUSED should trigger a fallback from v4 to v2/3.
I'm also pretty this is the error returned when the server is 
down or more pointy when server is rebooting... Do we really
want to fallback at this point?

Secondly, its worrisome to me that we keep making this fallback
list longer and longer... we really don't want to fall back
to v3 but I do understand we want to be compatible with 
older servers... 

steved. 
> 
> Once we allow that error, NFSv3 is attempted and mount.nfs talks to
> rpcbind and discovers that UDP should be used for v3 and the mount
> succeeds.
> 
> Signed-off-by: NeilBrown <neilb@suse.de>
> Reported-by: Carsten Ziepke <kieltux@gmail.com>
> 
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index a642394d2f5a..6d4fd70b7b9e 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -807,6 +807,9 @@ static int nfs_autonegotiate(struct nfsmount_info *mi)
>  		/* Linux servers prior to 2.6.25 may return
>  		 * EPERM when NFS version 4 is not supported. */
>  		goto fall_back;
> +	case ECONNREFUSED:
> +		/* UDP-Only servers won't support v4 */
> +		goto fall_back;
>  	default:
>  		return result;
>  	}
> 

  reply	other threads:[~2014-02-20 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-17 23:43 [PATCH - nfs-utils] Fix fallback from tcp to udp NeilBrown
2014-02-20 17:50 ` Steve Dickson [this message]
2014-02-20 20:37   ` J. Bruce Fields
2014-02-20 20:42     ` J. Bruce Fields
2014-02-21  3:26     ` NeilBrown
2014-02-21 14:59       ` J. Bruce Fields
2014-02-21 15:22         ` Chuck Lever

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=53064057.70703@RedHat.com \
    --to=steved@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=kieltux@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.