1. 01 5月, 2007 1 次提交
    • C
      SUNRPC: RPC buffer size estimates are too large · 2bea90d4
      Chuck Lever 提交于
      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: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2bea90d4
  2. 26 4月, 2007 3 次提交
  3. 21 4月, 2007 1 次提交
    • T
      RPC: Fix the TCP resend semantics for NFSv4 · 241c39b9
      Trond Myklebust 提交于
      Fix a regression due to the patch "NFS: disconnect before retrying NFSv4
      requests over TCP"
      
      The assumption made in xprt_transmit() that the condition
      	"req->rq_bytes_sent == 0 and request is on the receive list"
      should imply that we're dealing with a retransmission is false.
      Firstly, it may simply happen that the socket send queue was full
      at the time the request was initially sent through xprt_transmit().
      Secondly, doing this for each request that was retransmitted implies
      that we disconnect and reconnect for _every_ request that happened to
      be retransmitted irrespective of whether or not a disconnection has
      already occurred.
      
      Fix is to move this logic into the call_status request timeout handler.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      241c39b9
  4. 18 4月, 2007 1 次提交
  5. 13 4月, 2007 1 次提交
  6. 05 4月, 2007 1 次提交
  7. 07 3月, 2007 4 次提交
  8. 21 2月, 2007 2 次提交
  9. 15 2月, 2007 5 次提交
  10. 13 2月, 2007 16 次提交
  11. 11 2月, 2007 1 次提交
  12. 10 2月, 2007 1 次提交
    • N
      [PATCH] knfsd: fix a race in closing NFSd connections · aaf68cfb
      NeilBrown 提交于
      If you lose this race, it can iput a socket inode twice and you get a BUG
      in fs/inode.c
      
      When I added the option for user-space to close a socket, I added some
      cruft to svc_delete_socket so that I could call that function when closing
      a socket per user-space request.
      
      This was the wrong thing to do.  I should have just set SK_CLOSE and let
      normal mechanisms do the work.
      
      Not only wrong, but buggy.  The locking is all wrong and it openned up a
      race where-by a socket could be closed twice.
      
      So this patch:
        Introduces svc_close_socket which sets SK_CLOSE then either leave
        the close up to a thread, or calls svc_delete_socket if it can
        get SK_BUSY.
      
        Adds a bias to sk_busy which is removed when SK_DEAD is set,
        This avoid races around shutting down the socket.
      
        Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
        was missing.
      
      Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aaf68cfb
  13. 04 2月, 2007 3 次提交