Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_monitor.c | 21 ------------------ src/qemu/qemu_monitor.h | 10 --------- src/qemu/qemu_monitor_json.c | 41 ------------------------------------ src/qemu/qemu_monitor_json.h | 11 ---------- tests/qemumonitorjsontest.c | 2 -- 5 files changed, 85 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a4b1b90c7c..9c24b842bd 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2871,27 +2871,6 @@ qemuMonitorDeleteSnapshot(qemuMonitor *mon, const char *name) } -/* Start a drive-mirror block job. bandwidth is in bytes/sec. */ -int -qemuMonitorDriveMirror(qemuMonitor *mon, - const char *device, const char *file, - const char *format, unsigned long long bandwidth, - unsigned int granularity, unsigned long long buf_size, - bool shallow, - bool reuse) -{ - VIR_DEBUG("device=%s, file=%s, format=%s, bandwidth=%lld, " - "granularity=%#x, buf_size=%lld, shallow=%d, reuse=%d", - device, file, NULLSTR(format), bandwidth, granularity, - buf_size, shallow, reuse); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONDriveMirror(mon, device, file, format, bandwidth, - granularity, buf_size, shallow, reuse); -} - - int qemuMonitorBlockdevMirror(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 352cf0ada5..aee9ca0e6a 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -979,16 +979,6 @@ int qemuMonitorDeleteSnapshot(qemuMonitor *mon, const char *name); int qemuMonitorTransaction(qemuMonitor *mon, virJSONValue **actions) ATTRIBUTE_NONNULL(2); -int qemuMonitorDriveMirror(qemuMonitor *mon, - const char *device, - const char *file, - const char *format, - unsigned long long bandwidth, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) - ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorBlockdevMirror(qemuMonitor *mon, const char *jobname, bool persistjob, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9363f86a55..bd3130075b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4096,47 +4096,6 @@ qemuMonitorJSONDelObject(qemuMonitor *mon, } -/* speed is in bytes/sec */ -int -qemuMonitorJSONDriveMirror(qemuMonitor *mon, - const char *device, const char *file, - const char *format, unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) -{ - g_autoptr(virJSONValue) cmd = NULL; - g_autoptr(virJSONValue) reply = NULL; - const char *syncmode = "full"; - const char *mode = "absolute-paths"; - - if (shallow) - syncmode = "top"; - - if (reuse) - mode = "existing"; - - cmd = qemuMonitorJSONMakeCommand("drive-mirror", - "s:device", device, - "s:target", file, - "Y:speed", speed, - "z:granularity", granularity, - "P:buf-size", buf_size, - "s:sync", syncmode, - "s:mode", mode, - "S:format", format, - NULL); - if (!cmd) - return -1; - - if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) - return -1; - - return qemuMonitorJSONCheckError(cmd, reply); -} - - int qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, const char *jobname, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 31f6214ec4..f409480c0b 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -305,17 +305,6 @@ int qemuMonitorJSONTransaction(qemuMonitor *mon, virJSONValue **actions) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -int -qemuMonitorJSONDriveMirror(qemuMonitor *mon, - const char *device, - const char *file, - const char *format, - unsigned long long speed, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool reuse) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); int qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 0bff1ed4d0..265fa0b705 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1213,7 +1213,6 @@ 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(qemuMonitorJSONDriveMirror, "vdb", "/foo/bar", "formatstr", 1024, 1234, 31234, true, true) GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targetnode", 1024, 1234, 31234, true, true) GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", true, "/foo/bar1", "backingnode", "backingfilename", 1024) GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", true, "/foo/bar1", "topnode", "/foo/bar2", "basenode", "backingfilename", 1024) @@ -3001,7 +3000,6 @@ mymain(void) DO_TEST_GEN(qemuMonitorJSONGraphicsRelocate); DO_TEST_GEN(qemuMonitorJSONRemoveNetdev); DO_TEST_GEN(qemuMonitorJSONDelDevice); - DO_TEST_GEN(qemuMonitorJSONDriveMirror); DO_TEST_GEN(qemuMonitorJSONBlockdevMirror); DO_TEST_GEN(qemuMonitorJSONBlockStream); DO_TEST_GEN(qemuMonitorJSONBlockCommit); -- 2.36.1