1. 06 9月, 2013 1 次提交
  2. 23 8月, 2013 1 次提交
  3. 03 5月, 2013 2 次提交
    • S
      nbd: support large NBD requests · 2d821488
      Stefan Hajnoczi 提交于
      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
      request.
      Reported-by: NNick Thomas <nick@bytemark.co.uk>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2d821488
    • S
      nbd: use g_slice_new() instead of a freelist · e1adb27a
      Stefan Hajnoczi 提交于
      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: NStefan Hajnoczi <stefanha@redhat.com>
      e1adb27a
  4. 02 4月, 2013 1 次提交
  5. 23 3月, 2013 2 次提交
  6. 19 12月, 2012 2 次提交
  7. 28 11月, 2012 1 次提交
  8. 13 11月, 2012 1 次提交
  9. 23 10月, 2012 2 次提交
  10. 26 9月, 2012 1 次提交
  11. 19 9月, 2012 10 次提交
  12. 18 9月, 2012 1 次提交
  13. 14 8月, 2012 1 次提交
  14. 11 5月, 2012 2 次提交
  15. 19 4月, 2012 6 次提交
  16. 16 4月, 2012 1 次提交
  17. 22 12月, 2011 5 次提交
    • P
      qemu-nbd: throttle requests · 41996e38
      Paolo Bonzini 提交于
      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: NPaolo Bonzini <pbonzini@redhat.com>
      41996e38
    • P
      qemu-nbd: asynchronous operation · 262db388
      Paolo Bonzini 提交于
      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
      patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      262db388
    • P
      qemu-nbd: add client pointer to NBDRequest · 72deddc5
      Paolo Bonzini 提交于
      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: NPaolo Bonzini <pbonzini@redhat.com>
      72deddc5
    • P
      qemu-nbd: move client handling to nbd.c · 1743b515
      Paolo Bonzini 提交于
      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: NPaolo Bonzini <pbonzini@redhat.com>
      1743b515
    • P
      qemu-nbd: introduce NBDRequest · d9a73806
      Paolo Bonzini 提交于
      Move the buffer from NBDExport to a new structure, so that it will be
      possible to have multiple in-flight requests for the same export
      (and for the same client too---we get that for free).
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      d9a73806