linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kinglong Mee <kinglongmee@gmail.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Steve Dickson <SteveD@redhat.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] mount: make sure mounting nfs with v4,vers=4 and nfsvers=4
Date: Mon, 13 Apr 2015 20:21:51 +0800	[thread overview]
Message-ID: <552BB4DF.2090200@gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.19.9992.1504130805140.4187@planck.local>

On 4/13/2015 8:16 PM, Benjamin Coddington wrote:
> Hi Kinglong,  I can't seem to figure out how to reproduce your problem, and
> I don't see show this change fixes it.  Your mount is falling back to a v3
> attempt without this patch?  What's set in nfsmount.conf?

Sorry for my missing notes for nfsmount.conf.
My nfsmount.conf is default config, 
besides [ NFSMount_Global_Options ], others line are commented by "#",
Defaultvers isn't set as, "# Defaultvers=4"

thanks,
Kinglong Mee

> 
> Ben
> 
> On Sun, 12 Apr 2015, Kinglong Mee wrote:
> 
>> When mounting nfs with -ov4, -overs=4 or -onfsvers=4, fail as,
>>
>> # mount -t nfs -ov4 192.168.31.12:/ /testidr/
>> mount.nfs: access denied by server while mounting 192.168.31.12:/
>>
>> Fixes: f980298853 "mount.nfs: configurable minor version defaults"
>> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
>> ---
>>  utils/mount/stropts.c | 12 +++---------
>>  1 file changed, 3 insertions(+), 9 deletions(-)
>>
>> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
>> index df67fac..2ae532e 100644
>> --- a/utils/mount/stropts.c
>> +++ b/utils/mount/stropts.c
>> @@ -108,12 +108,6 @@ static void nfs_default_version(struct nfsmount_info *mi)
>>  		return;
>>  	}
>>
>> -	if (mi->version.v_mode == V_GENERAL &&
>> -		config_default_vers.v_mode == V_DEFAULT) {
>> -		mi->version.v_mode = V_SPECIFIC;
>> -		return;
>> -	}
>> -
>>  	if (mi->version.v_mode == V_DEFAULT &&
>>  		config_default_vers.v_mode != V_DEFAULT) {
>>  		mi->version.major = config_default_vers.major;
>> @@ -121,9 +115,9 @@ static void nfs_default_version(struct nfsmount_info *mi)
>>  		return;
>>  	}
>>
>> -	if (mi->version.v_mode == V_GENERAL &&
>> -		config_default_vers.v_mode != V_DEFAULT) {
>> -		if (mi->version.major == config_default_vers.major)
>> +	if (mi->version.v_mode == V_GENERAL) {
>> +		if (config_default_vers.v_mode != V_DEFAULT &&
>> +		    mi->version.major == config_default_vers.major)
>>  			mi->version.minor = config_default_vers.minor;
>>  		return;
>>  	}
>> --
>> 2.3.5
>>
>>
> 

  reply	other threads:[~2015-04-13 12:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12 12:04 [PATCH] mount: make sure mounting nfs with v4,vers=4 and nfsvers=4 Kinglong Mee
2015-04-13 12:16 ` Benjamin Coddington
2015-04-13 12:21   ` Kinglong Mee [this message]
2015-04-13 12:43     ` Benjamin Coddington
2015-05-06 13:36       ` Kinglong Mee
2015-05-06 18:37         ` Steve Dickson
2015-05-07 14:13 ` 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=552BB4DF.2090200@gmail.com \
    --to=kinglongmee@gmail.com \
    --cc=SteveD@redhat.com \
    --cc=bcodding@redhat.com \
    --cc=linux-nfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).