10 Jul, 2008

1 commit

  • The cl_chatty flag alows us to control whether a given rpc client leaves

    "server X not responding, timed out"

    messages in the syslog. Such messages make sense for ordinary nfs
    clients (where an unresponsive server means applications on the
    mountpoint are probably hanging), but not for the callback client (which
    can fail more commonly, with the only result just of disabling some
    optimizations).

    Previously cl_chatty was removed, do to lack of users; reinstate it, and
    use it for the nfsd's callback client.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Olga Kornievskaia
     

19 May, 2008

1 commit


30 Apr, 2008

1 commit


24 Apr, 2008

1 commit

  • There's no need to dynamically allocate this memory, and doing so may
    create the possibility of races on shutdown of the rpc client. (We've
    witnessed it only after adding rpcsec_gss support to the server, after
    which the rpc code can send destroys calls that expect to still be able
    to access the rpc_stats structure after it has been destroyed.)

    Such races are in theory possible if the module containing this "static"
    memory is removed very quickly after an rpc client is destroyed, but
    we haven't seen that happen.

    Signed-off-by: J. Bruce Fields

    Olga Kornievskaia
     

02 Feb, 2008

3 commits

  • When the callback channel fails, we inform the client of that by
    returning a cb_path_down error the next time it tries to renew its
    lease.

    If we wait most of a lease period before deciding that a callback has
    failed and that the callback channel is down, then we decrease the
    chances that the client will find out in time to do anything about it.

    So, mark the channel down as soon as we recognize that an rpc has
    failed. However, continue trying to recall delegations anyway, in hopes
    it will come back up. This will prevent more delegations from being
    given out, and ensure cb_path_down is returned to renew calls earlier,
    while still making the best effort to deliver recalls of existing
    delegations.

    Also fix a couple comments and remove a dprink that doesn't seem likely
    to be useful.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The whole reason to move this callback-channel probe into a separate
    thread was because (for now) we don't have an easy way to create the
    rpc_client asynchronously. But I forgot to move the rpc_create() to the
    spawned thread. Doh! Fix that.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Our callback code doesn't actually handle concurrent attempts to probe
    the callback channel. Some rethinking of the locking may be required.
    However, we can also just move the callback probing to this case. Since
    this is the only time a client is "confirmed" (and since that can only
    happen once in the lifetime of a client), this ensures we only probe
    once.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

10 Oct, 2007

3 commits

  • It's not enough to take a reference on the delegation object itself; we
    need to ensure that the rpc_client won't go away just as we're about to
    make an rpc call.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • It doesn't make sense to make the callback with credentials that the
    client made the setclientid with. Instead the spec requires that the
    callback occur with the credentials the client authenticated *to*.
    It probably doesn't matter what we use for auth_unix, and some more
    infrastructure will be needed for auth_gss, so let's just remove the
    cred lookup for now.

    Signed-off-by: J. Bruce Fields
    Acked-by: Neil Brown

    J. Bruce Fields
     
  • We want to allow gss on the callback channel, so people using krb5 can
    still get the benefits of delegations.

    But looking up the rpc credential can take some time in that case. And
    we shouldn't delay the response to setclientid_confirm while we wait.

    It may be inefficient, but for now the simplest solution is just to
    spawn a new thread as necessary for the purpose.

    (Thanks to Adrian Bunk for catching a missing static here.)

    Signed-off-by: "J. Bruce Fields"
    Cc: Adrian Bunk

    J. Bruce Fields
     

18 Jul, 2007

1 commit


11 Jul, 2007

2 commits


22 May, 2007

1 commit

  • First thing mm.h does is including sched.h solely for can_do_mlock() inline
    function which has "current" dereference inside. By dealing with can_do_mlock()
    mm.h can be detached from sched.h which is good. See below, why.

    This patch
    a) removes unconditional inclusion of sched.h from mm.h
    b) makes can_do_mlock() normal function in mm/mlock.c
    c) exports can_do_mlock() to not break compilation
    d) adds sched.h inclusions back to files that were getting it indirectly.
    e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
    getting them indirectly

    Net result is:
    a) mm.h users would get less code to open, read, preprocess, parse, ... if
    they don't need sched.h
    b) sched.h stops being dependency for significant number of files:
    on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
    after patch it's only 3744 (-8.3%).

    Cross-compile tested on

    all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
    alpha alpha-up
    arm
    i386 i386-up i386-defconfig i386-allnoconfig
    ia64 ia64-up
    m68k
    mips
    parisc parisc-up
    powerpc powerpc-up
    s390 s390-up
    sparc sparc-up
    sparc64 sparc64-up
    um-x86_64
    x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

    as well as my two usual configs.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

01 May, 2007

