1. 20 7月, 2016 1 次提交
  2. 13 7月, 2016 2 次提交
    • K
      block/qdev: Allow configuring rerror/werror with qdev properties · 8c398252
      Kevin Wolf 提交于
      The rerror/werror policies are implemented in the devices, so that's
      where they should be configured. In comparison to the old options in
      -drive, the qdev properties are only added to those devices that
      actually support them.
      
      If the option isn't given (or "auto" is specified), the setting of the
      BlockBackend is used for compatibility with the old options. For block
      jobs, "auto" is the same as "enospc".
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      8c398252
    • P
      coroutine: move entry argument to qemu_coroutine_create · 0b8b8753
      Paolo Bonzini 提交于
      In practice the entry argument is always known at creation time, and
      it is confusing that sometimes qemu_coroutine_enter is used with a
      non-NULL argument to re-enter a coroutine (this happens in
      block/sheepdog.c and tests/test-coroutine.c).  So pass the opaque value
      at creation time, for consistency with e.g. aio_bh_new.
      
      Mostly done with the following semantic patch:
      
      @ entry1 @
      expression entry, arg, co;
      @@
      - co = qemu_coroutine_create(entry);
      + co = qemu_coroutine_create(entry, arg);
        ...
      - qemu_coroutine_enter(co, arg);
      + qemu_coroutine_enter(co);
      
      @ entry2 @
      expression entry, arg;
      identifier co;
      @@
      - Coroutine *co = qemu_coroutine_create(entry);
      + Coroutine *co = qemu_coroutine_create(entry, arg);
        ...
      - qemu_coroutine_enter(co, arg);
      + qemu_coroutine_enter(co);
      
      @ entry3 @
      expression entry, arg;
      @@
      - qemu_coroutine_enter(qemu_coroutine_create(entry), arg);
      + qemu_coroutine_enter(qemu_coroutine_create(entry, arg));
      
      @ reentry @
      expression co;
      @@
      - qemu_coroutine_enter(co, NULL);
      + qemu_coroutine_enter(co);
      
      except for the aforementioned few places where the semantic patch
      stumbled (as expected) and for test_co_queue, which would otherwise
      produce an uninitialized variable warning.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      0b8b8753
  3. 05 7月, 2016 4 次提交
  4. 26 5月, 2016 8 次提交
  5. 19 5月, 2016 15 次提交
  6. 12 5月, 2016 7 次提交
  7. 15 4月, 2016 2 次提交
    • K
      block: Don't ignore flags in blk_{,co,aio}_write_zeroes() · 16aaf975
      Kevin Wolf 提交于
      Commit 57d6a428 neglected to pass the given flags to blk_aio_prwv(),
      which broke discard by WRITE SAME for scsi-disk (the UNMAP bit would be
      ignored).
      
      Commit fc1453cd introduced the same bug for blk_write_zeroes(). This is
      used for 'qemu-img convert' without has_zero_init (e.g. on a block
      device) and for preallocation=falloc in parallels.
      
      Commit 8896e088 is the version for blk_co_write_zeroes(). This function
      is only used in qemu-io.
      Reported-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      16aaf975
    • K
      block: Fix blk_aio_write_zeroes() · 7fa84cd8
      Kevin Wolf 提交于
      Commit 57d6a428 broke blk_aio_write_zeroes() because in some write
      functions in the call path don't have an explicit length argument but
      reuse qiov->size instead. Which is great, except that write_zeroes
      doesn't have a qiov, which this commit interprets as 0 bytes.
      Consequently, blk_aio_write_zeroes() didn't effectively do anything.
      
      This patch introduces an explicit acb->bytes in BlkAioEmAIOCB and uses
      that instead of acb->rwco.size.
      
      The synchronous version of the function is okay because it does pass a
      qiov (with the right size and a NULL pointer as its base).
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      7fa84cd8
  8. 30 3月, 2016 1 次提交
    • K
      block: Remove BDRV_O_CACHE_WB · 61de4c68
      Kevin Wolf 提交于
      The previous patches have successively made blk->enable_write_cache the
      true source for the information whether a writethrough mode must be
      implemented. The corresponding BDRV_O_CACHE_WB is only useless baggage
      we're carrying around, so now's the time to remove it.
      
      At the same time, we remove the 'cache.writeback' option parsing on the
      BDS level as the only effect was setting the BDRV_O_CACHE_WB flag.
      
      This change requires test cases that explicitly enabled the option to
      drop it. Other than that and the change of the error message when
      writethrough is enabled on the BDS level (from "Can't set writethrough
      mode" to "doesn't support the option"), there should be no change in
      behaviour.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      61de4c68