1. 16 Dec, 2013 1 commit
  2. 06 Sep, 2013 1 commit
  3. 22 Aug, 2013 1 commit
  4. 03 May, 2013 2 commits
    • Stefan Hajnoczi's avatar
      nbd: support large NBD requests · 2d821488
      Stefan Hajnoczi authored
      The Linux nbd driver recently increased the maximum supported request
      size up to 32 MB:
        commit 078be02b80359a541928c899c2631f39628f56df
        Author: Michal Belczyk <belczyk@bsd.krakow.pl>
        Date:   Tue Apr 30 15:28:28 2013 -0700
            nbd: increase default and max request sizes
            Raise the default max request size for nbd to 128KB (from 127KB) to get it
            4KB aligned.  This patch also allows the max request size to be increased
            (via /sys/block/nbd<x>/queue/max_sectors_kb) to 32MB.
      QEMU's 1 MB buffers are too small to handle these requests.
      This patch allocates data buffers dynamically and allows up to 32 MB per
      Reported-by: default avatarNick Thomas <nick@bytemark.co.uk>
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    • Stefan Hajnoczi's avatar
      nbd: use g_slice_new() instead of a freelist · e1adb27a
      Stefan Hajnoczi authored
      Use GLib's efficient slice allocator instead of open-coding the request
      freelist.  This patch simplifies the NBDRequest code.
      Now we qemu_blockalign() the req->data buffer each time but the next
      patch switches from a fixed size buffer to a dynamic size anyway.
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
  5. 02 Apr, 2013 1 commit
  6. 22 Mar, 2013 2 commits
  7. 19 Dec, 2012 2 commits
  8. 28 Nov, 2012 1 commit
  9. 13 Nov, 2012 1 commit
  10. 23 Oct, 2012 2 commits
  11. 26 Sep, 2012 1 commit
  12. 19 Sep, 2012 10 commits
  13. 18 Sep, 2012 1 commit
  14. 13 Aug, 2012 1 commit
  15. 10 May, 2012 2 commits
  16. 19 Apr, 2012 6 commits
  17. 15 Apr, 2012 1 commit
  18. 22 Dec, 2011 4 commits
    • Paolo Bonzini's avatar
      qemu-nbd: throttle requests · 41996e38
      Paolo Bonzini authored
      Limiting the number of in-flight requests is implemented very simply
      with a can_read callback.  It does not require a semaphore, unlike the
      client side in block/nbd.c, because we can throttle directly the creation
      of coroutines.  The client side can have a coroutine created at any time
      when an I/O request is made.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    • Paolo Bonzini's avatar
      qemu-nbd: asynchronous operation · 262db388
      Paolo Bonzini authored
      Using coroutines enable asynchronous operation on both the network and
      the block side.  Network can be owned by two coroutines at the same time,
      one writing and one reading.  On the send side, mutual exclusion is
      guaranteed by a CoMutex.  On the receive side, mutual exclusion is
      guaranteed because new coroutines immediately start receiving data,
      and no new coroutines are created as long as the previous one is receiving.
      Between receive and send, qemu-nbd can have an arbitrary number of
      in-flight block transfers.  Throttling is implemented by the next
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    • Paolo Bonzini's avatar
      qemu-nbd: add client pointer to NBDRequest · 72deddc5
      Paolo Bonzini authored
      By attaching a client to an NBDRequest, we can avoid passing around the
      socket descriptor and data buffer.
      Also, we can now manage the reference count for the client in
      nbd_request_get/put request instead of having to do it ourselved in
      nbd_read.  This simplifies things when coroutines are used.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    • Paolo Bonzini's avatar
      qemu-nbd: move client handling to nbd.c · 1743b515
      Paolo Bonzini authored
      This patch sets up the fd handler in nbd.c instead of qemu-nbd.c.  It
      introduces NBDClient, which wraps the arguments to nbd_trip in a single
      structure, so that we can add a notifier to it.  This way, qemu-nbd can
      know about disconnections.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>