linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Bryan Schumaker <bjschuma@netapp.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: NFS regression in v3.5-rc1: mount.nfs yells about incorrect mount option
Date: Fri, 8 Jun 2012 15:30:47 +0200	[thread overview]
Message-ID: <20120608133047.GV12795@8bytes.org> (raw)
In-Reply-To: <20120608130352.GU12795@8bytes.org>

On Fri, Jun 08, 2012 at 03:03:52PM +0200, Joerg Roedel wrote:
> Patch attached.

Hmm, since nfs_fs_mount is now shared between nfs23 and nfs4, a better
"revert" is probably this one:

>From 3517158fc3bc5d778dcba987ac73eea6bb7a889a Mon Sep 17 00:00:00 2001
From: Joerg Roedel <joerg.roedel@amd.com>
Date: Fri, 8 Jun 2012 14:51:01 +0200
Subject: [PATCH] Revert "NFS: Let mount data parsing set the NFS version"

This reverts commit db8333519187d5974cf2ff33910c893bf8727d9f.

The original commit message says, that the version field is
"unconditionally set while parsing mount data".
Unfortunatly this is not the case and the version field may
stay 0 so that nfs_init_server returns -EPROTONOSUPPORT
causing the mount to fail.  Reverting this commit fixes the
issue.

Conflicts:

	fs/nfs/super.c

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 fs/nfs/super.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index ff656c0..d7a237d 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -948,7 +948,7 @@ static void nfs_umount_begin(struct super_block *sb)
 		rpc_killall_tasks(rpc);
 }
 
-static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void)
+static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int version)
 {
 	struct nfs_parsed_mount_data *data;
 
@@ -963,6 +963,7 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(void)
 		data->nfs_server.protocol = XPRT_TRANSPORT_TCP;
 		data->auth_flavors[0]	= RPC_AUTH_UNIX;
 		data->auth_flavor_len	= 1;
+		data->version		= version;
 		data->minorversion	= 0;
 		data->need_mount	= true;
 		data->net		= current->nsproxy->net_ns;
@@ -2472,6 +2473,7 @@ error_splat_bdi:
 static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *raw_data)
 {
+	int version = (fs_type == &nfs_fs_type) ? NFS_DEFAULT_VERSION : 4;
 	struct nfs_mount_info mount_info = {
 		.fill_super = nfs_fill_super,
 		.set_security = nfs_set_sb_security,
@@ -2479,7 +2481,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
 	struct dentry *mntroot = ERR_PTR(-ENOMEM);
 	int error;
 
-	mount_info.parsed = nfs_alloc_parsed_mount_data();
+	mount_info.parsed = nfs_alloc_parsed_mount_data(version);
 	mount_info.mntfh = nfs_alloc_fhandle();
 	if (mount_info.parsed == NULL || mount_info.mntfh == NULL)
 		goto out;
-- 
1.7.9.5



      parent reply	other threads:[~2012-06-08 13:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 15:04 NFS regression in v3.5-rc1: mount.nfs yells about incorrect mount option Joerg Roedel
2012-06-07 15:12 ` Bryan Schumaker
2012-06-07 15:17   ` Bryan Schumaker
2012-06-07 15:43     ` Joerg Roedel
2012-06-07 15:31   ` Joerg Roedel
2012-06-07 15:50   ` Joerg Roedel
2012-06-07 15:54     ` Bryan Schumaker
2012-06-07 16:01       ` Joerg Roedel
2012-06-07 17:23         ` Bryan Schumaker
2012-06-07 19:33           ` Joerg Roedel
2012-06-08 13:03       ` Joerg Roedel
2012-06-08 13:20         ` Bryan Schumaker
2012-06-08 13:33           ` Joerg Roedel
2012-06-08 13:37             ` Bryan Schumaker
2012-06-08 13:49               ` Joerg Roedel
2012-06-08 15:28                 ` Bryan Schumaker
2012-06-08 13:30         ` Joerg Roedel [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=20120608133047.GV12795@8bytes.org \
    --to=joro@8bytes.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bjschuma@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --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).