Skip to content

Commit 3fc2bfa

Browse files
hdelleramschuma-ntap
authored andcommitted
nfsroot: Default mount option should ask for built-in NFS version
Change the nfsroot default mount option to ask for NFSv2 only *if* the kernel was built with NFSv2 support. If not, default to NFSv3 or as last choice to NFSv4, depending on actual kernel config. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 3cea11c commit 3fc2bfa

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fs/nfs/nfsroot.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@
8888
#define NFS_ROOT "/tftpboot/%s"
8989

9090
/* Default NFSROOT mount options. */
91+
#if defined(CONFIG_NFS_V2)
9192
#define NFS_DEF_OPTIONS "vers=2,tcp,rsize=4096,wsize=4096"
93+
#elif defined(CONFIG_NFS_V3)
94+
#define NFS_DEF_OPTIONS "vers=3,tcp,rsize=4096,wsize=4096"
95+
#else
96+
#define NFS_DEF_OPTIONS "vers=4,tcp,rsize=4096,wsize=4096"
97+
#endif
9298

9399
/* Parameters passed from the kernel command line */
94100
static char nfs_root_parms[NFS_MAXPATHLEN + 1] __initdata = "";

0 commit comments

Comments
 (0)