mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: checkpoint: Replace open-coded transaction action generators
Use the generators provided by the monitor code instead. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
043c09b4f8
commit
161478f4c4
@ -23,7 +23,6 @@
|
|||||||
#include "qemu_checkpoint.h"
|
#include "qemu_checkpoint.h"
|
||||||
#include "qemu_capabilities.h"
|
#include "qemu_capabilities.h"
|
||||||
#include "qemu_monitor.h"
|
#include "qemu_monitor.h"
|
||||||
#include "qemu_monitor_json.h"
|
|
||||||
#include "qemu_domain.h"
|
#include "qemu_domain.h"
|
||||||
|
|
||||||
#include "virerror.h"
|
#include "virerror.h"
|
||||||
@ -307,12 +306,7 @@ qemuCheckpointAddActions(virDomainObjPtr vm,
|
|||||||
if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
|
if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
|
||||||
continue;
|
continue;
|
||||||
node = qemuDomainDiskNodeFormatLookup(vm, disk->name);
|
node = qemuDomainDiskNodeFormatLookup(vm, disk->name);
|
||||||
if (qemuMonitorJSONTransactionAdd(actions,
|
if (qemuMonitorTransactionBitmapAdd(actions, node, disk->bitmap, true, false) < 0)
|
||||||
"block-dirty-bitmap-add",
|
|
||||||
"s:node", node,
|
|
||||||
"s:name", disk->bitmap,
|
|
||||||
"b:persistent", true,
|
|
||||||
NULL) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* We only want one active bitmap for a disk along the
|
/* We only want one active bitmap for a disk along the
|
||||||
@ -335,11 +329,7 @@ qemuCheckpointAddActions(virDomainObjPtr vm,
|
|||||||
if (STRNEQ(disk->name, disk2->name) ||
|
if (STRNEQ(disk->name, disk2->name) ||
|
||||||
disk2->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
|
disk2->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
|
||||||
continue;
|
continue;
|
||||||
if (qemuMonitorJSONTransactionAdd(actions,
|
if (qemuMonitorTransactionBitmapDisable(actions, node, disk2->bitmap) < 0)
|
||||||
"block-dirty-bitmap-disable",
|
|
||||||
"s:node", node,
|
|
||||||
"s:name", disk2->bitmap,
|
|
||||||
NULL) < 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
search_parents = false;
|
search_parents = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user