18 Dec, 2012

2 commits


11 Dec, 2012

2 commits

  • I honestly have no idea where I got 129 from, but it's a much bigger
    value than the actual buffer size (INET6_ADDRSTRLEN).

    Signed-off-by: Bryan Schumaker
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     
  • 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
     

04 Dec, 2012

1 commit


03 Dec, 2012

8 commits


29 Nov, 2012

1 commit

  • There were only a small number of functions in this file and since they
    all affect stored state I think it makes sense to put them in state.h
    instead. I also dropped most static inline declarations since there are
    no callers when fault injection is not enabled.

    Signed-off-by: Bryan Schumaker
    Signed-off-by: J. Bruce Fields

    Bryan Schumaker
     

28 Nov, 2012

8 commits

  • Grace time is a part of NFSv4 state engine, which is constructed per network
    namespace.

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

    Stanislav Kinsbursky
     
  • Lease time is a part of NFSv4 state engine, which is constructed per network
    namespace.

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

    Stanislav Kinsbursky
     
  • 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
     
  • This patch renames nfs4_state_start_net() into nfs4_state_create_net(), where
    get_net() now performed.
    Also it introduces new nfs4_state_start_net(), which is now responsible for
    state creation and initializing all per-net data and which is now called from
    nfs4_state_start().

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

    Stanislav Kinsbursky
     
  • This patch renames __nfs4_state_shutdown_net() into nfs4_state_shutdown_net(),
    __nfs4_state_shutdown() into nfs4_state_shutdown_net() and moves all network
    related shutdown operations to nfs4_state_shutdown_net().

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

    Stanislav Kinsbursky
     
  • NFSv4 delegations are stored in global list. But they are nfs4_client
    dependent, which is network namespace aware already.
    State shutdown and laundromat are done per network namespace as well.
    So, delegations unhash have to be done in network namespace context.

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

    Stanislav Kinsbursky
     
  • This lock protects the client lru list and session hash table, which are
    allocated per network namespace already.

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

    Stanislav Kinsbursky
     
  • Protection of __nfs4_state_shutdown() with nfs4_lock_state() looks redundant.

    This function is called by the last NFSd thread on it's exit and state lock
    protects actually two functions (del_recall_lru is protected by recall_lock):
    1) nfsd4_client_tracking_exit
    2) __nfs4_state_shutdown_net

    "nfsd4_client_tracking_exit" doesn't require state lock protection, because it's
    state can be modified only by tracker callbacks.
    Here a re they:
    1) create: is called only from nfsd4_proc_compound.
    2) remove: is called from either nfsd4_proc_compound or nfs4_laundromat.
    3) check: is called only from nfsd4_proc_compound.
    4) grace_done; called only from nfs4_laundromat.

    nfsd4_proc_compound is called onll by NFSd kthread, which is exiting right
    now.
    nfs4_laundromat is called by laundry_wq. But laundromat_work was canceled
    already.

    "__nfs4_state_shutdown_net" also doesn't require state lock protection,
    because all NFSd kthreads are dead, and no race can happen with NFSd start,
    because "nfsd_up" flag is still set.
    Moreover, all Nfsd shutdown is protected with global nfsd_mutex.

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

    Stanislav Kinsbursky
     

26 Nov, 2012

1 commit

  • Linus has pointed out that indiscriminate use of BUG's can make it
    harder to diagnose bugs because they can bring a machine down, often
    before we manage to get any useful debugging information to the logs.
    (Consider, for example, a BUG() that fires in a workqueue, or while
    holding a spinlock).

    Most of these BUG's won't do much more than kill an nfsd thread, but it
    would still probably be safer to get out the warning without dying.

    There's still more of this to do in nfsd/.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

15 Nov, 2012

16 commits


13 Nov, 2012

1 commit

  • Remove the cl_recdir field from the nfs4_client struct. Instead, just
    compute it on the fly when and if it's needed, which is now only when
    the legacy client tracking code is in effect.

    The error handling in the legacy client tracker is also changed to
    handle the case where md5 is unavailable. In that case, we'll warn
    the admin with a KERN_ERR message and disable the client tracking.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton