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