1. 20 9月, 2016 1 次提交
    • C
      SUNRPC: Generalize the RPC buffer release API · 3435c74a
      Chuck Lever 提交于
      xprtrdma needs to allocate the Call and Reply buffers separately.
      TBH, the reliance on using a single buffer for the pair of XDR
      buffers is transport implementation-specific.
      
      Instead of passing just the rq_buffer into the buf_free method, pass
      the task structure and let buf_free take care of freeing both
      XDR buffers at once.
      
      There's a micro-optimization here. In the common case, both
      xprt_release and the transport's buf_free method were checking if
      rq_buffer was NULL. Now the check is done only once per RPC.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      3435c74a
  2. 03 8月, 2016 1 次提交
  3. 14 6月, 2016 2 次提交
  4. 06 2月, 2016 2 次提交
  5. 01 2月, 2016 2 次提交
  6. 20 1月, 2016 1 次提交
  7. 20 9月, 2015 1 次提交
  8. 20 6月, 2015 1 次提交
  9. 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
  10. 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
  11. 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
  12. 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
  13. 28 3月, 2015 1 次提交
  14. 10 2月, 2015 1 次提交
  15. 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
  16. 28 11月, 2014 1 次提交
  17. 25 11月, 2014 2 次提交
  18. 18 7月, 2014 1 次提交
  19. 03 7月, 2014 1 次提交
  20. 04 6月, 2014 1 次提交
  21. 18 4月, 2014 1 次提交
  22. 30 3月, 2014 1 次提交
  23. 15 1月, 2014 1 次提交
  24. 01 1月, 2014 1 次提交
  25. 29 10月, 2013 1 次提交
  26. 02 10月, 2013 5 次提交
  27. 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
  28. 15 4月, 2013 1 次提交
  29. 23 2月, 2013 1 次提交
  30. 01 2月, 2013 3 次提交