1 commit

  • The RPC buffer size estimation logic in net/sunrpc/clnt.c always
    significantly overestimates the requirements for the buffer size.
    A little instrumentation demonstrated that in fact rpc_malloc was never
    allocating the buffer from the mempool, but almost always called kmalloc.

    To compute the size of the RPC buffer more precisely, split p_bufsiz into
    two fields; one for the argument size, and one for the result size.

    Then, compute the sum of the exact call and reply header sizes, and split
    the RPC buffer precisely between the two. That should keep almost all RPC
    buffers within the 2KiB buffer mempool limit.

    And, we can finally be rid of RPC_SLACK_SPACE!

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

    Chuck Lever
     

17 Feb, 2007

1 commit

  • The server name is expected to be a null-terminated string, so we can't pass
    in the raw client identifier.

    What's more, the client identifier is just a binary, not necessarily
    printable, blob. Let's just use the ip address instead. The server name
    appears to exist just to help debugging by making some printk's more
    informative.

    Note that the string is copies into the rpc client structure, so the pointer
    to the local variable does not outlive the function call.

    Signed-off-by: "J. Bruce Fields"
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     

21 Oct, 2006

2 commits


17 Oct, 2006

1 commit


02 Oct, 2006

1 commit


23 Sep, 2006

1 commit


01 Jul, 2006

1 commit


11 Apr, 2006

1 commit


26 Mar, 2006

1 commit

  • * git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits)
    SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies
    SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc
    LOCKD: Make nlmsvc_traverse_shares return void
    LOCKD: nlmsvc_traverse_blocks return is unused
    SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers.
    NFSv4: Dont list system.nfs4_acl for filesystems that don't support it.
    SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum
    SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release()
    SUNRPC: Fix memory barriers for req->rq_received
    NFS: Fix a race in nfs_sync_inode()
    NFS: Clean up nfs_flush_list()
    NFS: Fix a race with PG_private and nfs_release_page()
    NFSv4: Ensure the callback daemon flushes signals
    SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs
    NFS, NLM: Allow blocking locks to respect signals
    NFS: Make nfs_fhget() return appropriate error values
    NFSv4: Fix an oops in nfs4_fill_super
    lockd: blocks should hold a reference to the nlm_file
    NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE
    NFSv4: Send the delegation stateid for SETATTR calls
    ...

    Linus Torvalds
     

24 Mar, 2006

1 commit

  • Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
    duplicate of ARRAY_SIZE. Some trailing whitespaces are also deleted.

    Signed-off-by: Tobias Klauser
    Cc: David Howells
    Cc: Dave Kleikamp
    Acked-by: Trond Myklebust
    Cc: Neil Brown
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: Christoph Hellwig
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     

21 Mar, 2006

1 commit

  • Add fields to the rpc_procinfo struct that allow the display of a
    human-readable name for each procedure in the rpc_iostats output.

    Also fix it so that the NFSv4 stats are broken up correctly by
    sub-procedure number. NFSv4 uses only two real RPC procedures:
    NULL, and COMPOUND.

    Test plan:
    Mount with NFSv2, NFSv3, and NFSv4, and do "cat /proc/self/mountstats".

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

    Chuck Lever
     

07 Jan, 2006

2 commits

  • Clean up: Every ULP that uses the in-kernel RPC client, except the NLM
    client, sets cl_chatty. There's no reason why NLM shouldn't set it, so
    just get rid of cl_chatty and always be verbose.

    Test-plan:
    Compile with CONFIG_NFS enabled.

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

    Chuck Lever
     
  • Shrink the RPC task structure. Instead of storing separate pointers
    for task->tk_exit and task->tk_release, put them in a structure.

    Also pass the user data pointer as a parameter instead of passing it via
    task->tk_calldata. This enables us to nest callbacks.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

24 Jun, 2005

3 commits

  • The cb_parsed field is only used by probe_callback, to determine whether the
    callback information has been filled in by setclientid. But there is no way
    that probe_callback() can be called without that having already happened, so
    that check is superfluous, as is cb_parsed.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • This patch contains the following possible cleanups:

    - make needlessly global code static

    Signed-off-by: Adrian Bunk
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • rpc_create_client was modified recently to do its own (synchronous) NULL ping
    of the server. We'd rather do that on our own, asynchronously, so that we
    don't have to block the nfsd thread doing the probe, and so that setclientid
    handling (hence, client mounts) can proceed normally whether the callback is
    succesful or not. (We can still function fine without the callback
    channel--we just won't be able to give out delegations till it's verified to
    work.)

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

23 Jun, 2005

1 commit


17 Apr, 2005

2 commits

  • rpc_create_clnt and friends return errors, not NULL, on failure.

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • 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