1. 05 12月, 2011 3 次提交
    • Z
      qed: adjust the way to get nb_sectors · 23e9a39e
      Zhi Yong Wu 提交于
      This patch is only to refactor some lines of codes to get better and more robust codes.
      
      As you have seen, in qed_read_table_cb() it's nice to
      use qiov->size because that function doesn't obviously use a single
      struct iovec.
      
      In other two functions, if qiov use more than one struct iovec, the existing way will get wrong nb_sectors.
      To make the code more robust, it will be nicer to refactor the existing way as below.
      Signed-off-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com>
      Acked-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      23e9a39e
    • 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
  2. 02 12月, 2011 1 次提交
  3. 30 11月, 2011 2 次提交
  4. 29 11月, 2011 24 次提交
  5. 28 11月, 2011 1 次提交
  6. 26 11月, 2011 4 次提交
  7. 24 11月, 2011 5 次提交