mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: Remove unused code for pre-blockdev disk snapshot monitor interaction
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:
parent
4574818067
commit
58e740aa24
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user