Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217033
b: refs/heads/master
c: 306a075
h: refs/heads/master
i:
  217031: 16a35a2
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Sep 17, 2010
1 parent 70a8e47 commit 9bda7c2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d2321037896aa4868a67f45b2d6ed52b579a48a
refs/heads/master: 306a075362a288683f6346185f97dd0e06df19da
22 changes: 22 additions & 0 deletions trunk/Documentation/filesystems/nfs/nfsroot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,28 @@ ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
Default: any


nfsrootdebug

This parameter enables debugging messages to appear in the kernel
log at boot time so that administrators can verify that the correct
NFS mount options, server address, and root path are passed to the
NFS client.


rdinit=<executable file>

To specify which file contains the program that starts system
initialization, administrators can use this command line parameter.
The default value of this parameter is "/init". If the specified
file exists and the kernel can execute it, root filesystem related
kernel command line parameters, including `nfsroot=', are ignored.

A description of the process of mounting the root file system can be
found in:

Documentation/early-userspace/README




3.) Boot Loader
Expand Down
5 changes: 4 additions & 1 deletion trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1532,12 +1532,15 @@ and is between 256 and 4096 characters. It is defined in the file
1 to enable accounting
Default value is 0.

nfsaddrs= [NFS]
nfsaddrs= [NFS] Deprecated. Use ip= instead.
See Documentation/filesystems/nfs/nfsroot.txt.

nfsroot= [NFS] nfs root filesystem for disk-less boxes.
See Documentation/filesystems/nfs/nfsroot.txt.

nfsrootdebug [NFS] enable nfsroot debugging messages.
See Documentation/filesystems/nfs/nfsroot.txt.

nfs.callback_tcpport=
[NFS] set the TCP port on which the NFSv4 callback
channel should listen.
Expand Down
19 changes: 13 additions & 6 deletions trunk/fs/nfs/nfsroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
* NFS over TCP.
* Fabian Frederick: Option parser rebuilt (using parser lib)
* Chuck Lever : Use super.c's text-based mount option parsing
* Chuck Lever : Add "nfsrootdebug".
*/

#include <linux/types.h>
Expand All @@ -80,8 +81,6 @@

#include "internal.h"

/* Define this to allow debugging output */
#undef NFSROOT_DEBUG
#define NFSDBG_FACILITY NFSDBG_ROOT

/* Default path we try to mount. "%s" gets replaced by our IP address */
Expand All @@ -102,6 +101,18 @@ static char nfs_export_path[NFS_MAXPATHLEN + 1] __initdata = "";
/* server:export path string passed to super.c */
static char nfs_root_device[NFS_MAXPATHLEN + 1] __initdata = "";

/*
* When the "nfsrootdebug" kernel command line option is specified,
* enable debugging messages for NFSROOT.
*/
static int __init nfs_root_debug(char *__unused)
{
nfs_debug |= NFSDBG_ROOT | NFSDBG_MOUNT;
return 1;
}

__setup("nfsrootdebug", nfs_root_debug);

/*
* Parse NFS server and directory information passed on the kernel
* command line.
Expand Down Expand Up @@ -282,10 +293,6 @@ static int __init root_nfs_data(char *cmdline)
*/
int __init nfs_root_data(char **root_device, char **root_data)
{
#ifdef NFSROOT_DEBUG
nfs_debug |= NFSDBG_ROOT | NFSDBG_MOUNT;
#endif /* NFSROOT_DEBUG */

servaddr = root_server_addr;
if (servaddr == htonl(INADDR_NONE)) {
printk(KERN_ERR "Root-NFS: no NFS server address\n");
Expand Down

0 comments on commit 9bda7c2

Please sign in to comment.