1. 20 6月, 2015 1 次提交
  2. 16 6月, 2015 1 次提交
    • N
      SUNRPC: never enqueue a ->rq_cong request on ->sending · 29807318
      Neil Brown 提交于
      If the sending queue has a task without ->rq_cong set at the front,
      and then a number of tasks with ->rq_cong set such that they use
      the entire congestion window, then the queue deadlocks.  The first
      entry cannot be processed until later entries complete.
      
      This scenario has been seen with a client using UDP to access a server,
      and the network connection breaking for a period of time - it doesn't
      recover.
      
      It never really makes sense for an ->rq_cong request to be on the ->sending
      queue, but it can happen when a request is being retried, and finds
      the transport if locked (XPRT_LOCKED).  In this case we simple call
      __xprt_put_cong() and the deadlock goes away.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      29807318
  3. 11 6月, 2015 1 次提交
    • C
      SUNRPC: Transport fault injection · 4a068258
      Chuck Lever 提交于
      It has been exceptionally useful to exercise the logic that handles
      local immediate errors and RDMA connection loss.  To enable
      developers to test this regularly and repeatably, add logic to
      simulate connection loss every so often.
      
      Fault injection is disabled by default. It is enabled with
      
        $ sudo echo xxx > /sys/kernel/debug/sunrpc/inject_fault/disconnect
      
      where "xxx" is a large positive number of transport method calls
      before a disconnect. A value of several thousand is usually a good
      number that allows reasonable forward progress while still causing a
      lot of connection drops.
      
      These hooks are disabled when SUNRPC_DEBUG is turned off.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      4a068258
  4. 24 4月, 2015 1 次提交
    • J
      sunrpc: make debugfs file creation failure non-fatal · 3f940098
      Jeff Layton 提交于
      v2: gracefully handle the case where some dentry pointers end up NULL
          and be more dilligent about zeroing out dentry pointers
      
      We currently have a problem that SELinux policy is being enforced when
      creating debugfs files. If a debugfs file is created as a side effect of
      doing some syscall, then that creation can fail if the SELinux policy
      for that process prevents it.
      
      This seems wrong. We don't do that for files under /proc, for instance,
      so Bruce has proposed a patch to fix that.
      
      While discussing that patch however, Greg K.H. stated:
      
          "No kernel code should care / fail if a debugfs function fails, so
           please fix up the sunrpc code first."
      
      This patch converts all of the sunrpc debugfs setup code to be void
      return functins, and the callers to not look for errors from those
      functions.
      
      This should allow rpc_clnt and rpc_xprt creation to work, even if the
      kernel fails to create debugfs files for some reason.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: N"J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      3f940098
  5. 01 4月, 2015 1 次提交
    • J
      sunrpc: make debugfs file creation failure non-fatal · f9c72d10
      Jeff Layton 提交于
      We currently have a problem that SELinux policy is being enforced when
      creating debugfs files. If a debugfs file is created as a side effect of
      doing some syscall, then that creation can fail if the SELinux policy
      for that process prevents it.
      
      This seems wrong. We don't do that for files under /proc, for instance,
      so Bruce has proposed a patch to fix that.
      
      While discussing that patch however, Greg K.H. stated:
      
          "No kernel code should care / fail if a debugfs function fails, so
           please fix up the sunrpc code first."
      
      This patch converts all of the sunrpc debugfs setup code to be void
      return functins, and the callers to not look for errors from those
      functions.
      
      This should allow rpc_clnt and rpc_xprt creation to work, even if the
      kernel fails to create debugfs files for some reason.
      
      Symptoms were failing krb5 mounts on systems using gss-proxy and
      selinux.
      
      Fixes: 388f0c77 "sunrpc: add a debugfs rpc_xprt directory..."
      Cc: stable@vger.kernel.org
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      f9c72d10
  6. 28 3月, 2015 1 次提交
  7. 10 2月, 2015 1 次提交
  8. 09 2月, 2015 1 次提交
    • T
      SUNRPC: Add helpers to prevent socket create from racing · 718ba5b8
      Trond Myklebust 提交于
      The socket lock is currently held by the task that is requesting the
      connection be established. While that is efficient in the case where
      the connection happens quickly, it is racy in the case where it doesn't.
      What we really want is for the connect helper to be able to block access
      to the socket while it is being set up.
      
      This patch does so by arranging to transfer the socket lock from the
      task that is requesting the connect attempt, and then releasing that
      lock once everything is done.
      This scheme also gives us automatic protection against collisions with
      the RPC close code, so we can kill the cancel_delayed_work_sync()
      call in xs_close().
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      718ba5b8
  9. 28 11月, 2014 1 次提交
  10. 25 11月, 2014 2 次提交
  11. 18 7月, 2014 1 次提交
  12. 03 7月, 2014 1 次提交
  13. 04 6月, 2014 1 次提交
  14. 18 4月, 2014 1 次提交
  15. 30 3月, 2014 1 次提交
  16. 15 1月, 2014 1 次提交
  17. 01 1月, 2014 1 次提交
  18. 29 10月, 2013 1 次提交
  19. 02 10月, 2013 5 次提交
  20. 26 4月, 2013 1 次提交
    • J
      SUNRPC: allow disabling idle timeout · 33d90ac0
      J. Bruce Fields 提交于
      In the gss-proxy case we don't want to have to reconnect at random--we
      want to connect only on gss-proxy startup when we can steal gss-proxy's
      context to do the connect in the right namespace.
      
      So, provide a flag that allows the rpc_create caller to turn off the
      idle timeout.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      33d90ac0
  21. 15 4月, 2013 1 次提交
  22. 23 2月, 2013 1 次提交
  23. 01 2月, 2013 5 次提交
  24. 09 1月, 2013 1 次提交
    • T
      SUNRPC: Ensure we release the socket write lock if the rpc_task exits early · 87ed5003
      Trond Myklebust 提交于
      If the rpc_task exits while holding the socket write lock before it has
      allocated an rpc slot, then the usual mechanism for releasing the write
      lock in xprt_release() is defeated.
      
      The problem occurs if the call to xprt_lock_write() initially fails, so
      that the rpc_task is put on the xprt->sending wait queue. If the task
      exits after being assigned the lock by __xprt_lock_write_func, but
      before it has retried the call to xprt_lock_and_alloc_slot(), then
      it calls xprt_release() while holding the write lock, but will
      immediately exit due to the test for task->tk_rqstp != NULL.
      Reported-by: NChris Perl <chris.perl@gmail.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org [>= 3.1]
      87ed5003
  25. 29 9月, 2012 1 次提交
  26. 07 9月, 2012 1 次提交
    • T
      SUNRPC: Fix a UDP transport regression · f39c1bfb
      Trond Myklebust 提交于
      Commit 43cedbf0 (SUNRPC: Ensure that
      we grab the XPRT_LOCK before calling xprt_alloc_slot) is causing
      hangs in the case of NFS over UDP mounts.
      
      Since neither the UDP or the RDMA transport mechanism use dynamic slot
      allocation, we can skip grabbing the socket lock for those transports.
      Add a new rpc_xprt_op to allow switching between the TCP and UDP/RDMA
      case.
      
      Note that the NFSv4.1 back channel assigns the slot directly
      through rpc_run_bc_task, so we can ignore that case.
      Reported-by: NDick Streefland <dick.streefland@altium.nl>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org [>= 3.1]
      f39c1bfb
  27. 11 7月, 2012 1 次提交
  28. 20 5月, 2012 1 次提交
  29. 17 5月, 2012 1 次提交
  30. 16 4月, 2012 1 次提交
  31. 03 3月, 2012 1 次提交