1. 15 6月, 2012 4 次提交
  2. 26 5月, 2012 1 次提交
  3. 08 5月, 2012 1 次提交
    • K
      qcow2: Limit COW to where it's needed · 54e68143
      Kevin Wolf 提交于
      This fixes a regression introduced in commit 250196f1. The bug leads to
      data corruption, found during an Autotest run with a Fedora 8 guest.
      
      Consider a write request whose first part is covered by an already
      allocated cluster, but additional clusters need to be newly allocated.
      When counting the number of clusters to allocate, the qcow2 code would
      decide to do COW for all remaining clusters of the write request, even
      if some of them are already allocated.
      
      If during this COW operation another write request is issued that touches
      the same cluster, it will still refer to the old cluster. When the COW
      completes, the first request will update the L2 table and the second
      write request will be lost. Note that the requests need not overlap, it's
      enough for them to touch the same cluster.
      
      This patch ensures that only clusters that really require COW are
      considered for allocation. In this case any other request writing to the
      same cluster will be an allocating write and gets serialised.
      Reported-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Tested-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      54e68143
  4. 03 5月, 2012 2 次提交
  5. 20 4月, 2012 7 次提交
  6. 19 4月, 2012 1 次提交
  7. 05 4月, 2012 1 次提交
  8. 12 3月, 2012 3 次提交
  9. 05 12月, 2011 2 次提交
    • S
      qcow2: avoid reentrant bdrv_read() in copy_sectors() · aef4acb6
      Stefan Hajnoczi 提交于
      A BlockDriverState should not issue requests on itself through the
      public block layer interface.  Nested, or reentrant, requests are
      problematic because they do I/O throttling and request tracking twice.
      
      Features like block layer copy-on-read use request tracking to avoid
      race conditions between concurrent requests.  The reentrant request will
      have to "wait" for its parent request to complete.  But the parent is
      waiting for the reentrant request to make progress so we have reached
      deadlock.
      
      The solution is for block drivers to avoid the public block layer
      interfaces for reentrant requests.   Instead they should call their own
      internal functions if they wish to perform reentrant requests.
      
      This is also a good opportunity to make copy_sectors() a true
      coroutine_fn.  That means calling bdrv_co_writev() instead of
      bdrv_write().  Behavior is unchanged but we're being explicit that this
      executes in coroutine context.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      aef4acb6
    • K
      qcow2: Unlock during COW · 1b9f1491
      Kevin Wolf 提交于
      Unlocking during COW allows for more parallelism. One change it requires is
      that buffers are dynamically allocated instead of just using a per-image
      buffer.
      
      While touching the code, drop the synchronous qcow2_read() function and replace
      it by a bdrv_read() call.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1b9f1491
  10. 21 10月, 2011 1 次提交
  11. 12 9月, 2011 3 次提交
  12. 25 8月, 2011 1 次提交
  13. 23 8月, 2011 1 次提交
  14. 21 8月, 2011 1 次提交
  15. 02 8月, 2011 1 次提交
  16. 15 6月, 2011 1 次提交
  17. 08 6月, 2011 1 次提交
  18. 10 2月, 2011 2 次提交
  19. 31 1月, 2011 1 次提交
  20. 24 1月, 2011 3 次提交
  21. 17 12月, 2010 1 次提交
  22. 04 11月, 2010 1 次提交