Blame SOURCES/kvm-block-Set-BDRV_REQ_WRITE_UNCHANGED-for-COR-writes.patch

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