[PATCH 11/17] qemu: use virDomainObjEndJob()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch moves qemuDomainObjEndJob() into
src/conf/virdomainjob as universal virDomainObjEndJob().

Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 docs/kbase/internals/qemu-threads.rst |   6 +-
 src/conf/virdomainjob.c               |  28 +++++
 src/conf/virdomainjob.h               |   2 +
 src/libvirt_private.syms              |   1 +
 src/qemu/qemu_checkpoint.c            |   6 +-
 src/qemu/qemu_domain.c                |   4 +-
 src/qemu/qemu_domainjob.c             |  26 -----
 src/qemu/qemu_domainjob.h             |   1 -
 src/qemu/qemu_driver.c                | 156 +++++++++++++-------------
 src/qemu/qemu_migration.c             |   2 +-
 src/qemu/qemu_process.c               |   8 +-
 src/qemu/qemu_snapshot.c              |   2 +-
 12 files changed, 123 insertions(+), 119 deletions(-)

diff --git a/docs/kbase/internals/qemu-threads.rst b/docs/kbase/internals/qemu-threads.rst
index 00340bb732..22d12f61a5 100644
--- a/docs/kbase/internals/qemu-threads.rst
+++ b/docs/kbase/internals/qemu-threads.rst
@@ -123,7 +123,7 @@ To acquire the normal job condition
       isn't
     - Sets ``job.active`` to the job type
 
-  ``qemuDomainObjEndJob()``
+  ``virDomainObjEndJob()``
     - Sets job.active to 0
     - Signals on job.cond condition
 
@@ -218,7 +218,7 @@ Design patterns
 
      ...do work...
 
-     qemuDomainObjEndJob(obj);
+     virDomainObjEndJob(obj);
 
      virDomainObjEndAPI(&obj);
 
@@ -242,7 +242,7 @@ Design patterns
 
      ...do final work...
 
-     qemuDomainObjEndJob(obj);
+     virDomainObjEndJob(obj);
      virDomainObjEndAPI(&obj);
 
 
diff --git a/src/conf/virdomainjob.c b/src/conf/virdomainjob.c
index 81bd886c4c..0f239c680c 100644
--- a/src/conf/virdomainjob.c
+++ b/src/conf/virdomainjob.c
@@ -526,3 +526,31 @@ int virDomainObjBeginJob(virDomainObj *obj,
         return -1;
     return 0;
 }
