1. 19 5月, 2016 4 次提交
  2. 12 5月, 2016 7 次提交
  3. 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
  4. 30 3月, 2016 4 次提交
    • 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
    • K
      block: Move enable_write_cache to BB level · bfd18d1e
      Kevin Wolf 提交于
      Whether a write cache is used or not is a decision that concerns the
      user (e.g. the guest device) rather than the backend. It was already
      logically part of the BB level as bdrv_move_feature_fields() always kept
      it on top of the BDS tree; with this patch, the core of it (the actual
      flag and the additional flushes) is also implemented there.
      
      Direct callers of bdrv_open() must pass BDRV_O_CACHE_WB now if bs
      doesn't have a BlockBackend attached.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      bfd18d1e
    • K
      block: Always set writeback mode in blk_new_open() · 72e775c7
      Kevin Wolf 提交于
      All callers of blk_new_open() either don't rely on the WCE bit set after
      blk_new_open() because they explicitly set it anyway, or they pass
      BDRV_O_CACHE_WB unconditionally.
      
      This patch changes blk_new_open() so that it always enables writeback
      mode and asserts that BDRV_O_CACHE_WB is clear. For those callers that
      used to pass BDRV_O_CACHE_WB unconditionally, the flag is removed now.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      72e775c7
    • K
      block: Remove blk_set_bs() · 72f41b6f
      Kevin Wolf 提交于
      The function is unused since commit f21d96d0 ('block: Use BdrvChild in
      BlockBackend').
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      72f41b6f
  5. 23 3月, 2016 1 次提交
  6. 17 3月, 2016 17 次提交
  7. 14 3月, 2016 1 次提交
  8. 03 2月, 2016 4 次提交