qemu: monitor: Remove unused qemuMonitorDriveMirror

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-07-20 12:03:57 +02:00
parent 1cbc128895
commit 8c67518256
5 changed files with 0 additions and 85 deletions

View File

@ -2821,27 +2821,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,

View File

@ -975,16 +975,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,

View File

@ -4068,47 +4068,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,

View File

@ -304,17 +304,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,

View File

@ -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)
@ -2915,7 +2914,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);