+
+/*
+ * obj must be locked and have a reference before calling
+ *
+ * To be called after completing the work associated with the
+ * earlier virDomainBeginJob() call
+ */
+void
+virDomainObjEndJob(virDomainObj *obj)
+{
+    virDomainJob job = obj->job->active;
+
+    obj->job->jobsQueued--;
+
+    VIR_DEBUG("Stopping job: %s (async=%s vm=%p name=%s)",
+              virDomainJobTypeToString(job),
+              virDomainAsyncJobTypeToString(obj->job->asyncJob),
+              obj, obj->def->name);
+
+    virDomainObjResetJob(obj->job);
+
+    if (virDomainTrackJob(job) &&
+        obj->job->cb->saveStatusPrivate)
+        obj->job->cb->saveStatusPrivate(obj);
+    /* We indeed need to wake up ALL threads waiting because
+     * grabbing a job requires checking more variables. */
+    virCondBroadcast(&obj->job->cond);
+}
diff --git a/src/conf/virdomainjob.h b/src/conf/virdomainjob.h
index adee679e72..7a06c384f3 100644
--- a/src/conf/virdomainjob.h
+++ b/src/conf/virdomainjob.h
@@ -249,3 +249,5 @@ int virDomainObjBeginJobInternal(virDomainObj *obj,
 int virDomainObjBeginJob(virDomainObj *obj,
                          virDomainJob job)
     G_GNUC_WARN_UNUSED_RESULT;
+
+void virDomainObjEndJob(virDomainObj *obj);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 89d8bd5da6..77da4a1d01 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1191,6 +1191,7 @@ virDomainObjBeginJob;
 virDomainObjBeginJobInternal;
 virDomainObjCanSetJob;
 virDomainObjClearJob;
+virDomainObjEndJob;
 virDomainObjInitJob;
 virDomainObjPreserveJob;
 virDomainObjResetAgentJob;
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index c6fb3d1f97..8580158d66 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -626,7 +626,7 @@ qemuCheckpointCreateXML(virDomainPtr domain,
     checkpoint = virGetDomainCheckpoint(domain, chk->def->name);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
     return checkpoint;
 }
@@ -764,7 +764,7 @@ qemuCheckpointGetXMLDescUpdateSize(virDomainObj *vm,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -917,6 +917,6 @@ qemuCheckpointDelete(virDomainObj *vm,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c596a70a72..3514f104f1 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5973,7 +5973,7 @@ qemuDomainObjEnterMonitorInternal(virDomainObj *obj,
         if (!virDomainObjIsActive(obj)) {
             virReportError(VIR_ERR_OPERATION_FAILED, "%s",
                            _("domain is no longer running"));
-            qemuDomainObjEndJob(obj);
+            virDomainObjEndJob(obj);
             return -1;
         }
     } else if (obj->job->asyncOwner == virThreadSelfID()) {
@@ -6023,7 +6023,7 @@ qemuDomainObjExitMonitor(virDomainObj *obj)
         priv->mon = NULL;
 
     if (obj->job->active == VIR_JOB_ASYNC_NESTED)
-        qemuDomainObjEndJob(obj);
+        virDomainObjEndJob(obj);
 }
 
 void qemuDomainObjEnterMonitor(virDomainObj *obj)
diff --git a/src/qemu/qemu_domainjob.c b/src/qemu/qemu_domainjob.c
index 13e1f332dc..a8baf096e5 100644
--- a/src/qemu/qemu_domainjob.c
+++ b/src/qemu/qemu_domainjob.c
@@ -730,32 +730,6 @@ qemuDomainObjBeginJobNowait(virDomainObj *obj,
                                         VIR_ASYNC_JOB_NONE, true);
 }
 
-/*
- * obj must be locked and have a reference before calling
- *
- * To be called after completing the work associated with the
- * earlier qemuDomainBeginJob() call
- */
-void
-qemuDomainObjEndJob(virDomainObj *obj)
-{
-    virDomainJob job = obj->job->active;
-
-    obj->job->jobsQueued--;
-
-    VIR_DEBUG("Stopping job: %s (async=%s vm=%p name=%s)",
-              virDomainJobTypeToString(job),
-              virDomainAsyncJobTypeToString(obj->job->asyncJob),
-              obj, obj->def->name);
-
-    virDomainObjResetJob(obj->job);
-    if (virDomainTrackJob(job))
-        qemuDomainSaveStatus(obj);
-    /* We indeed need to wake up ALL threads waiting because
-     * grabbing a job requires checking more variables. */
-    virCondBroadcast(&obj->job->cond);
-}
-
 void
 qemuDomainObjEndAgentJob(virDomainObj *obj)
 {
diff --git a/src/qemu/qemu_domainjob.h b/src/qemu/qemu_domainjob.h
index 66f18483fe..918b74748b 100644
--- a/src/qemu/qemu_domainjob.h
+++ b/src/qemu/qemu_domainjob.h
@@ -84,7 +84,6 @@ int qemuDomainObjBeginJobNowait(virDomainObj *obj,
                                 virDomainJob job)
     G_GNUC_WARN_UNUSED_RESULT;
 
-void qemuDomainObjEndJob(virDomainObj *obj);
 void qemuDomainObjEndAgentJob(virDomainObj *obj);
 void qemuDomainObjEndAsyncJob(virDomainObj *obj);
 void qemuDomainObjAbortAsyncJob(virDomainObj *obj);
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 52f0a6e45b..666e8dd228 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1706,7 +1706,7 @@ static int qemuDomainSuspend(virDomainPtr dom)
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -1762,7 +1762,7 @@ static int qemuDomainResume(virDomainPtr dom)
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -1827,7 +1827,7 @@ qemuDomainShutdownFlagsMonitor(virDomainObj *vm,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -1947,7 +1947,7 @@ qemuDomainRebootMonitor(virDomainObj *vm,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -2040,7 +2040,7 @@ qemuDomainReset(virDomainPtr dom, unsigned int flags)
         virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_CRASHED);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2117,7 +2117,7 @@ qemuDomainDestroyFlags(virDomainPtr dom,
  endjob:
     if (ret == 0)
         qemuDomainRemoveInactive(driver, vm);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2295,7 +2295,7 @@ static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
 
     ret = 0;
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2378,7 +2378,7 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPtr dom, int period,
 
     ret = 0;
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2412,7 +2412,7 @@ static int qemuDomainInjectNMI(virDomainPtr domain, unsigned int flags)
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -2470,7 +2470,7 @@ static int qemuDomainSendKey(virDomainPtr domain,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -3398,7 +3398,7 @@ qemuDomainScreenshot(virDomainPtr dom,
         unlink(tmp);
     }
 
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -3622,7 +3622,7 @@ processDeviceDeletedEvent(virQEMUDriver *driver,
     qemuDomainSaveStatus(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 }
 
 
@@ -3918,7 +3918,7 @@ processNicRxFilterChangedEvent(virDomainObj *vm,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virNetDevRxFilterFree(hostFilter);
@@ -4001,7 +4001,7 @@ processSerialChangedEvent(virQEMUDriver *driver,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 }
 
 
@@ -4020,7 +4020,7 @@ processJobStatusChangeEvent(virDomainObj *vm,
     qemuBlockJobUpdate(vm, job, VIR_ASYNC_JOB_NONE);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 }
 
 
@@ -4066,7 +4066,7 @@ processMonitorEOFEvent(virQEMUDriver *driver,
 
  endjob:
     qemuDomainRemoveInactive(driver, vm);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 }
 
 
@@ -4180,7 +4180,7 @@ processMemoryDeviceSizeChange(virQEMUDriver *driver,
                                                            mem->currentsize);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     virObjectEventStateQueue(driver->domainEventState, event);
 }
 
@@ -4388,7 +4388,7 @@ qemuDomainSetVcpusFlags(virDomainPtr dom,
     if (useAgent)
         qemuDomainObjEndAgentJob(vm);
     else
-        qemuDomainObjEndJob(vm);
+        virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -4544,7 +4544,7 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -4692,7 +4692,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virObjectEventStateQueue(driver->domainEventState, event);
@@ -4934,7 +4934,7 @@ qemuDomainGetIOThreadsLive(virDomainObj *vm,
     ret = niothreads;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     if (info_ret) {
@@ -5098,7 +5098,7 @@ qemuDomainPinIOThread(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virObjectEventStateQueue(driver->domainEventState, event);
@@ -5642,7 +5642,7 @@ qemuDomainChgIOThread(virQEMUDriver *driver,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
     return ret;
 }
@@ -6829,7 +6829,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
 
     ret = 0;
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -8004,7 +8004,7 @@ qemuDomainAttachDeviceFlags(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -8107,7 +8107,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     if (dev != dev_copy)
@@ -8289,7 +8289,7 @@ qemuDomainDetachDeviceFlags(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -8324,7 +8324,7 @@ qemuDomainDetachDeviceAlias(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -8423,7 +8423,7 @@ static int qemuDomainSetAutostart(virDomainPtr dom,
         vm->autostart = autostart;
 
  endjob:
-        qemuDomainObjEndJob(vm);
+        virDomainObjEndJob(vm);
     }
     ret = 0;
 
@@ -8563,7 +8563,7 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -8735,7 +8735,7 @@ qemuDomainSetMemoryParameters(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -9016,7 +9016,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -9206,7 +9206,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -9267,7 +9267,7 @@ qemuDomainGetPerfEvents(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -9647,7 +9647,7 @@ qemuDomainSetSchedulerParametersFlags(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -9967,7 +9967,7 @@ qemuDomainBlockResize(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -10141,7 +10141,7 @@ qemuDomainBlockStats(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -10228,7 +10228,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom,
     *nparams = nstats;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     VIR_FREE(blockstats);
@@ -10531,7 +10531,7 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -10705,7 +10705,7 @@ qemuDomainMemoryStats(virDomainPtr dom,
 
     ret = qemuDomainMemoryStatsInternal(vm, stats, nr_stats);
 
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -10852,7 +10852,7 @@ qemuDomainMemoryPeek(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     VIR_FORCE_CLOSE(fd);
@@ -11165,7 +11165,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
  cleanup:
     VIR_FREE(entry);
     virDomainObjEndAPI(&vm);
@@ -12715,7 +12715,7 @@ qemuDomainGetJobStatsInternal(virDomainObj *vm,
     ret = 0;
 
  cleanup:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -12927,7 +12927,7 @@ qemuDomainAbortJobFlags(virDomainPtr dom,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -12982,7 +12982,7 @@ qemuDomainMigrateSetMaxDowntime(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -13033,7 +13033,7 @@ qemuDomainMigrateGetMaxDowntime(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -13083,7 +13083,7 @@ qemuDomainMigrateGetCompressionCache(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -13136,7 +13136,7 @@ qemuDomainMigrateSetCompressionCache(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -13214,7 +13214,7 @@ qemuDomainMigrateSetMaxSpeed(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -13267,7 +13267,7 @@ qemuDomainMigrationGetPostcopyBandwidth(virDomainObj *vm,
     ret = 0;
 
  cleanup:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -13351,7 +13351,7 @@ qemuDomainMigrateStartPostCopy(virDomainPtr dom,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -14085,7 +14085,7 @@ qemuDomainQemuMonitorCommandWithFiles(virDomainPtr domain,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -14476,7 +14476,7 @@ qemuDomainBlockPullCommon(virDomainObj *vm,
     qemuBlockJobStarted(job, vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     qemuBlockJobStartupFinalize(vm, job);
@@ -14583,7 +14583,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom,
  endjob:
     if (job && !async)
         qemuBlockJobSyncEnd(vm, job, VIR_ASYNC_JOB_NONE);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -14698,7 +14698,7 @@ qemuDomainGetBlockJobInfo(virDomainPtr dom,
     ret = 1;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -14759,7 +14759,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -15181,7 +15181,7 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
     if (need_unlink && virStorageSourceUnlink(mirror) < 0)
         VIR_WARN("%s", _("unable to remove just-created copy target"));
     virStorageSourceDeinit(mirror);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     qemuBlockJobStartupFinalize(vm, job);
 
     return ret;
@@ -15566,7 +15566,7 @@ qemuDomainBlockCommit(virDomainPtr dom,
         virErrorRestore(&orig_err);
     }
     qemuBlockJobStartupFinalize(vm, job);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -15640,7 +15640,7 @@ qemuDomainOpenGraphics(virDomainPtr dom,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -15717,7 +15717,7 @@ qemuDomainOpenGraphicsFD(virDomainPtr dom,
     ret = qemuMonitorOpenGraphics(priv->mon, protocol, pair[1], "graphicsfd",
                                   (flags & VIR_DOMAIN_OPEN_GRAPHICS_SKIPAUTH));
     qemuDomainObjExitMonitor(vm);
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     if (ret < 0)
         goto cleanup;
 
@@ -16200,7 +16200,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
 
     ret = 0;
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     VIR_FREE(info.group_name);
@@ -16353,7 +16353,7 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     VIR_FREE(reply.group_name);
@@ -16424,7 +16424,7 @@ qemuDomainGetDiskErrors(virDomainPtr dom,
     ret = n;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -16472,7 +16472,7 @@ qemuDomainSetMetadata(virDomainPtr dom,
         virObjectEventStateQueue(driver->domainEventState, ev);
     }
 
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -16589,7 +16589,7 @@ qemuDomainQueryWakeupSuspendSupport(virDomainObj *vm,
     ret = qemuDomainProbeQMPCurrentMachine(vm, wakeupSupported);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -16724,7 +16724,7 @@ qemuDomainPMWakeup(virDomainPtr dom,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -17104,7 +17104,7 @@ qemuDomainGetHostnameLease(virDomainObj *vm,
 
     ret = 0;
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -17283,7 +17283,7 @@ qemuDomainSetTime(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -18820,7 +18820,7 @@ qemuConnectGetAllDomainStats(virConnectPtr conn,
         rc = qemuDomainGetStats(conn, vm, requestedStats, &tmp, domflags);
 
         if (HAVE_JOB(domflags))
-            qemuDomainObjEndJob(vm);
+            virDomainObjEndJob(vm);
 
         virObjectUnlock(vm);
 
@@ -18998,7 +18998,7 @@ qemuDomainGetFSInfo(virDomainPtr dom,
     ret = virDomainFSInfoFormat(agentinfo, nfs, vm->def, info);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     if (agentinfo) {
@@ -19312,7 +19312,7 @@ static int qemuDomainRename(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -19570,7 +19570,7 @@ qemuDomainSetVcpu(virDomainPtr dom,
     ret = qemuDomainSetVcpuInternal(driver, vm, def, persistentDef, map, !!state);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -19631,7 +19631,7 @@ qemuDomainSetBlockThreshold(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -19813,7 +19813,7 @@ qemuDomainSetLifecycleAction(virDomainPtr dom,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -19972,7 +19972,7 @@ qemuDomainGetSEVInfo(virDomainObj *vm,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
     return ret;
 }
 
@@ -20097,7 +20097,7 @@ qemuDomainSetLaunchSecurityState(virDomainPtr domain,
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
@@ -20488,7 +20488,7 @@ qemuDomainGetGuestInfo(virDomainPtr dom,
             qemuAgentDiskInfoFormatParams(agentdiskinfo, ndisks, vm->def, params, nparams, &maxparams);
 
  endjob:
-        qemuDomainObjEndJob(vm);
+        virDomainObjEndJob(vm);
     }
 
     if (nifaces > 0) {
@@ -20751,7 +20751,7 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom,
     qemuDomainObjExitMonitor(vm);
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     virDomainObjEndAPI(&vm);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index ca1f9071bc..38c2f6fdfd 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2844,7 +2844,7 @@ qemuMigrationSrcBegin(virConnectPtr conn,
         else
             qemuMigrationJobFinish(vm);
     } else {
-        qemuDomainObjEndJob(vm);
+        virDomainObjEndJob(vm);
     }
 
  cleanup:
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d84d113829..16651341fc 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -492,7 +492,7 @@ qemuProcessFakeReboot(void *opaque)
     ret = 0;
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
  cleanup:
     priv->pausedShutdown = false;
@@ -8415,7 +8415,7 @@ void qemuProcessStop(virQEMUDriver *driver,
 
  endjob:
     if (asyncJob != VIR_ASYNC_JOB_NONE)
-        qemuDomainObjEndJob(vm);
+        virDomainObjEndJob(vm);
 
  cleanup:
     virErrorRestore(&orig_err);
@@ -8457,7 +8457,7 @@ qemuProcessAutoDestroy(virDomainObj *dom,
 
     qemuDomainRemoveInactive(driver, dom);
 
-    qemuDomainObjEndJob(dom);
+    virDomainObjEndJob(dom);
 
     virObjectEventStateQueue(driver->domainEventState, event);
 }
@@ -8919,7 +8919,7 @@ qemuProcessReconnect(void *opaque)
 
  cleanup:
     if (jobStarted)
-        qemuDomainObjEndJob(obj);
+        virDomainObjEndJob(obj);
     if (!virDomainObjIsActive(obj))
         qemuDomainRemoveInactive(driver, obj);
     virDomainObjEndAPI(&obj);
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index c50e9f3846..afed0f0e28 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -2373,7 +2373,7 @@ qemuSnapshotDelete(virDomainObj *vm,
     }
 
  endjob:
-    qemuDomainObjEndJob(vm);
+    virDomainObjEndJob(vm);
 
     return ret;
 }
-- 
2.37.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux