diff options
author | Max Reitz <mreitz@redhat.com> | 2018-04-21 15:29:24 +0200 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2018-05-15 16:15:21 +0200 |
commit | 7adcf59fecf3c8ce9330430187350b53f9e50cf7 (patch) | |
tree | 437a84387ce17bac679dea75598beb0e5ee04dcb /block | |
parent | c6035964f8316b504060618d05b5dd434f18595b (diff) | |
download | qemu-7adcf59fecf3c8ce9330430187350b53f9e50cf7.zip qemu-7adcf59fecf3c8ce9330430187350b53f9e50cf7.tar.gz qemu-7adcf59fecf3c8ce9330430187350b53f9e50cf7.tar.bz2 |
block: Set BDRV_REQ_WRITE_UNCHANGED for COR writes
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 20180421132929.21610-5-mreitz@redhat.com
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/io.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1118,13 +1118,15 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child, /* FIXME: Should we (perhaps conditionally) be setting * BDRV_REQ_MAY_UNMAP, if it will allow for a sparser copy * that still correctly reads as zero? */ - ret = bdrv_co_do_pwrite_zeroes(bs, cluster_offset, pnum, 0); + ret = bdrv_co_do_pwrite_zeroes(bs, cluster_offset, pnum, + BDRV_REQ_WRITE_UNCHANGED); } else { /* This does not change the data on the disk, it is not * necessary to flush even in cache=writethrough mode. */ ret = bdrv_driver_pwritev(bs, cluster_offset, pnum, - &local_qiov, 0); + &local_qiov, + BDRV_REQ_WRITE_UNCHANGED); } if (ret < 0) { |