]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 1 Sep 2017 06:49:19 +0000 (09:49 +0300)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 7 Sep 2017 07:41:45 +0000 (09:41 +0200)
qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and
timeRemaining is always 0.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_migration_cookie.c

index 9cff50100630ea83b6d702a1d8b9f3d0cda393c7..33b0f6897da47eeef7cbafdfae3ba8305dfe7dbd 100644 (file)
@@ -418,7 +418,6 @@ qemuDomainJobInfoToInfo(qemuDomainJobInfoPtr jobInfo,
 {
     info->type = jobInfo->type;
     info->timeElapsed = jobInfo->timeElapsed;
-    info->timeRemaining = jobInfo->timeRemaining;
 
     info->memTotal = jobInfo->stats.ram_total;
     info->memRemaining = jobInfo->stats.ram_remaining;
@@ -463,12 +462,6 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
                                 jobInfo->timeElapsed - jobInfo->timeDelta) < 0)
         goto error;
 
-    if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED &&
-        virTypedParamsAddULLong(&par, &npar, &maxpar,
-                                VIR_DOMAIN_JOB_TIME_REMAINING,
-                                jobInfo->timeRemaining) < 0)
-        goto error;
-
     if (stats->downtime_set &&
         virTypedParamsAddULLong(&par, &npar, &maxpar,
                                 VIR_DOMAIN_JOB_DOWNTIME,
index f93b09b69e8565a81bf8a3585d36b8ec18a28a3d..01fb70375b3c3d82f6652261ca65c3068f97a83e 100644 (file)
@@ -112,7 +112,6 @@ struct _qemuDomainJobInfo {
                                     info from the source (migrations only). */
     /* Computed values */
     unsigned long long timeElapsed;
-    unsigned long long timeRemaining;
     long long timeDelta; /* delta = received - sent, i.e., the difference
                             between the source and the destination time plus
                             the time between the end of Perform phase on the
index 45a56716ec82c12cb7661f18801db04ed1a3ec34..88740ece0602ac891036102d4b15e107882ab7a7 100644 (file)
@@ -13018,8 +13018,7 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
     }
     *jobInfo = *info;
 
-    if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED ||
-        jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
+    if (jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
         if (fetch)
             ret = qemuMigrationFetchJobStatus(driver, vm, QEMU_ASYNC_JOB_NONE,
                                               jobInfo);
index af0ac034189fb236d014e66da874cef20d4d3bc4..5f8595fdbaf77dbe7ce3c84055a31011a9fbd06f 100644 (file)
@@ -612,9 +612,6 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
     virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
                       VIR_DOMAIN_JOB_TIME_ELAPSED,
                       jobInfo->timeElapsed);
-    virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
-                      VIR_DOMAIN_JOB_TIME_REMAINING,
-                      jobInfo->timeRemaining);
     if (stats->downtime_set)
         virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
                           VIR_DOMAIN_JOB_DOWNTIME,
@@ -987,8 +984,6 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
 
     virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_ELAPSED "[1])",
                       ctxt, &jobInfo->timeElapsed);
-    virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_REMAINING "[1])",
-                      ctxt, &jobInfo->timeRemaining);
 
     if (virXPathULongLong("string(./" VIR_DOMAIN_JOB_DOWNTIME "[1])",
                           ctxt, &stats->downtime) == 0)