1. 01 4月, 2014 3 次提交
  2. 12 9月, 2013 1 次提交
  3. 15 3月, 2013 1 次提交
  4. 01 2月, 2013 1 次提交
  5. 19 12月, 2012 2 次提交
  6. 04 11月, 2011 2 次提交
  7. 21 10月, 2011 2 次提交
    • 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
  8. 21 8月, 2011 1 次提交
  9. 17 5月, 2010 2 次提交
  10. 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
  11. 15 5月, 2009 2 次提交
  12. 08 3月, 2009 1 次提交
  13. 06 2月, 2009 1 次提交
  14. 13 12月, 2008 1 次提交
  15. 11 11月, 2007 1 次提交
  16. 17 9月, 2007 2 次提交
  17. 02 8月, 2006 1 次提交
  18. 02 2月, 2006 1 次提交
  19. 12 12月, 2004 1 次提交
  20. 30 9月, 2004 1 次提交