28 May, 2011

1 commit

  • Marek Belisko 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
    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

12 Mar, 2011

1 commit

  • 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 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
    Tested-by: Mark Brown
    Signed-off-by: Chuck Lever
    Cc: # 2.6.37
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

27 Oct, 2010

1 commit

  • Stephen Rothwell reports:

    > /home/test/linux-2.6/fs/nfs/nfsroot.c: In function 'nfs_root_debug':
    > /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: error: 'nfs_debug'
    > undeclared (first use in this function)
    > /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: note: each undeclared
    > identifier is reported only once for each function it appears in
    > make[3]: *** [fs/nfs/nfsroot.o] Error 1
    > make[2]: *** [fs/nfs] Error 2
    > make[1]: *** [fs] Error 2
    > 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
    Tested-by: Ingo Molnar
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

17 Sep, 2010

4 commits

  • As a convenience, introduce a kernel command line option to enable
    NFSROOT debugging messages.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • 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
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • 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=,wsize=

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

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • 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
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

31 Jul, 2010

1 commit

  • In root_nfs_name() it does the following:

    if (strlen(buf) + strlen(cp) > 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
    Signed-off-by: Trond Myklebust

    Dan Carpenter
     

15 May, 2010

1 commit


18 Jun, 2009

2 commits

  • Solder xdr_stream-based XDR decoding functions into the in-kernel mountd
    client that are more careful about checking data types and watching for
    buffer overflows. The new MNT3 decoder includes support for auth-flavor
    list decoding.

    The "_sz" macro for MNT3 replies was missing the size of the file handle.
    I've added this back, and included the size of the auth flavor array.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • Clean up: Relocate MNT program procedure number definitions to the
    only file that uses them. Relocate the version number definitions,
    which are shared, to nfs.h. Remove duplicate program number
    definitions.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

27 May, 2009

1 commit

  • fix build error with latest kbuild adjustments to initconst.

    The commit a447c0932445f92ce6f4c1bd020f62c5097a7842 ("vfs: Use
    const for kernel parser table") changed:

    static match_table_t __initdata tokens = {
    to
    static match_table_t __initconst tokens = {

    But the missing const causes popwerpc to fail with latest
    updates to __initconst like this:

    fs/nfs/nfsroot.c:400: error: __setup_str_nfs_root_setup causes a section type conflict
    fs/nfs/nfsroot.c:400: error: __setup_str_nfs_root_setup causes a section type conflict

    The bug is only present with kbuild-next.
    Following patch has been build tested.

    Signed-off-by: Sam Ravnborg
    Cc: Steven Whitehouse
    Cc: Stephen Rothwell
    Acked-by: Jan Beulich
    Signed-off-by: Trond Myklebust

    Sam Ravnborg
     

31 Dec, 2008

1 commit


24 Dec, 2008

3 commits


31 Oct, 2008

1 commit


14 Oct, 2008

1 commit

  • This is a much better version of a previous patch to make the parser
    tables constant. Rather than changing the typedef, we put the "const" in
    all the various places where its required, allowing the __initconst
    exception for nfsroot which was the cause of the previous trouble.

    This was posted for review some time ago and I believe its been in -mm
    since then.

    Signed-off-by: Steven Whitehouse
    Cc: Alexander Viro
    Signed-off-by: Linus Torvalds

    Steven Whitehouse
     

05 Aug, 2008

1 commit

  • This reverts commit f9247273cb69ba101877e946d2d83044409cc8c5 (and
    fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 - "fix fs/nfs/nfsroot.c
    compilation" - that fixed a missed conversion).

    The changes cause problems for at least the sparc build. Let's re-do
    them when the exact issues are resolved.

    Requested-by: Andrew Morton
    Requested-by: Steven Whitehouse
    Cc: David Miller
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Jul, 2008

1 commit

  • This fixes the following compile error caused by commit
    f9247273cb69ba101877e946d2d83044409cc8c5 ("UFS: add const to parser
    token table"):

    CC fs/nfs/nfsroot.o
    /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/nfs/nfsroot.c:130: error: tokens causes a section type conflict
    make[3]: *** [fs/nfs/nfsroot.o] Error 1

    Signed-off-by: Adrian Bunk
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

10 Jul, 2008

2 commits


07 Dec, 2007

1 commit


20 Oct, 2007

1 commit

  • * Convert files to UTF-8.

    * Also correct some people's names
    (one example is Eißfeldt, which was found in a source file.
    Given that the author used an ß at all in a source file
    indicates that the real name has in fact a 'ß' and not an 'ss',
    which is commonly used as a substitute for 'ß' when limited to
    7bit.)

    * Correct town names (Goettingen -> Göttingen)

    * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Adrian Bunk

    Jan Engelhardt
     

10 Oct, 2007

1 commit


11 Jul, 2007

2 commits

  • In preparation for supporting NFSv2 and NFSv3 mount option handling in the
    kernel NFS client, convert mount_clnt.c to be a permanent part of the NFS
    client, instead of built only when CONFIG_ROOT_NFS is enabled.

    In addition, we also replace the "struct sockaddr_in *" argument with
    something more generic, to help support IPv6 at some later point.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     
  • In preparation for handling NFS mount option parsing in the kernel,
    rename rpcb_getport_external as rpcb_get_port_sync, and make it available
    always (instead of only when CONFIG_ROOT_NFS is enabled).

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

01 May, 2007

1 commit


03 Dec, 2006

1 commit


04 Oct, 2006

1 commit


02 Oct, 2006

1 commit

  • Replace references to system_utsname to the per-process uts namespace
    where appropriate. This includes things like uname.

    Changes: Per Eric Biederman's comments, use the per-process uts namespace
    for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c

    [jdike@addtoit.com: UML fix]
    [clg@fr.ibm.com: cleanup]
    [akpm@osdl.org: build fix]
    Signed-off-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Herbert Poetzl
    Cc: Andrey Savochkin
    Signed-off-by: Cedric Le Goater
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     

08 Feb, 2006

1 commit

  • Direct backport of 2.4 fix that didn't get propagated to 2.6; original
    comment follows:

    When I specify the NFS port for nfsroot (e.g.,
    nfsroot=,port=2049), the
    kernel uses the wrong port. In my case it tries to use 264 (0x108)
    instead
    of 2049 (0x801).

    This patch adds the missing htons().

    Eric

    Patch got applied in 2.4.21-pre6. Author: Eric Lammerts (,
    AFAICS).

    Signed-off-by: Al Viro

    Al Viro
     

09 Jan, 2006

1 commit


07 Jan, 2006

1 commit

  • Most NFS server implementations allow up to 64KB reads and writes on the
    wire. The Solaris NFS server allows up to a megabyte, for instance.

    Now the Linux NFS client supports transfer sizes up to 1MB, too. This will
    help reduce protocol and context switch overhead on read/write intensive NFS
    workloads, and support larger atomic read and write operations on servers
    that support them.

    Test-plan:
    Connectathon and iozone on mount point with wsize=rsize>32768 over TCP.
    Tests with NFS over UDP to verify the maximum RPC payload size cap.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

23 Jun, 2005

1 commit

  • This adds acl support fo nfs clients via the NFSACL protocol extension, by
    implementing the getxattr, listxattr, setxattr, and removexattr iops for the
    system.posix_acl_access and system.posix_acl_default attributes. This patch
    implements a dumb version that uses no caching (and thus adds some overhead).
    (Another patch in this patchset adds caching as well.)

    Signed-off-by: Andreas Gruenbacher
    Acked-by: Olaf Kirch
    Signed-off-by: Andrew Morton
    Signed-off-by: Trond Myklebust

    Andreas Gruenbacher
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds