From: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_monitor.c | 9 +++++----
src/qemu/qemu_monitor.h | 3 ++-
src/qemu/qemu_monitor_json.c | 4 +++-
src/qemu/qemu_monitor_json.h | 3 ++-
tests/qemumonitorjsontest.c | 2 +-
7 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8b148b33b4..0ba40e0665 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14535,7 +14535,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
qemuBlockStorageSourceGetEffectiveNodename(disk->src),
bandwidth,
granularity, buf_size, mirror_shallow,
- syncWrites);
+ syncWrites, false);
virDomainAuditDisk(vm, NULL, mirror, "mirror", ret >= 0);
qemuDomainObjExitMonitor(vm);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 4d136e259b..bb62b1d48c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1173,7 +1173,7 @@ qemuMigrationSrcNBDStorageCopyBlockdev(virDomainObj *vm,
qemuBlockStorageSourceGetEffectiveNodename(copysrc),
NULL,
mirror_speed, 0, 0, mirror_shallow,
- syncWrites);
+ syncWrites, false);
if (mon_ret != 0)
qemuBlockStorageSourceAttachRollback(qemuDomainGetMonitor(vm), data);
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index b94aaf741b..ef83e7b69a 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -2845,18 +2845,19 @@ qemuMonitorBlockdevMirror(qemuMonitor *mon,
unsigned int granularity,
unsigned long long buf_size,
bool shallow,
- bool syncWrite)
+ bool syncWrite,
+ bool targetIsZero)
{
VIR_DEBUG("jobname=%s, persistjob=%d, device=%s, target=%s, replaces=%s, bandwidth=%lld, "
- "granularity=%#x, buf_size=%lld, shallow=%d syncWrite=%d",
+ "granularity=%#x, buf_size=%lld, shallow=%d syncWrite=%d targetIsZero=%d",
NULLSTR(jobname), persistjob, device, target, NULLSTR(replaces),
- bandwidth, granularity, buf_size, shallow, syncWrite);
+ bandwidth, granularity, buf_size, shallow, syncWrite, targetIsZero);
QEMU_CHECK_MONITOR(mon);
return qemuMonitorJSONBlockdevMirror(mon, jobname, persistjob, device, target, replaces,
bandwidth, granularity, buf_size, shallow,
- syncWrite);
+ syncWrite, targetIsZero);
}
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index d3611d9713..dfa25fc7ba 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -1245,7 +1245,8 @@ qemuMonitorBlockdevMirror(qemuMonitor *mon,
unsigned int granularity,
unsigned long long buf_size,
bool shallow,
- bool syncWrite)
+ bool syncWrite,
+ bool targetIsZero)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
int
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index f9b0470ed4..532bb885a3 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -4301,7 +4301,8 @@ qemuMonitorJSONBlockdevMirror(qemuMonitor *mon,
unsigned int granularity,
unsigned long long buf_size,
bool shallow,
- bool syncWrite)
+ bool syncWrite,
+ bool targetIsZero)
{
g_autoptr(virJSONValue) cmd = NULL;
g_autoptr(virJSONValue) reply = NULL;
@@ -4333,6 +4334,7 @@ qemuMonitorJSONBlockdevMirror(qemuMonitor *mon,
"S:copy-mode", copymode,
"T:auto-finalize", autofinalize,
"T:auto-dismiss", autodismiss,
+ "B:target-is-zero", targetIsZero,
NULL);
if (!cmd)
return -1;
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index cf9e341fe3..5034c8d23d 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -273,7 +273,8 @@ qemuMonitorJSONBlockdevMirror(qemuMonitor *mon,
unsigned int granularity,
unsigned long long buf_size,
bool shallow,
- bool syncWrite)
+ bool syncWrite,
+ bool targetIsZero)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
int
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 8911895c7e..e34dbad7cd 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -1107,7 +1107,7 @@ GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
"localhost", 12345, 12346, "certsubjectval")
GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0")
GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0")
-GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targetnode", "replacenode", 1024, 1234, 31234, true, true)
+GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targetnode", "replacenode", 1024, 1234, 31234, true, true, true)
GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", "backingnode", "backingfilename", 1024)
GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", "topnode", "basenode", "backingfilename", 1024, VIR_TRISTATE_BOOL_YES)
GEN_TEST_FUNC(qemuMonitorJSONScreendump, "devicename", 1, NULL, "/foo/bar")
--
2.53.0
© 2016 - 2026 Red Hat, Inc.