From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: steved@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] mount.nfs: Assume v2/v3 if mount-related options are present
Date: Thu, 08 Oct 2009 13:45:29 -0400 [thread overview]
Message-ID: <1255023929.11961.7.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20091008173712.12619.45807.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
On Thu, 2009-10-08 at 13:37 -0400, Chuck Lever wrote:
> Don't try NFSv4 if any MNT protocol related options were presented by
> the user.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> utils/mount/stropts.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index 0685caa..3401f63 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -564,6 +564,13 @@ static int nfs_try_mount_v4(struct nfsmount_info *mi)
> }
>
> if (mi->version == 0) {
> + if (po_contains(options, "mounthost") ||
> + po_contains(options, "mountaddr") ||
> + po_contains(options, "mountvers") ||
> + po_contains(options, "mountproto")) {
> + errno = EPROTONOSUPPORT;
Shouldn't this be EINVAL ?
> + goto out_fail;
> + }
> if (po_append(options, "vers=4") == PO_FAILED) {
> errno = EINVAL;
> goto out_fail;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-10-08 17:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 17:36 [PATCH 0/2] Two minor bug fixes Chuck Lever
[not found] ` <20091008173520.12619.10662.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2009-10-08 17:37 ` [PATCH 1/2] mount: ECONNREFUSED is a permanent error Chuck Lever
[not found] ` <20091008173703.12619.35788.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2009-10-09 13:16 ` Steve Dickson
[not found] ` <4ACF37C2.6030208-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-10-09 15:13 ` Chuck Lever
[not found] ` <DDBA069F-E9B8-4BE3-B13C-2B69406C3C9A-MouhYhfBpPxXrIkS9f7CXA@public.gmane.org>
2009-10-09 15:20 ` Steve Dickson
[not found] ` <4ACF54B4.9020900-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-10-09 15:45 ` Chuck Lever
2009-10-09 16:33 ` Ian Kent
2009-11-16 18:13 ` Steve Dickson
[not found] ` <4B019664.3020002-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-11-16 18:16 ` Chuck Lever
[not found] ` <E5331E4C-EE5B-4C60-9330-1B81F2FA065B-MouhYhfBpPxXrIkS9f7CXA@public.gmane.org>
2009-11-16 19:47 ` Steve Dickson
2009-10-08 17:37 ` [PATCH 2/2] mount.nfs: Assume v2/v3 if mount-related options are present Chuck Lever
[not found] ` <20091008173712.12619.45807.stgit-RytpoXr2tKZ9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2009-10-08 17:45 ` Trond Myklebust [this message]
[not found] ` <1255023929.11961.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-10-08 17:51 ` Chuck Lever
2009-10-09 13:29 ` Steve Dickson
[not found] ` <4ACF3AD1.2080802-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-10-09 15:03 ` Chuck Lever
2009-10-09 15:12 ` Steve Dickson
[not found] ` <4ACF52E2.6060501-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-10-09 15:18 ` Chuck Lever
2009-11-16 17:54 ` Steve Dickson
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=1255023929.11961.7.camel@heimdal.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.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