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