01 Aug, 2012

1 commit

  • By default a sunrpc service is limited to (N+3)*20 connections
    where N is the number of threads. This is 80 when N==1.
    If this number is exceeded a warning is printed suggesting that
    the number of threads be increased. However with services which
    run a single thread, this is impossible.

    For such services there is a ->sv_maxconn setting that can be
    used to forcibly increase the limit, and silence the message.
    This is used by lockd.

    The nfs client uses a sunrpc service to handle callbacks and
    it too is single-threaded, so to avoid the useless messages,
    and to allow a reasonable number of concurrent connections,
    we need to set ->sv_maxconn. 1024 seems like a good number.

    Signed-off-by: NeilBrown
    Signed-off-by: Trond Myklebust

    NeilBrown
     

31 Jul, 2012

1 commit


15 Jun, 2012

1 commit

  • In case of destroying mount namespace on child reaper exit, nsproxy is zeroed
    to the point already. So, dereferencing of it is invalid.
    This patch hard-code "init_net" for all network namespace references for NFS
    callback services. This will be fixed with proper NFS callback
    containerization.

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

    Stanislav Kinsbursky
     

01 Jun, 2012

3 commits

  • Instead of keeping the principal name associated with a request in a
    structure that's private to auth_gss and using an accessor function,
    move it to svc_cred.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • 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 Mar, 2012

1 commit

  • Fix a number of "warning: symbol 'foo' was not declared. Should it be
    static?" conditions.

    Fix 2 cases of "warning: Using plain integer as NULL pointer"

    fs/nfs/delegation.c:263:31: warning: restricted fmode_t degrades to integer
    - We want to allow upgrades to a WRITE delegation, but should otherwise
    consider servers that hand out duplicate delegations to be borken.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

03 Mar, 2012

1 commit

  • When the cl_xprt field is updated, the cl_server field will also have
    to change. Since the contents of cl_server follow the remote endpoint
    of cl_xprt, just move that field to the rpc_xprt.

    Signed-off-by: Trond Myklebust
    [ cel: simplify check_gss_callback_principal(), whitespace changes ]
    [ cel: forward ported to 3.4 ]
    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

07 Feb, 2012

1 commit


01 Feb, 2012

1 commit


20 Aug, 2011

1 commit

  • Use NUMA aware allocations to reduce latencies and increase throughput.

    sunrpc kthreads can use kthread_create_on_node() if pool_mode is
    "percpu" or "pernode", and svc_prepare_thread()/svc_init_buffer() can
    also take into account NUMA node affinity for memory allocations.

    Signed-off-by: Eric Dumazet
    CC: "J. Bruce Fields"
    CC: Neil Brown
    CC: David Miller
    Reviewed-by: Greg Banks
    [bfields@redhat.com: fix up caller nfs41_callback_up]
    Signed-off-by: J. Bruce Fields

    Eric Dumazet
     

26 Jan, 2011

1 commit

  • The information required to find the nfs_client cooresponding to the incoming
    back channel request is contained in the NFS layer. Perform minimal checking
    in the RPC layer pg_authenticate method, and push more detailed checking into
    the NFS layer where the nfs_client can be found.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

07 Jan, 2011

5 commits

  • Differentiate from server backchannel

    Signed-off-by: Andy Adamson
    Acked-by: Bruce Fields
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • Signed-off-by: Andy Adamson
    Acked-by: Bruce Fields
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • Fixes a bug where the nfs_client could be freed during callback processing.
    Refactor nfs_find_client to use minorversion specific means to locate the
    correct nfs_client structure.

    In the NFS layer, V4.0 clients are found using the callback_ident field in the
    CB_COMPOUND header. V4.1 clients are found using the sessionID in the
    CB_SEQUENCE operation which is also compared against the sessionID associated
    with the back channel thread after a successful CREATE_SESSION.

    Each of these methods finds the one an only nfs_client associated
    with the incoming callback request - so nfs_find_client_next is not needed.

    In the RPC layer, the pg_authenticate call needs to find the nfs_client. For
    the v4.0 callback service, the callback identifier has not been decoded so a
    search by address, version, and minorversion is used. The sessionid for the
    sessions based callback service has (usually) not been set for the
    pg_authenticate on a CB_NULL call which can be sent prior to the return
    of a CREATE_SESSION call, so the sessionid associated with the back channel
    thread is not used to find the client in pg_authenticate for CB_NULL calls.

    Pass the referenced nfs_client to each CB_COMPOUND operation being proceesed
    via the new cb_process_state structure. The reference is held across
    cb_compound processing.

    Use the new cb_process_state struct to move the NFS4ERR_RETRY_UNCACHED_REP
    processing from process_op into nfs4_callback_sequence where it belongs.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • The sessions based callback service is started prior to the CREATE_SESSION call
    so that it can handle CB_NULL requests which can be sent before the
    CREATE_SESSION call returns and the session ID is known.

    Set the callback sessionid after a sucessful CREATE_SESSION.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • The new back channel transport means we call the normal creation routine as
    well as svc_xprt_put.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

18 Nov, 2010

1 commit


02 Oct, 2010

1 commit


11 Aug, 2010

