<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/fs/nfs/nfsroot.c, branch dev</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-01-31T01:43:30+00:00</updated>
<entry>
<title>NFS: a couple off by ones</title>
<updated>2015-01-31T01:43:30+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2014-12-16T23:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c7c545d4a34872f4a3d710e22f21fb61f7258706'/>
<id>urn:sha1:c7c545d4a34872f4a3d710e22f21fb61f7258706</id>
<content type='text'>
These tests are off by one because if len == sizeof(nfs_export_path)
then we have truncated the name.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG</title>
<updated>2012-03-20T17:08:26+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2012-03-18T18:07:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=e27d359e9b7e446190362cd5c8fe281d02194896'/>
<id>urn:sha1:e27d359e9b7e446190362cd5c8fe281d02194896</id>
<content type='text'>
This allows us to turn on/off the dprintk() debugging interfaces for
those distributions that don't ship the 'rpcdebug' utility.
It also allows us to add Kbuild dependencies. Specifically, we already
know that dprintk() in general relies on CONFIG_SYSCTL. Now it turns out
that the NFS dprintks depend on CONFIG_CRC32 after we added support
for the filehandle hash.

Reported-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Revert NFSROOT default mount options</title>
<updated>2011-05-27T21:42:47+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-05-09T19:22:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4251c94833aa516c1fc7a0f8f504a26eadd4b91e'/>
<id>urn:sha1:4251c94833aa516c1fc7a0f8f504a26eadd4b91e</id>
<content type='text'>
Marek Belisko &lt;marek.belisko@gmail.com&gt; reports that recent attempts
to fix regressions in NFSROOT have broken his configuration:

&gt; After update from 2.6.38-rc8 to 2.6.38 is mounting rootfs over nfs not possible.
&gt; Log:
&gt; VFS: Mounted root (nfs filesystem) on device 0:14.
&gt; Freeing init memory: 132K
&gt; nfs: server 10.146.1.21 not responding, still trying
&gt; nfs: server 10.146.1.21 not responding, still trying
&gt;
&gt; This is never ending. I make short bisect (not too much commits
&gt; between versions)
&gt; and bad commit was reported: 53d4737580535e073963b91ce87d4216e434fab5
&gt;
&gt; NFS: NFSROOT should default to "proto=udp"
&gt;
&gt; I've tested on mini2440 board (DM9000, static IP).
&gt; 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 &lt;marek.belisto@open-nandra.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: NFSROOT should default to "proto=udp"</title>
<updated>2011-03-11T20:38:07+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-03-11T20:31:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=53d4737580535e073963b91ce87d4216e434fab5'/>
<id>urn:sha1:53d4737580535e073963b91ce87d4216e434fab5</id>
<content type='text'>
There have been a number of recent reports that NFSROOT is no longer
working with default mount options, but fails only with certain NICs.

Brian Downing &lt;bdowning@lavos.net&gt; bisected to commit 56463e50 "NFS:
Use super.c for NFSROOT mount option parsing".  Among other things,
this commit changes the default mount options for NFSROOT to use TCP
instead of UDP as the underlying transport.

TCP seems less able to deal with NICs that are slow to initialize.
The system logs that have accompanied reports of problems all show
that NFSROOT attempts to establish a TCP connection before the NIC is
fully initialized, and thus the TCP connection attempt fails.

When a TCP connection attempt fails during a mount operation, the
NFS stack needs to fail the operation.  Usually user space knows how
and when to retry it.  The network layer does not report a distinct
error code for this particular failure mode.  Thus, there isn't a
clean way for the RPC client to see that it needs to retry in this
case, but not in others.

Because NFSROOT is used in some environments where it is not possible
to update the kernel command line to specify "udp", the proper thing
to do is change NFSROOT to use UDP by default, as it did before commit
56463e50.

To make it easier to see how to change default mount options for
NFSROOT and to distinguish default settings from mandatory settings,
I've adjusted a couple of areas to document the specifics.

root_nfs_cat() is also modified to deal with commas properly when
concatenating strings containing mount option lists.  This keeps
root_nfs_cat() call sites simpler, now that we may be concatenating
multiple mount option strings.

Tested-by: Brian Downing &lt;bdowning@lavos.net&gt;
Tested-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: &lt;stable@kernel.org&gt; # 2.6.37
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Fix a compile issue in nfs_root</title>
<updated>2010-10-26T17:56:42+00:00</updated>
<author>
<name>Trond Myklebust</name>
<email>Trond.Myklebust@netapp.com</email>
</author>
<published>2010-10-26T17:47:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=036a1075978e35811f22be3ff86a70cb8d22cb85'/>
<id>urn:sha1:036a1075978e35811f22be3ff86a70cb8d22cb85</id>
<content type='text'>
Stephen Rothwell reports:

&gt; /home/test/linux-2.6/fs/nfs/nfsroot.c: In function 'nfs_root_debug':
&gt; /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: error: 'nfs_debug'
&gt; undeclared (first use in this function)
&gt; /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: note: each undeclared
&gt; identifier is reported only once for each function it appears in
&gt; make[3]: *** [fs/nfs/nfsroot.o] Error 1
&gt; make[2]: *** [fs/nfs] Error 2
&gt; make[1]: *** [fs] Error 2
&gt; make: *** [sub-make] Error 2

Which is caused by commit 306a075362a288683f6346185f97dd0e06df19da
(NFS: Allow NFSROOT debugging messages to be enabled dynamically)

Fix is to disable this code when RPC_DEBUG is disabled.

Reported-by: Zimny Lech &lt;napohybelskurwysynom2010@gmail.com&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Allow NFSROOT debugging messages to be enabled dynamically</title>
<updated>2010-09-17T14:54:37+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-09-17T14:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=306a075362a288683f6346185f97dd0e06df19da'/>
<id>urn:sha1:306a075362a288683f6346185f97dd0e06df19da</id>
<content type='text'>
As a convenience, introduce a kernel command line option to enable
NFSROOT debugging messages.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Clean up nfsroot.c</title>
<updated>2010-09-17T14:54:37+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-09-17T14:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=8d2321037896aa4868a67f45b2d6ed52b579a48a'/>
<id>urn:sha1:8d2321037896aa4868a67f45b2d6ed52b579a48a</id>
<content type='text'>
Clean up: now that mount option parsing for nfsroot is handled
in fs/nfs/super.c, remove code in fs/nfs/nfsroot.c that is no
longer used.  This includes code that constructs the legacy
nfs_mount_data structure, and code that does a MNT call to the
server.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Use super.c for NFSROOT mount option parsing</title>
<updated>2010-09-17T14:54:37+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-09-17T14:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=56463e50d1fc3f070492434cea6303b35ea000de'/>
<id>urn:sha1:56463e50d1fc3f070492434cea6303b35ea000de</id>
<content type='text'>
Replace duplicate code in NFSROOT for mounting an NFS server on '/'
with logic that uses the existing mainline text-based logic in the NFS
client.

Add documenting comments where appropriate.

Note that this means NFSROOT mounts now use the same default settings
as v2/v3 mounts done via mount(2) from user space.

  vers=3,tcp,rsize=&lt;negotiated default&gt;,wsize=&lt;negotiated default&gt;

As before, however, no version/protocol negotiation with the server is
done.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>NFS: Clean up NFSROOT command line parsing</title>
<updated>2010-09-17T14:54:37+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-09-17T14:54:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=60ac03685bf513f9d9b6e8e098018b35309ed326'/>
<id>urn:sha1:60ac03685bf513f9d9b6e8e098018b35309ed326</id>
<content type='text'>
Clean up: To reduce confusion, rename nfs_root_name as nfs_root_parms,
as this buffer contains more than just the name of the remote server.

Introduce documenting comments around nfs_root_setup().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>nfs: include space for the NUL in root path</title>
<updated>2010-07-30T19:33:39+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-07-13T11:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=674b2222920012244ca59978b356b25412a8dcc7'/>
<id>urn:sha1:674b2222920012244ca59978b356b25412a8dcc7</id>
<content type='text'>
In root_nfs_name() it does the following:

        if (strlen(buf) + strlen(cp) &gt; NFS_MAXPATHLEN) {
                printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
                return -1;
        }
        sprintf(nfs_export_path, buf, cp);

In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
then the sprintf() would lead to an overflow.  Generally the rest of the
code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
a NUL terminator so the fix is to add space to the nfs_export_path[]
buffer.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
</feed>
