1. 18 3月, 2016 1 次提交
  2. 12 11月, 2015 5 次提交
  3. 11 11月, 2015 2 次提交
    • A
      throttle: Use bs->throttle_state instead of bs->io_limits_enabled · a0d64a61
      Alberto Garcia 提交于
      There are two ways to check for I/O limits in a BlockDriverState:
      
      - bs->throttle_state: if this pointer is not NULL, it means that this
        BDS is member of a throttling group, its ThrottleTimers structure
        has been initialized and its I/O limits are ready to be applied.
      
      - bs->io_limits_enabled: if true it means that the throttle_state
        pointer is valid _and_ the limits are currently enabled.
      
      The latter is used in several places to check whether a BDS has I/O
      limits configured, but what it really checks is whether requests
      are being throttled or not. For example, io_limits_enabled can be
      temporarily set to false in cases like bdrv_read_unthrottled() without
      otherwise touching the throtting configuration of that BDS.
      
      This patch replaces bs->io_limits_enabled with bs->throttle_state in
      all cases where what we really want to check is the existence of I/O
      limits, not whether they are currently enabled or not.
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a0d64a61
    • M
      block: Make bdrv_states public · c69a4dd8
      Max Reitz 提交于
      When inserting a BDS tree into a BB, we will need to add the root BDS to
      this list. Since we will want to do that in the blockdev-insert-medium
      implementation in blockdev.c, we will need access to it there.
      
      This patch is not exactly elegant, but bdrv_states will be removed in
      the future anyway because we no longer need it since we have BBs.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NAlberto Garcia <berto@igalia.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c69a4dd8
  4. 24 10月, 2015 7 次提交
  5. 20 10月, 2015 1 次提交
    • D
      coroutine: move into libqemuutil.a library · 10817bf0
      Daniel P. Berrange 提交于
      The coroutine files are currently referenced by the block-obj-y
      variable. The coroutine functionality though is already used by
      more than just the block code. eg migration code uses coroutine
      yield. In the future the I/O channel code will also use the
      coroutine yield functionality. Since the coroutine code is nicely
      self-contained it can be easily built as part of the libqemuutil.a
      library, making it widely available.
      
      The headers are also moved into include/qemu, instead of the
      include/block directory, since they are now part of the util
      codebase, and the impl was never in the block/ directory
      either.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      10817bf0
  6. 16 10月, 2015 7 次提交
  7. 14 7月, 2015 2 次提交
    • K
      block: Fix backing file child when modifying graph · 80a1e130
      Kevin Wolf 提交于
      This patch moves bdrv_attach_child() from the individual places that add
      a backing file to a BDS to bdrv_set_backing_hd(), which is called by all
      of them. It also adds bdrv_detach_child() there.
      
      For normal operation (starting with one backing file chain and not
      changing it until the topmost image is closed) and live snapshots, this
      constitutes no change in behaviour.
      
      For all other cases, this is a fix for the bug that the old backing file
      was still referenced as a child, and the new one wasn't referenced.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      80a1e130
    • K
      block: Introduce bdrv_open_child() · b4b059f6
      Kevin Wolf 提交于
      It is the same as bdrv_open_image(), except that it doesn't only return
      success or failure, but the newly created BdrvChild object for the new
      child node.
      
      As the BdrvChild object already contains a BlockDriverState pointer (and
      this is supposed to become the only pointer so that bdrv_append() and
      friends can just change a single pointer in BdrvChild), the pbs
      parameter is removed for bdrv_open_child().
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      b4b059f6
  8. 02 7月, 2015 3 次提交
  9. 23 6月, 2015 2 次提交
  10. 12 6月, 2015 6 次提交
  11. 22 5月, 2015 1 次提交
    • D
      block: minimal bounce buffer alignment · 4196d2f0
      Denis V. Lunev 提交于
      The patch introduces new concept: minimal memory alignment for bounce
      buffers. Original so called "optimal" value is actually minimal required
      value for aligment. It should be used for validation that the IOVec
      is properly aligned and bounce buffer is not required.
      
      Though, from the performance point of view, it would be better if
      bounce buffer or IOVec allocated by QEMU will be aligned stricter.
      
      The patch does not change any alignment value yet.
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Message-id: 1431441056-26198-2-git-send-email-den@openvz.org
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      4196d2f0
  12. 28 4月, 2015 3 次提交