linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] NFSROOT short subjects
@ 2011-04-07 16:37 Chuck Lever
  2011-04-07 16:37 ` [PATCH 1/2] NFS: Revert NFSROOT default mount options Chuck Lever
  2011-04-07 16:37 ` [PATCH 2/2] NFSROOT: Select default mount options via Kconfig Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Chuck Lever @ 2011-04-07 16:37 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs

Hi Trond-

These visit the NFSROOT default mount option issues we discussed at LSF.

The first patch fixes a regression reported in 2.6.38, and should go to
linux-next as soon as possible for testing, then onto 2.6.38-stable and
2.6.39-rc.

The second patch (untested) should also be made available to linux-next
but can go into 2.6.40.  I decided to keep the choices simple.

---

Chuck Lever (2):
      NFSROOT: Select default mount options via Kconfig
      NFS: Revert NFSROOT default mount options


 fs/nfs/Kconfig   |   13 +++++++++++++
 fs/nfs/nfsroot.c |    6 +++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] NFS: Revert NFSROOT default mount options
  2011-04-07 16:37 [PATCH 0/2] NFSROOT short subjects Chuck Lever
@ 2011-04-07 16:37 ` Chuck Lever
  2011-04-07 16:37 ` [PATCH 2/2] NFSROOT: Select default mount options via Kconfig Chuck Lever
  1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2011-04-07 16:37 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs

Marek Belisko <marek.belisko@gmail.com> reports that recent attempts
to fix regressions in NFSROOT have broken his configuration:

> After update from 2.6.38-rc8 to 2.6.38 is mounting rootfs over nfs not possible.
> Log:
> VFS: Mounted root (nfs filesystem) on device 0:14.
> Freeing init memory: 132K
> nfs: server 10.146.1.21 not responding, still trying
> nfs: server 10.146.1.21 not responding, still trying
>
> This is never ending. I make short bisect (not too much commits
> between versions)
> and bad commit was reported: 53d4737580535e073963b91ce87d4216e434fab5
>
> NFS: NFSROOT should default to "proto=udp"
>
> I've tested on mini2440 board (DM9000, static IP).
> Is there some missing option or something else to be checked?

An examination of a network trace captured during the failure shows
that the mount is actually succeeding, but that the client is not
seeing READ replies larger than 16KB.  This could be a local packet
filtering issue on the client, but we didn't troubleshoot this
further because of the reported "git bisect" result.

Last fall we removed the ad hoc mount option parser in
fs/nfs/nfsroot.c in favor of using the main parser in fs/nfs/super.c
(see commit 56463e50 "NFS: Use super.c for NFSROOT mount option
parsing").  That commit changed the default NFSROOT mount options to
be the same as those employed by user space mounts.

As it turns out, these new default mount options are not tolerated by
many embedded systems.  So far these problems have been due to
specific behavior of certain embedded NICs.  The NFS community does
not have such hardware on hand for running tests.

Commit 53d47375 recently introduced a clean way to specify default
mount options for NFSROOT, so we can now easily restore the
traditional defaults for NFSROOT:

   vers=2,udp,rsize=4096,wsize=4096

This should revert the new default NFSROOT mount options introduced
with commit 56463e50.

Tested-by: Marek Belisto <marek.belisto@open-nandra.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/nfsroot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index c541093..c4744e1 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -87,7 +87,7 @@
 #define NFS_ROOT		"/tftpboot/%s"
 
 /* Default NFSROOT mount options. */
-#define NFS_DEF_OPTIONS		"udp"
+#define NFS_DEF_OPTIONS		"vers=2,udp,rsize=4096,wsize=4096"
 
 /* Parameters passed from the kernel command line */
 static char nfs_root_parms[256] __initdata = "";


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] NFSROOT: Select default mount options via Kconfig
  2011-04-07 16:37 [PATCH 0/2] NFSROOT short subjects Chuck Lever
  2011-04-07 16:37 ` [PATCH 1/2] NFS: Revert NFSROOT default mount options Chuck Lever
@ 2011-04-07 16:37 ` Chuck Lever
  1 sibling, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2011-04-07 16:37 UTC (permalink / raw)
  To: trond.myklebust; +Cc: linux-nfs

The current NFSROOT default mount options are pretty ancient: NFS
version 2 and UDP are deprecated in many installations.

Because embedded relies on NFSROOT, this is a tricky area to change.
So, keep the legacy defaults, but provide more modern defaults as a
build-time option.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/Kconfig   |   13 +++++++++++++
 fs/nfs/nfsroot.c |    4 ++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index ba30665..af744de 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -98,6 +98,19 @@ config ROOT_NFS
 
 	  Most people say N here.
 
+config ROOT_NFS_V3_DEFAULTS
+	bool "Use NFS version 3 and TCP for root file system"
+	depends on ROOT_NFS
+	default n
+	help
+	  The legacy default mount options for NFSROOT use NFS version 2
+	  and UDP.  These are deprecated, but some systems need to continue
+	  to use them as default.
+
+	  Everyone else can choose to use more modern mount options by
+	  default.  Select this option if your server, client, and network
+	  can handle NFS version 3 and TCP.
+
 config NFS_FSCACHE
 	bool "Provide NFS client caching support"
 	depends on NFS_FS=m && FSCACHE || NFS_FS=y && FSCACHE=y
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index c4744e1..9effe0d 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -87,7 +87,11 @@
 #define NFS_ROOT		"/tftpboot/%s"
 
 /* Default NFSROOT mount options. */
+#ifdef CONFIG_ROOT_NFS_V3_DEFAULTS
+#define NFS_DEF_OPTIONS		"vers=3,proto=tcp,mountproto=udp"
+#else
 #define NFS_DEF_OPTIONS		"vers=2,udp,rsize=4096,wsize=4096"
+#endif
 
 /* Parameters passed from the kernel command line */
 static char nfs_root_parms[256] __initdata = "";


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-07 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-07 16:37 [PATCH 0/2] NFSROOT short subjects Chuck Lever
2011-04-07 16:37 ` [PATCH 1/2] NFS: Revert NFSROOT default mount options Chuck Lever
2011-04-07 16:37 ` [PATCH 2/2] NFSROOT: Select default mount options via Kconfig Chuck Lever

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).