1 commit

  • This is more kernel-ish, saves some space, and also allows us to
    expand the ops without breaking all the callers who are happy for the
    new members to be NULL.

    The few places which defined their own param types are changed to the
    new scheme (more which crept in recently fixed in following patches).

    Since we're touching them anyway, we change get() and set() to take a
    const struct kernel_param (which they really are). This causes some
    harmless warnings until we fix them (in following patches).

    To reduce churn, module_param_call creates the ops struct so the callers
    don't have to change (and casts the functions to reduce warnings).
    The modern version which takes an ops struct is called module_param_cb.

    Signed-off-by: Rusty Russell
    Reviewed-by: Takashi Iwai
    Tested-by: Phil Carmody
    Cc: "David S. Miller"
    Cc: Ville Syrjala
    Cc: Dmitry Torokhov
    Cc: Alessandro Rubini
    Cc: Michal Januszewski
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-input@vger.kernel.org
    Cc: linux-fbdev-devel@lists.sourceforge.net
    Cc: linux-nfs@vger.kernel.org
    Cc: netdev@vger.kernel.org

    Rusty Russell
     

27 Jan, 2010

1 commit

  • Clean up: Bruce observed we have more or less common logic in each of
    svc_create_xprt()'s callers: the check to create an IPv6 RPC listener
    socket only if CONFIG_IPV6 is set. I'm about to add another case
    that does just the same.

    If we move the ifdefs into __svc_xpo_create(), then svc_create_xprt()
    call sites can get rid of the "#ifdef" ugliness, and can use the same
    logic with or without IPv6 support available in the kernel.

    Signed-off-by: Chuck Lever
    Signed-off-by: J. Bruce Fields

    Chuck Lever
     

06 Dec, 2009

1 commit


04 Dec, 2009

1 commit


10 Aug, 2009

1 commit


19 Jun, 2009

1 commit


18 Jun, 2009

5 commits

  • Clear "ret" if the error return from svc_create_xprt(AF_INET6) was
    -EAFNOSUPORT. Otherwise, callback start-up will succeed, but
    nfs_callback_up() will return -EAFNOSUPPORT anyway, and the first
    NFSv4 mount attempt after a reboot will fail.

    Bug introduced by commit f738f517 in 2.6.30-rc1.

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

    Chuck Lever
     
  • Tracks the nfs_callback_info for both versions, enabling the callback
    service for v4 and v4.1 to run concurrently and be stopped independently
    of each other.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Andy Adamson
     
  • Signed-off-by: Benny Halevy

    Benny Halevy
     
  • nfs41_callback_up() initializes the necessary queues and creates the new
    nfs41_callback_svc thread. This thread executes the callback service which
    waits for requests to arrive on the svc_serv->sv_cb_list.

    NFS41_BC_MIN_CALLBACKS is set to 1 because we expect callbacks to not
    cause substantial latency.

    The actual processing of the callback will be implemented as a separate patch.

    There is only one NFSv4.1 callback service. The first caller of
    nfs4_callback_up() creates the service, subsequent callers increment a
    reference count on the service. The service is destroyed when the last
    caller invokes nfs_callback_down().

    The transport needs to hold a reference to the callback service in order
    to invoke it during callback processing. Currently this reference is only
    obtained when the service is first created. This is incorrect, since
    subsequent registrations for other transports will leave the xprt->serv
    pointer uninitialized, leading to an oops when a callback arrives on
    the "unreferenced" transport.

    This patch fixes the problem by ensuring that a reference to the service
    is saved in xprt->serv, either because the service is created by this
    invocation to nfs4_callback_up() or by a prior invocation.

    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: Add a reference to svc_serv during callback service bring up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [Type check arguments of nfs_callback_up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: save svc_serv in nfs_callback_info]
    Signed-off-by: Benny Halevy
    [Removal of ugly #ifdefs]
    [nfs41: Update to removal of ugly #ifdefs]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Ricardo Labiaga
     
  • move nfs4_init_callback into nfs4_init_client_minor_version
    and nfs4_destroy_callback into nfs4_clear_client_minor_version

    as these need to happen also when auto-negotiating the minorversion
    once the callback service for nfs41 becomes different than for nfs4.0

    Signed-off-by: Benny Halevy
    [nfs41: Fix checkpatch warning]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [Type check arguments of nfs_callback_up]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy
    [nfs41: Backchannel: Remove FIXME comment]
    Signed-off-by: Ricardo Labiaga
    Signed-off-by: Benny Halevy

    Benny Halevy
     

29 Mar, 2009

4 commits

  • Apparently a lot of people need to disable IPv6 completely on their
    distributor-built systems, which have CONFIG_IPV6_MODULE enabled at
    build time.

    They do this by blacklisting the ipv6.ko module. This causes the
    creation of the NFSv4 callback service listener to fail if
    CONFIG_IPV6_MODULE is set, but the module cannot be loaded.

    Now that the kernel's PF_INET6 RPC listeners are completely separate
    from PF_INET listeners, we can always start PF_INET. Then the NFS
    client can try to start a PF_INET6 listener, but it isn't required
    to be available.

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

    Chuck Lever
     
  • We're about to convert over to using separate PF_INET and PF_INET6
    listeners, instead of a single PF_INET6 listener that also receives
    AF_INET requests and maps them to AF_INET6.

    Clear the way by removing the logic in lockd and the NFSv4 callback
    server that creates an AF_INET6 service listener.

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

    Chuck Lever
     
  • Since an RPC service listener's protocol family is specified now via
    svc_create_xprt(), it no longer needs to be passed to svc_create() or
    svc_create_pooled(). Remove that argument from the synopsis of those
    functions, and remove the sv_family field from the svc_serv struct.

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

    Chuck Lever
     
  • The sv_family field is going away. Pass a protocol family argument to
    svc_create_xprt() instead of extracting the family from the passed-in
    svc_serv struct.

    Again, as this is a listener socket and not an address, we make this
    new argument an "int" protocol family, instead of an "sa_family_t."

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

    Chuck Lever
     

24 Dec, 2008

1 commit


18 Oct, 2008

1 commit


30 Sep, 2008

1 commit


10 Jul, 2008

2 commits


17 May, 2008

1 commit