1. 16 6月, 2016 1 次提交
    • K
      raw-posix: Switch to bdrv_co_* interfaces · 2174f12b
      Kevin Wolf 提交于
      In order to use the modern byte-based .bdrv_co_preadv/pwritev()
      interface, this patch switches raw-posix to coroutine-based interfaces
      as a first step. In terms of semantics and performance, it doesn't make
      a difference with the existing code whether we go from a coroutine to a
      callback-based interface already in block/io.c or only in linux-aio.c
      
      As there have been concerns in the past that this change may be a step
      in the wrong direction with respect to a possible AIO fast path, the
      old callback-based interface for linux-aio is left around and can be
      reactivated when a fast path (e.g. directly from virtio-blk dataplane,
      bypassing the whole block layer) is implemented.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      2174f12b
  2. 12 5月, 2016 2 次提交
  3. 20 1月, 2016 1 次提交
  4. 24 10月, 2015 1 次提交
  5. 13 12月, 2014 5 次提交
  6. 20 10月, 2014 2 次提交
  7. 22 9月, 2014 2 次提交
  8. 29 8月, 2014 1 次提交
    • S
      linux-aio: avoid deadlock in nested aio_poll() calls · 2cdff7f6
      Stefan Hajnoczi 提交于
      If two Linux AIO request completions are fetched in the same
      io_getevents() call, QEMU will deadlock if request A's callback waits
      for request B to complete using an aio_poll() loop.  This was reported
      to happen with the mirror blockjob.
      
      This patch moves completion processing into a BH and makes it resumable.
      Nested event loops can resume completion processing so that request B
      will complete and the deadlock will not occur.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Ming Lei <ming.lei@canonical.com>
      Cc: Marcin Gibuła <m.gibula@beyond.pl>
      Reported-by: NMarcin Gibuła <m.gibula@beyond.pl>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Tested-by: NMarcin Gibuła <m.gibula@beyond.pl>
      2cdff7f6
  9. 15 7月, 2014 1 次提交
  10. 07 7月, 2014 1 次提交
  11. 04 6月, 2014 2 次提交
  12. 19 8月, 2013 2 次提交
  13. 19 12月, 2012 2 次提交
  14. 15 11月, 2012 1 次提交
  15. 31 10月, 2012 2 次提交
  16. 30 10月, 2012 2 次提交
  17. 12 6月, 2012 1 次提交
    • M
      consolidate qemu_iovec_memset{,_skip}() into single function and use existing iov_memset() · 3d9b4925
      Michael Tokarev 提交于
      This patch combines two functions into one, and replaces
      the implementation with already existing iov_memset() from
      iov.c.
      
      The new prototype of qemu_iovec_memset():
        size_t qemu_iovec_memset(qiov, size_t offset, int fillc, size_t bytes)
      It is different from former qemu_iovec_memset_skip(), and
      I want to make other functions to be consistent with it
      too: first how much to skip, second what, and 3rd how many
      of it.  It also returns actual number of bytes filled in,
      which may be less than the requested `bytes' if qiov is
      smaller than offset+bytes, in the same way iov_memset()
      does.
      
      While at it, use utility function iov_memset() from
      iov.h in posix-aio-compat.c, where qiov was used.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      3d9b4925
  18. 19 4月, 2012 1 次提交
  19. 05 4月, 2012 1 次提交
  20. 15 12月, 2011 1 次提交
  21. 14 10月, 2011 1 次提交
    • K
      linux-aio: Allow reads beyond the end of growable images · b161e2e4
      Kevin Wolf 提交于
      This is the linux-aio version of commits 22afa7b5 (raw-posix, synchronous) and
      ba1d1afd (posix-aio-compat). Reads now produce zeros after the end of file
      instead of failing or resulting in short reads, making linux-aio compatible
      with the behaviour of synchronous raw-posix requests and posix-aio-compat.
      
      The problem can be reproduced like this:
      
      dd if=/dev/zero of=/tmp/test.raw bs=1 count=1234
      ./qemu-io -k -n -g -c 'read -p 1024 512' /tmp/test.raw
      
      Previously, the result of this was 'read failed: Invalid argument', now the
      read completes successfully.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      b161e2e4
  22. 11 10月, 2011 1 次提交
  23. 20 9月, 2011 1 次提交
  24. 06 9月, 2011 1 次提交
  25. 21 8月, 2011 1 次提交
  26. 02 8月, 2011 1 次提交
    • K
      async: Remove AsyncContext · 384acbf4
      Kevin Wolf 提交于
      The purpose of AsyncContexts was to protect qcow and qcow2 against reentrancy
      during an emulated bdrv_read/write (which includes a qemu_aio_wait() call and
      can run AIO callbacks of different requests if it weren't for AsyncContexts).
      
      Now both qcow and qcow2 are protected by CoMutexes and AsyncContexts can be
      removed.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      384acbf4
  27. 23 4月, 2010 1 次提交
  28. 28 10月, 2009 1 次提交