Log debug messages anytime we call *BeginJob* or *EndJob* so that it's easier to spot incorrect usage of domain job APIs. --- src/qemu/qemu_domain.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 85bebd6..5abc900 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -761,8 +761,13 @@ retry: qemuDomainObjResetJob(priv); if (job != QEMU_JOB_ASYNC) { + VIR_DEBUG("Starting job: %s (async=%s)", + qemuDomainJobTypeToString(job), + qemuDomainAsyncJobTypeToString(priv->job.asyncJob)); priv->job.active = job; } else { + VIR_DEBUG("Starting async job: %s", + qemuDomainAsyncJobTypeToString(asyncJob)); qemuDomainObjResetAsyncJob(priv); priv->job.asyncJob = asyncJob; priv->job.start = now; @@ -873,6 +878,10 @@ int qemuDomainObjEndJob(struct qemud_driver *driver, virDomainObjPtr obj) priv->jobs_queued--; + VIR_DEBUG("Stopping job: %s (async=%s)", + qemuDomainJobTypeToString(priv->job.active), + qemuDomainAsyncJobTypeToString(priv->job.asyncJob)); + qemuDomainObjResetJob(priv); qemuDomainObjSaveJob(driver, obj); virCondSignal(&priv->job.cond); @@ -887,6 +896,9 @@ qemuDomainObjEndAsyncJob(struct qemud_driver *driver, virDomainObjPtr obj) priv->jobs_queued--; + VIR_DEBUG("Stopping async job: %s", + qemuDomainAsyncJobTypeToString(priv->job.asyncJob)); + qemuDomainObjResetAsyncJob(priv); qemuDomainObjSaveJob(driver, obj); virCondBroadcast(&priv->job.asyncCond); -- 1.7.7 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list