1. 23 3月, 2013 1 次提交
  2. 15 3月, 2013 1 次提交
  3. 26 1月, 2013 1 次提交
  4. 19 12月, 2012 2 次提交
  5. 19 4月, 2012 1 次提交
  6. 05 4月, 2012 1 次提交
  7. 15 12月, 2011 1 次提交
  8. 05 12月, 2011 3 次提交
  9. 02 12月, 2011 1 次提交
  10. 11 11月, 2011 1 次提交
  11. 21 10月, 2011 4 次提交
    • P
      block: change flush to co_flush · 8b94ff85
      Paolo Bonzini 提交于
      Since coroutine operation is now mandatory, convert all bdrv_flush
      implementations to coroutines.  For qcow2, this means taking the lock.
      Other implementations are simpler and just forward bdrv_flush to the
      underlying protocol, so they can avoid the lock.
      
      The bdrv_flush callback is then unused and can be eliminated.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8b94ff85
    • P
      block: take lock around bdrv_write implementations · e183ef75
      Paolo Bonzini 提交于
      This does the first part of the conversion to coroutines, by
      wrapping bdrv_write implementations to take the mutex.
      
      Drivers that implement bdrv_write rather than bdrv_co_writev can
      then benefit from asynchronous operation (at least if the underlying
      protocol supports it, which is not the case for raw-win32), even
      though they still operate with a bounce buffer.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e183ef75
    • P
      block: take lock around bdrv_read implementations · 2914caa0
      Paolo Bonzini 提交于
      This does the first part of the conversion to coroutines, by
      wrapping bdrv_read implementations to take the mutex.
      
      Drivers that implement bdrv_read rather than bdrv_co_readv can
      then benefit from asynchronous operation (at least if the underlying
      protocol supports it, which is not the case for raw-win32), even
      though they still operate with a bounce buffer.
      
      raw-win32 does not need the lock, because it cannot yield.
      nbd also doesn't probably, but better be safe.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      2914caa0
    • P
      block: add a CoMutex to synchronous read drivers · 848c66e8
      Paolo Bonzini 提交于
      The big conversion of bdrv_read/write to coroutines caused the two
      homonymous callbacks in BlockDriver to become reentrant.  It goes
      like this:
      
      1) bdrv_read is now called in a coroutine, and calls bdrv_read or
      bdrv_pread.
      
      2) the nested bdrv_read goes through the fast path in bdrv_rw_co_entry;
      
      3) in the common case when the protocol is file, bdrv_co_do_readv calls
      bdrv_co_readv_em (and from here goes to bdrv_co_io_em), which yields
      until the AIO operation is complete;
      
      4) if bdrv_read had been called from a bottom half, the main loop
      is free to iterate again: a device model or another bottom half
      can then come and call bdrv_read again.
      
      This applies to all four of read/write/flush/discard.  It would also
      apply to is_allocated, but it is not used from within coroutines:
      besides qemu-img.c and qemu-io.c, which operate synchronously, the
      only user is the monitor.  Copy-on-read will introduce a use in the
      block layer, and will require converting it.
      
      The solution is "simply" to convert all drivers to coroutines!  We
      just need to add a CoMutex that is taken around affected operations.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      848c66e8
  12. 04 11月, 2010 1 次提交
  13. 22 6月, 2010 1 次提交
  14. 15 6月, 2010 3 次提交
  15. 03 5月, 2010 1 次提交
    • K
      block: Open the underlying image file in generic code · 66f82cee
      Kevin Wolf 提交于
      Format drivers shouldn't need to bother with things like file names, but rather
      just get an open BlockDriverState for the underlying protocol. This patch
      introduces this behaviour for bdrv_open implementation. For protocols which
      need to access the filename to open their file/device/connection/... a new
      callback bdrv_file_open is introduced which doesn't get an underlying file
      opened.
      
      For now, also some of the more obscure formats use bdrv_file_open because they
      open() the file themselves instead of using the block.c functions. They need to
      be fixed in later patches.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      66f82cee
  16. 10 3月, 2010 1 次提交
  17. 27 1月, 2010 1 次提交
  18. 11 9月, 2009 1 次提交
    • C
      block: use fdatasync instead of fsync if possible · 6f1953c4
      Christoph Hellwig 提交于
      If we are flushing the caches for our image files we only care about the
      data (including the metadata required for accessing it) but not things
      like timestamp updates.  So try to use fdatasync instead of fsync to
      implement the flush operations.
      
      Unfortunately many operating systems still do not support fdatasync,
      so we add a qemu_fdatasync wrapper that uses fdatasync if available
      as per the _POSIX_SYNCHRONIZED_IO feature macro or fsync otherwise.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      6f1953c4
  19. 06 6月, 2009 1 次提交
  20. 22 5月, 2009 1 次提交
  21. 15 5月, 2009 2 次提交
  22. 14 4月, 2009 1 次提交
  23. 08 3月, 2009 1 次提交
  24. 11 11月, 2007 1 次提交
  25. 17 9月, 2007 2 次提交
  26. 02 8月, 2006 1 次提交
  27. 04 6月, 2006 1 次提交
  28. 29 4月, 2005 1 次提交
  29. 10 4月, 2005 1 次提交
  30. 19 9月, 2004 1 次提交