aboutsummaryrefslogtreecommitdiff
path: root/tests/test-block-iothread.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-07-24 19:12:30 +0200
committerMax Reitz <mreitz@redhat.com>2019-08-19 17:13:26 +0200
commitcdf3bc934ad1e5319b03f2c85f381f5ffd2f8ca8 (patch)
tree2e8dc4f2b68d10a6439335c1f733e563aaf71ec6 /tests/test-block-iothread.c
parent4d7c487eac1652dfe4498fe84f32900ad461d61b (diff)
downloadqemu-cdf3bc934ad1e5319b03f2c85f381f5ffd2f8ca8.zip
qemu-cdf3bc934ad1e5319b03f2c85f381f5ffd2f8ca8.tar.gz
qemu-cdf3bc934ad1e5319b03f2c85f381f5ffd2f8ca8.tar.bz2
mirror: Fix bdrv_has_zero_init() use
bdrv_has_zero_init() only has meaning for newly created images or image areas. If the mirror job itself did not create the image, it cannot rely on bdrv_has_zero_init()'s result to carry any meaning. This is the case for drive-mirror with mode=existing and always for blockdev-mirror. Note that we only have to zero-initialize the target with sync=full, because other modes actually do not promise that the target will contain the same data as the source after the job -- sync=top only promises to copy anything allocated in the top layer, and sync=none will only copy new I/O. (Which is how mirror has always handled it.) Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190724171239.8764-3-mreitz@redhat.com Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/test-block-iothread.c')
-rw-r--r--tests/test-block-iothread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c
index e81b5b8..926577b 100644
--- a/tests/test-block-iothread.c
+++ b/tests/test-block-iothread.c
@@ -612,7 +612,7 @@ static void test_propagate_mirror(void)
/* Start a mirror job */
mirror_start("job0", src, target, NULL, JOB_DEFAULT, 0, 0, 0,
- MIRROR_SYNC_MODE_NONE, MIRROR_OPEN_BACKING_CHAIN,
+ MIRROR_SYNC_MODE_NONE, MIRROR_OPEN_BACKING_CHAIN, false,
BLOCKDEV_ON_ERROR_REPORT, BLOCKDEV_ON_ERROR_REPORT,
false, "filter_node", MIRROR_COPY_MODE_BACKGROUND,
&error_abort);