mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu & hypervisor: move qemuDomainObjResetAgentJob() into hypervisor
This patch moves qemuDomainObjResetAgentJob() as virDomainObjResetAgentJob() into hypervisor. Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
70768cda97
commit
7bbc465b45
@ -146,3 +146,12 @@ virDomainObjResetJob(virDomainJobObj *job)
|
||||
g_clear_pointer(&job->ownerAPI, g_free);
|
||||
job->started = 0;
|
||||
}
|
||||
|
||||
void
|
||||
virDomainObjResetAgentJob(virDomainJobObj *job)
|
||||
{
|
||||
job->agentActive = VIR_AGENT_JOB_NONE;
|
||||
job->agentOwner = 0;
|
||||
g_clear_pointer(&job->agentOwnerAPI, g_free);
|
||||
job->agentStarted = 0;
|
||||
}
|
||||
|
@ -210,3 +210,5 @@ int virDomainObjInitJob(virDomainJobObj *job,
|
||||
virDomainObjPrivateJobCallbacks *cb);
|
||||
|
||||
void virDomainObjResetJob(virDomainJobObj *job);
|
||||
|
||||
void virDomainObjResetAgentJob(virDomainJobObj *job);
|
||||
|
@ -1595,6 +1595,7 @@ virDomainJobStatusToType;
|
||||
virDomainJobTypeFromString;
|
||||
virDomainJobTypeToString;
|
||||
virDomainObjInitJob;
|
||||
virDomainObjResetAgentJob;
|
||||
virDomainObjResetJob;
|
||||
|
||||
|
||||
|
@ -150,16 +150,6 @@ qemuDomainEventEmitJobCompleted(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainObjResetAgentJob(virDomainJobObj *job)
|
||||
{
|
||||
job->agentActive = VIR_AGENT_JOB_NONE;
|
||||
job->agentOwner = 0;
|
||||
g_clear_pointer(&job->agentOwnerAPI, g_free);
|
||||
job->agentStarted = 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuDomainObjResetAsyncJob(virDomainJobObj *job)
|
||||
{
|
||||
@ -936,7 +926,7 @@ qemuDomainObjBeginJobInternal(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
if (agentJob) {
|
||||
qemuDomainObjResetAgentJob(&priv->job);
|
||||
virDomainObjResetAgentJob(&priv->job);
|
||||
|
||||
VIR_DEBUG("Started agent job: %s (vm=%p name=%s job=%s async=%s)",
|
||||
virDomainAgentJobTypeToString(agentJob),
|
||||
@ -1191,7 +1181,7 @@ qemuDomainObjEndAgentJob(virDomainObj *obj)
|
||||
virDomainAsyncJobTypeToString(priv->job.asyncJob),
|
||||
obj, obj->def->name);
|
||||
|
||||
qemuDomainObjResetAgentJob(&priv->job);
|
||||
virDomainObjResetAgentJob(&priv->job);
|
||||
/* We indeed need to wake up ALL threads waiting because
|
||||
* grabbing a job requires checking more variables. */
|
||||
virCondBroadcast(&priv->job.cond);
|
||||
|
Loading…
x
Reference in New Issue
Block a user