mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-07 04:07:17 +00:00
qemu: Update asyncOwnerAPI when entering async job phase
In case an async job spans multiple APIs (e.g., incoming migration) the API that started the job is recorded as the asyncOwnerAPI even though it is no longer running and the owner thread is updated properly to the one currently handling the job. Let's also update asyncOwnerAPI to make it more obvious which is the current (or the most recent) API involved in the job. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
af41380672
commit
df92ccb494
@ -711,7 +711,9 @@ qemuDomainObjSetJobPhase(virQEMUDriverPtr driver,
|
||||
qemuDomainAsyncJobTypeToString(priv->job.asyncJob),
|
||||
qemuDomainAsyncJobPhaseToString(priv->job.asyncJob, phase));
|
||||
|
||||
if (priv->job.asyncOwner && me != priv->job.asyncOwner) {
|
||||
if (priv->job.asyncOwner == 0) {
|
||||
priv->job.asyncOwnerAPI = g_strdup(virThreadJobGet());
|
||||
} else if (me != priv->job.asyncOwner) {
|
||||
VIR_WARN("'%s' async job is owned by thread %llu",
|
||||
qemuDomainAsyncJobTypeToString(priv->job.asyncJob),
|
||||
priv->job.asyncOwner);
|
||||
|
Loading…
x
Reference in New Issue
Block a user