|
|
ae23c9 |
From 4c433d800c5c5c31e72f69d8192b44dc3382ba02 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Date: Mon, 18 Jun 2018 16:12:07 +0200
|
|
|
ae23c9 |
Subject: [PATCH 040/268] block: Set BDRV_REQ_WRITE_UNCHANGED for COR writes
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180618161212.14444-6-mreitz@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 80766
|
|
|
ae23c9 |
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 05/10] block: Set BDRV_REQ_WRITE_UNCHANGED for COR writes
|
|
|
ae23c9 |
Bugzilla: 1518738
|
|
|
ae23c9 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Alberto Garcia <berto@igalia.com>
|
|
|
ae23c9 |
Message-id: 20180421132929.21610-5-mreitz@redhat.com
|
|
|
ae23c9 |
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 7adcf59fecf3c8ce9330430187350b53f9e50cf7)
|
|
|
ae23c9 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
block/io.c | 6 ++++--
|
|
|
ae23c9 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/block/io.c b/block/io.c
|
|
|
ae23c9 |
index 134b2a4..fada4ef 100644
|
|
|
ae23c9 |
--- a/block/io.c
|
|
|
ae23c9 |
+++ b/block/io.c
|
|
|
ae23c9 |
@@ -1115,13 +1115,15 @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child,
|
|
|
ae23c9 |
/* FIXME: Should we (perhaps conditionally) be setting
|
|
|
ae23c9 |
* BDRV_REQ_MAY_UNMAP, if it will allow for a sparser copy
|
|
|
ae23c9 |
* that still correctly reads as zero? */
|
|
|
ae23c9 |
- ret = bdrv_co_do_pwrite_zeroes(bs, cluster_offset, pnum, 0);
|
|
|
ae23c9 |
+ ret = bdrv_co_do_pwrite_zeroes(bs, cluster_offset, pnum,
|
|
|
ae23c9 |
+ BDRV_REQ_WRITE_UNCHANGED);
|
|
|
ae23c9 |
} else {
|
|
|
ae23c9 |
/* This does not change the data on the disk, it is not
|
|
|
ae23c9 |
* necessary to flush even in cache=writethrough mode.
|
|
|
ae23c9 |
*/
|
|
|
ae23c9 |
ret = bdrv_driver_pwritev(bs, cluster_offset, pnum,
|
|
|
ae23c9 |
- &local_qiov, 0);
|
|
|
ae23c9 |
+ &local_qiov,
|
|
|
ae23c9 |
+ BDRV_REQ_WRITE_UNCHANGED);
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
if (ret < 0) {
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|