[PATCH 7/8] qemu: monitor: Remove old external snapshot code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the dual mode code which allowed to create snapshots without
support for 'transaction'.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_monitor.c      | 17 -----------------
 src/qemu/qemu_monitor.h      |  6 ------
 src/qemu/qemu_monitor_json.c | 37 -------------------------------------
 src/qemu/qemu_monitor_json.h |  8 --------
 4 files changed, 68 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 6ed475ede0..5d7f6905ae 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -3177,23 +3177,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,
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index b3d62324b4..e09ca14bfa 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -827,12 +827,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,
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 54fefcb612..cf1636d858 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -4101,43 +4101,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,
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
index da6c121d72..b61046379c 100644
--- a/src/qemu/qemu_monitor_json.h
+++ b/src/qemu/qemu_monitor_json.h
@@ -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,
-- 
2.16.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux