提交 42f3bbb1 编写于 作者: P Peter Krempa

qemu: monitor: Remove old external snapshot code

Remove the dual mode code which allowed to create snapshots without
support for 'transaction'.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 bed681d7
......@@ -3203,23 +3203,6 @@ qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name)
}
/* Use the snapshot_blkdev command to convert the existing file for
* device into a read-only backing file of a new qcow2 image located
* at file. */
int
qemuMonitorDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions,
const char *device, const char *file,
const char *format, bool reuse)
{
VIR_DEBUG("actions=%p, device=%s, file=%s, format=%s, reuse=%d",
actions, device, file, format, reuse);
QEMU_CHECK_MONITOR(mon);
return qemuMonitorJSONDiskSnapshot(mon, actions, device, file, format, reuse);
}
/* Start a drive-mirror block job. bandwidth is in bytes/sec. */
int
qemuMonitorDriveMirror(qemuMonitorPtr mon,
......
......@@ -839,12 +839,6 @@ int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name);
int qemuMonitorDiskSnapshot(qemuMonitorPtr mon,
virJSONValuePtr actions,
const char *device,
const char *file,
const char *format,
bool reuse);
int qemuMonitorTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
ATTRIBUTE_NONNULL(2);
int qemuMonitorDriveMirror(qemuMonitorPtr mon,
......
......@@ -4112,43 +4112,6 @@ int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
}
int
qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon, virJSONValuePtr actions,
const char *device, const char *file,
const char *format, bool reuse)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
cmd = qemuMonitorJSONMakeCommandRaw(actions != NULL,
"blockdev-snapshot-sync",
"s:device", device,
"s:snapshot-file", file,
"s:format", format,
"S:mode", reuse ? "existing" : NULL,
NULL);
if (!cmd)
return -1;
if (actions) {
if (virJSONValueArrayAppend(actions, cmd) == 0) {
ret = 0;
cmd = NULL;
}
} else {
if ((ret = qemuMonitorJSONCommand(mon, cmd, &reply)) < 0)
goto cleanup;
ret = qemuMonitorJSONCheckError(cmd, reply);
}
cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
return ret;
}
/* speed is in bytes/sec */
int
qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
......
......@@ -242,14 +242,6 @@ int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
const char *objalias);
int qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon,
virJSONValuePtr actions,
const char *device,
const char *file,
const char *format,
bool reuse)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
int qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册