]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Remove unused code for pre-blockdev disk snapshot monitor interaction
authorPeter Krempa <pkrempa@redhat.com>
Tue, 19 Jul 2022 16:21:19 +0000 (18:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Aug 2022 13:07:39 +0000 (15:07 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_block.c
src/qemu/qemu_block.h
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h
tests/qemumonitorjsontest.c

index fe825f7c86d1380d0f2f400b0450c6806b186799..8b4cdf949a8fc9d3f656bc5ee7f8dcb6b5d72022 100644 (file)
@@ -2106,26 +2106,6 @@ qemuBlockStorageSourceDetachOneBlockdev(virDomainObj *vm,
 }
 
 
-int
-qemuBlockSnapshotAddLegacy(virJSONValue *actions,
-                           virDomainDiskDef *disk,
-                           virStorageSource *newsrc,
-                           bool reuse)
-{
-    const char *format = virStorageFileFormatTypeToString(newsrc->format);
-    g_autofree char *device = NULL;
-    g_autofree char *source = NULL;
-
-    if (!(device = qemuAliasDiskDriveFromDisk(disk)))
-        return -1;
-
-    if (qemuGetDriveSourceString(newsrc, NULL, &source) < 0)
-        return -1;
-
-    return qemuMonitorTransactionSnapshotLegacy(actions, device, source, format, reuse);
-}
-
-
 int
 qemuBlockSnapshotAddBlockdev(virJSONValue *actions,
                              virDomainDiskDef *disk,
index d488a3b8d1e52e1b5eaed10a81f6e68f5290b158..c9764e358da9b5164452f2bf412b44a6a44034bf 100644 (file)
@@ -177,12 +177,6 @@ qemuBlockStorageSourceChainDetach(qemuMonitor *mon,
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceChainData,
                         qemuBlockStorageSourceChainDataFree);
 
-int
-qemuBlockSnapshotAddLegacy(virJSONValue *actions,
-                           virDomainDiskDef *disk,
-                           virStorageSource *newsrc,
-                           bool reuse);
-
 int
 qemuBlockSnapshotAddBlockdev(virJSONValue *actions,
                              virDomainDiskDef *disk,
index 9d20acdc1108e85a587352e781471179f84500ae..13c3f949791fb431ce32e639c42ec4a4b5a24a26 100644 (file)
@@ -4347,18 +4347,6 @@ qemuMonitorTransactionBitmapMergeSourceAddBitmap(virJSONValue *sources,
 }
 
 
-int
-qemuMonitorTransactionSnapshotLegacy(virJSONValue *actions,
-                                     const char *device,
-                                     const char *path,
-                                     const char *format,
-                                     bool existing)
-{
-    return qemuMonitorJSONTransactionSnapshotLegacy(actions, device, path,
-                                                    format, existing);
-}
-
-
 int
 qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
                                        const char *node,
index 49adad85dddec25e52408748fe2be2c769181912..0f2687e4ca490d6c810931d8807c3ba4262feff8 100644 (file)
@@ -1457,12 +1457,6 @@ qemuMonitorTransactionBitmapMergeSourceAddBitmap(virJSONValue *sources,
                                                  const char *sourcebitmap);
 
 int
-qemuMonitorTransactionSnapshotLegacy(virJSONValue *actions,
-                                     const char *device,
-                                     const char *path,
-                                     const char *format,
-                                     bool existing);
-int
 qemuMonitorTransactionSnapshotBlockdev(virJSONValue *actions,
                                        const char *node,
                                        const char *overlay);
index dd352d6296ba9b0a44b483eb72c4ea364bb2915f..d40d75d34ab5d622052d95f30ed0a1c4643fe8b9 100644 (file)
@@ -8520,28 +8520,6 @@ qemuMonitorJSONTransactionBitmapMergeSourceAddBitmap(virJSONValue *sources,
 }
 
 
-int
-qemuMonitorJSONTransactionSnapshotLegacy(virJSONValue *actions,
-                                         const char *device,
-                                         const char *path,
-                                         const char *format,
-                                         bool existing)
-{
-    const char *mode = NULL;
-
-    if (existing)
-        mode = "existing";
-
-    return qemuMonitorJSONTransactionAdd(actions,
-                                         "blockdev-snapshot-sync",
-                                         "s:device", device,
-                                         "s:snapshot-file", path,
-                                         "s:format", format,
-                                         "S:mode", mode,
-                                         NULL);
-}
-
-
 int
 qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
                                            const char *node,
index 924238eeec7b0fcc70154460c7babcc1e05e06d7..44456d878b3d3bba83e26a47be2cff4d41a3a08c 100644 (file)
@@ -812,12 +812,6 @@ qemuMonitorJSONTransactionBitmapMergeSourceAddBitmap(virJSONValue *sources,
                                                      const char *sourcebitmap);
 
 int
-qemuMonitorJSONTransactionSnapshotLegacy(virJSONValue *actions,
-                                         const char *device,
-                                         const char *path,
-                                         const char *format,
-                                         bool existing);
-int
 qemuMonitorJSONTransactionSnapshotBlockdev(virJSONValue *actions,
                                            const char *node,
                                            const char *overlay);
index e0dd00dc7ac2226b27710e78d1cb3a921c1a159d..ec533e1eb6d94d8b50d7666e3736a1f1b8f81afb 100644 (file)
@@ -2665,7 +2665,6 @@ testQemuMonitorJSONTransaction(const void *opaque)
         qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < 0 ||
         qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 ||
         qemuMonitorTransactionBitmapMerge(actions, "node5", "bitmap5", &mergebitmaps) < 0 ||
-        qemuMonitorTransactionSnapshotLegacy(actions, "dev6", "path", "qcow2", true) < 0 ||
         qemuMonitorTransactionSnapshotBlockdev(actions, "node7", "overlay7") < 0 ||
         qemuMonitorTransactionBackup(actions, "dev8", "job8", "target8", "bitmap8",
                                      QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_NONE) < 0 ||