13 Jul, 2013

1 commit

  • You can turn on or off support for minorversions using e.g.

    echo "-4.2" >/proc/fs/nfsd/versions

    However, the current implementation is a little wonky. For example, the
    above will turn off 4.2 support, but it will also turn *on* 4.1 support.

    This didn't matter as long as we only had 2 minorversions, which was
    true till very recently.

    And do a little cleanup here.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

09 Jul, 2013

1 commit


01 Mar, 2013

1 commit

  • Pull nfsd changes from J Bruce Fields:
    "Miscellaneous bugfixes, plus:

    - An overhaul of the DRC cache by Jeff Layton. The main effect is
    just to make it larger. This decreases the chances of intermittent
    errors especially in the UDP case. But we'll need to watch for any
    reports of performance regressions.

    - Containerized nfsd: with some limitations, we now support
    per-container nfs-service, thanks to extensive work from Stanislav
    Kinsbursky over the last year."

    Some notes about conflicts, since there were *two* non-data semantic
    conflicts here:

    - idr_remove_all() had been added by a memory leak fix, but has since
    become deprecated since idr_destroy() does it for us now.

    - xs_local_connect() had been added by this branch to make AF_LOCAL
    connections be synchronous, but in the meantime Trond had changed the
    calling convention in order to avoid a RCU dereference.

    There were a couple of more obvious actual source-level conflicts due to
    the hlist traversal changes and one just due to code changes next to
    each other, but those were trivial.

    * 'for-3.9' of git://linux-nfs.org/~bfields/linux: (49 commits)
    SUNRPC: make AF_LOCAL connect synchronous
    nfsd: fix compiler warning about ambiguous types in nfsd_cache_csum
    svcrpc: fix rpc server shutdown races
    svcrpc: make svc_age_temp_xprts enqueue under sv_lock
    lockd: nlmclnt_reclaim(): avoid stack overflow
    nfsd: enable NFSv4 state in containers
    nfsd: disable usermode helper client tracker in container
    nfsd: use proper net while reading "exports" file
    nfsd: containerize NFSd filesystem
    nfsd: fix comments on nfsd_cache_lookup
    SUNRPC: move cache_detail->cache_request callback call to cache_read()
    SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function
    SUNRPC: rework cache upcall logic
    SUNRPC: introduce cache_detail->cache_request callback
    NFS: simplify and clean cache library
    NFS: use SUNRPC cache creation and destruction helper for DNS cache
    nfsd4: free_stid can be static
    nfsd: keep a checksum of the first 256 bytes of request
    sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer
    sunrpc: fix comment in struct xdr_buf definition
    ...

    Linus Torvalds
     

24 Feb, 2013

1 commit


16 Feb, 2013

1 commit

  • This patch makes NFSD file system superblock to be created per net.
    This makes possible to get proper network namespace from superblock instead of
    using hard-coded "init_net".

    Note: NFSd fs super-block holds network namespace. This garantees, that
    network namespace won't disappear from underneath of it.
    This, obviously, means, that in case of kill of a container's "init" (which is not a mount
    namespace, but network namespace creator) netowrk namespace won't be
    destroyed.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     

04 Feb, 2013

1 commit


11 Dec, 2012

15 commits

  • Since NFSd service is per-net now, we have to pass proper network
    context in nfsd_shutdown() from NFSd kthreads.

    The simplest way I found is to get proper net from one of transports
    with permanent sockets.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Function nfsd_shutdown is called from two places: nfsd_last_thread (when last
    kernel thread is exiting) and nfsd_svc (in case of kthreads starting error).
    When calling from nfsd_svc(), we can be sure that per-net resources are
    allocated, so we don't need to check per-net nfsd_net_up boolean flag.
    This allows us to remove nfsd_shutdown function at all and move check for
    per-net nfsd_net_up boolean flag to nfsd_last_thread.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Since we have generic NFSd resurces, we have to introduce some way how to
    allocate and destroy those resources on first per-net NFSd start and on
    last per-net NFSd stop respectively.
    This patch replaces global boolean nfsd_up flag (which is unused now) by users
    counter and use it to determine either we need to allocate generic resources
    or destroy them.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This patch moves nfsd_startup_generic() and nfsd_shutdown_generic()
    calls to nfsd_startup_net() and nfsd_shutdown_net() respectively, which
    allows us to call nfsd_startup_net() instead of nfsd_startup() and makes
    the code look clearer. It also modifies nfsd_svc() and nfsd_shutdown()
    to check nn->nfsd_net_up instead of global nfsd_up. The latter is now
    used only for generic resources shutdown and is currently useless. It
    will replaced by NFSd users counter later in this series.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • NFSd have per-net resources and resources, used globally.
    Let's move generic resources init and shutdown to separated functions since
    they are going to be allocated on first NFSd service start and destroyed after
    last NFSd service shutdown.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This patch makes main step in NFSd containerisation.

    There could be different approaches to how to make NFSd able to handle
    incoming RPC request from different network namespaces. The two main
    options are:

    1) Share NFSd kthreads betwween all network namespaces.
    2) Create separated pool of threads for each namespace.

    While first approach looks more flexible, second one is simpler and
    non-racy. This patch implements the second option.

    To make it possible to allocate separate pools of threads, we have to
    make it possible to allocate separate NFSd service structures per net.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This is simple: an NFSd service can be started at different times in
    different network environments. So, its "boot time" has to be assigned
    per net.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This patch introduces introduces per-net "nfsd_net_up" boolean flag, which has
    the same purpose as general "nfsd_up" flag - skip init or shutdown of per-net
    resources in case of they are inited on shutted down respectively.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • NFSd resources are partially per-net and partially globally used.
    This patch splits resources init and shutdown and moves per-net code to
    separated functions.
    Generic and per-net init and shutdown are called sequentially for a while.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Precursor patch. Hard-coded "init_net" will be replaced by proper one in
    future.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Precursor patch. Hard-coded "init_net" will be replaced by proper one in
    future.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Precursor patch. Hard-coded "init_net" will be replaced by proper one in
    future.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Precursor patch. Hard-coded "init_net" will be replaced by proper one in
    future.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • Precursor patch. Hard-coded "init_net" will be replaced by proper one in
    future.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • There could be a situation, when NFSd was started in one network namespace, but
    stopped in another one.
    This will trigger kernel panic, because RPCBIND client is stored on per-net
    NFSd data, and will be NULL on NFSd shutdown.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     

28 Nov, 2012

1 commit

  • Split NFSv4 state init and shutdown into two different calls: per-net one and
    generic one.
    Per-net cwinit/shutdown pair have to be called for any namespace, generic pair
    - only once on NSFd kthreads start and shutdown respectively.

    Refresh of diff-nfsd-call-state-init-twice

    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     

26 Nov, 2012

1 commit

  • Very embarassing: 1091006c5eb15cba56785bd5b498a8d0b9546903 "nfsd: turn
    on reply cache for NFSv4" missed a line, effectively leaving the reply
    cache off in the v4 case. I thought I'd tested that, but I guess not.

    This time, wrote a pynfs test to confirm it works.

    Cc: stable@vger.kernel.org
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

22 Aug, 2012

2 commits


25 Jul, 2012

2 commits


01 Jun, 2012

2 commits

  • The idea is to separate service destruction and per-net operations,
    because these are two different things and the mix looks ugly.

    Notes:

    1) For NFS server this patch looks ugly (sorry for that). But these
    place will be rewritten soon during NFSd containerization.

    2) LockD per-net counter increase int lockd_up() was moved prior to
    make_socks() to make lockd_down_net() call safe in case of error.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     
  • This new routine is responsible for service registration in a specified
    network context.

    The idea is to separate service creation from per-net operations.

    Note also: since registering service with svc_bind() can fail, the
    service will be destroyed and during destruction it will try to
    unregister itself from rpcbind. In this case unregistration has to be
    skipped.

    Signed-off-by: Stanislav Kinsbursky
    Signed-off-by: J. Bruce Fields

    Stanislav Kinsbursky
     

12 Apr, 2012

2 commits


26 Mar, 2012

1 commit


04 Feb, 2012

2 commits


01 Feb, 2012

1 commit


07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

1 commit

  • Some files were using the complete module.h infrastructure without
    actually including the header at all. Fix them up in advance so
    once the implicit presence is removed, we won't get failures like this:

    CC [M] fs/nfsd/nfssvc.o
    fs/nfsd/nfssvc.c: In function 'nfsd_create_serv':
    fs/nfsd/nfssvc.c:335: error: 'THIS_MODULE' undeclared (first use in this function)
    fs/nfsd/nfssvc.c:335: error: (Each undeclared identifier is reported only once
    fs/nfsd/nfssvc.c:335: error: for each function it appears in.)
    fs/nfsd/nfssvc.c: In function 'nfsd':
    fs/nfsd/nfssvc.c:555: error: implicit declaration of function 'module_put_and_exit'
    make[3]: *** [fs/nfsd/nfssvc.o] Error 1

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

25 Oct, 2011

1 commit


18 Jul, 2011

1 commit

  • It's sort of ridiculous that we've never had a working reply cache for
    NFSv4.

    On the other hand, we may still not: our current reply cache is likely
    not very good, especially in the TCP case (which is the only case that
    matters for v4). What we really need here is some serious testing.

    Anyway, here's a start.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

16 Jul, 2011

1 commit

  • As promised in feature-removal-schedule.txt it is time to
    remove the nfsctl system call.

    Userspace has perferred to not use this call throughout 2.6 and it has been
    excluded in the default configuration since 2.6.36 (9 months ago).

    So this patch removes all the code that was being compiled out.

    There are still references to sys_nfsctl in various arch systemcall tables
    and related code. These should be cleaned out too, probably in the next
    merge window.

    Signed-off-by: NeilBrown
    Signed-off-by: J. Bruce Fields

    NeilBrown