mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu_monitor_json: allow configuring autofinalize for block commit
Deleting external snapshots will require configuring autofinalize to synchronize the block jobs for disks withing single snapshot in order to be able safely abort of one of the jobs fails. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
07b54c3d5a
commit
b308dc4b77
@ -3364,7 +3364,8 @@ qemuBlockCommit(virDomainObj *vm,
|
||||
job->name,
|
||||
topSource->nodeformat,
|
||||
baseSource->nodeformat,
|
||||
backingPath, bandwidth);
|
||||
backingPath, bandwidth,
|
||||
VIR_TRISTATE_BOOL_YES);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
|
||||
|
@ -2795,16 +2795,17 @@ qemuMonitorBlockCommit(qemuMonitor *mon,
|
||||
const char *topNode,
|
||||
const char *baseNode,
|
||||
const char *backingName,
|
||||
unsigned long long bandwidth)
|
||||
unsigned long long bandwidth,
|
||||
virTristateBool autofinalize)
|
||||
{
|
||||
VIR_DEBUG("device=%s, jobname=%s, topNode=%s, baseNode=%s, backingName=%s, bandwidth=%llu",
|
||||
VIR_DEBUG("device=%s, jobname=%s, topNode=%s, baseNode=%s, backingName=%s, bandwidth=%llu, autofinalize=%d",
|
||||
device, NULLSTR(jobname), NULLSTR(topNode),
|
||||
NULLSTR(baseNode), NULLSTR(backingName), bandwidth);
|
||||
NULLSTR(baseNode), NULLSTR(backingName), bandwidth, autofinalize);
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
return qemuMonitorJSONBlockCommit(mon, device, jobname, topNode, baseNode,
|
||||
backingName, bandwidth);
|
||||
backingName, bandwidth, autofinalize);
|
||||
}
|
||||
|
||||
|
||||
|
@ -973,7 +973,8 @@ int qemuMonitorBlockCommit(qemuMonitor *mon,
|
||||
const char *topNode,
|
||||
const char *baseNode,
|
||||
const char *backingName,
|
||||
unsigned long long bandwidth)
|
||||
unsigned long long bandwidth,
|
||||
virTristateBool autofinalize)
|
||||
ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int qemuMonitorArbitraryCommand(qemuMonitor *mon,
|
||||
|
@ -4028,11 +4028,11 @@ qemuMonitorJSONBlockCommit(qemuMonitor *mon,
|
||||
const char *topNode,
|
||||
const char *baseNode,
|
||||
const char *backingName,
|
||||
unsigned long long speed)
|
||||
unsigned long long speed,
|
||||
virTristateBool autofinalize)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
virTristateBool autofinalize = VIR_TRISTATE_BOOL_YES;
|
||||
virTristateBool autodismiss = VIR_TRISTATE_BOOL_NO;
|
||||
|
||||
cmd = qemuMonitorJSONMakeCommand("block-commit",
|
||||
|
@ -315,7 +315,8 @@ qemuMonitorJSONBlockCommit(qemuMonitor *mon,
|
||||
const char *topNode,
|
||||
const char *baseNode,
|
||||
const char *backingName,
|
||||
unsigned long long bandwidth)
|
||||
unsigned long long bandwidth,
|
||||
virTristateBool autofinalize)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int
|
||||
|
@ -1211,7 +1211,7 @@ GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDelDevice, "ide0")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONBlockdevMirror, "jobname", true, "vdb", "targetnode", 1024, 1234, 31234, true, true)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONBlockStream, "vdb", "jobname", "backingnode", "backingfilename", 1024)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", "topnode", "basenode", "backingfilename", 1024)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONBlockCommit, "vdb", "jobname", "topnode", "basenode", "backingfilename", 1024, VIR_TRISTATE_BOOL_YES)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONScreendump, "devicename", 1, NULL, "/foo/bar")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONOpenGraphics, "spice", "spicefd", false)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONNBDServerAdd, "vda", "export", true, "bitmap")
|
||||
|
Loading…
Reference in New Issue
Block a user