23265d
From 5e9305c83e7acf31e849af2db6b82c7651114425 Mon Sep 17 00:00:00 2001
23265d
Message-Id: <5e9305c83e7acf31e849af2db6b82c7651114425@dist-git>
23265d
From: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
23265d
Date: Fri, 1 Sep 2017 09:49:19 +0300
23265d
Subject: [PATCH] qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining
23265d
23265d
qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and
23265d
timeRemaining is always 0.
23265d
23265d
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23265d
(cherry picked from commit 16bf7619b8377b21e8cb2af33b53949ff77755c6)
23265d
23265d
https://bugzilla.redhat.com/show_bug.cgi?id=1530130
23265d
23265d
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
23265d
---
23265d
 src/qemu/qemu_domain.c           | 7 -------
23265d
 src/qemu/qemu_domain.h           | 1 -
23265d
 src/qemu/qemu_driver.c           | 3 +--
23265d
 src/qemu/qemu_migration_cookie.c | 5 -----
23265d
 4 files changed, 1 insertion(+), 15 deletions(-)
23265d
23265d
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
23265d
index ade06f07db..3c2368368f 100644
23265d
--- a/src/qemu/qemu_domain.c
23265d
+++ b/src/qemu/qemu_domain.c
23265d
@@ -395,7 +395,6 @@ qemuDomainJobInfoToInfo(qemuDomainJobInfoPtr jobInfo,
23265d
 {
23265d
     info->type = jobInfo->type;
23265d
     info->timeElapsed = jobInfo->timeElapsed;
23265d
-    info->timeRemaining = jobInfo->timeRemaining;
23265d
 
23265d
     info->memTotal = jobInfo->stats.ram_total;
23265d
     info->memRemaining = jobInfo->stats.ram_remaining;
23265d
@@ -440,12 +439,6 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
23265d
                                 jobInfo->timeElapsed - jobInfo->timeDelta) < 0)
23265d
         goto error;
23265d
 
23265d
-    if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED &&
23265d
-        virTypedParamsAddULLong(&par, &npar, &maxpar,
23265d
-                                VIR_DOMAIN_JOB_TIME_REMAINING,
23265d
-                                jobInfo->timeRemaining) < 0)
23265d
-        goto error;
23265d
-
23265d
     if (stats->downtime_set &&
23265d
         virTypedParamsAddULLong(&par, &npar, &maxpar,
23265d
                                 VIR_DOMAIN_JOB_DOWNTIME,
23265d
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
23265d
index 68458ad9ae..7002407218 100644
23265d
--- a/src/qemu/qemu_domain.h
23265d
+++ b/src/qemu/qemu_domain.h
23265d
@@ -112,7 +112,6 @@ struct _qemuDomainJobInfo {
23265d
                                     info from the source (migrations only). */
23265d
     /* Computed values */
23265d
     unsigned long long timeElapsed;
23265d
-    unsigned long long timeRemaining;
23265d
     long long timeDelta; /* delta = received - sent, i.e., the difference
23265d
                             between the source and the destination time plus
23265d
                             the time between the end of Perform phase on the
23265d
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
23265d
index 501f19fbcc..1c60d533e8 100644
23265d
--- a/src/qemu/qemu_driver.c
23265d
+++ b/src/qemu/qemu_driver.c
23265d
@@ -12971,8 +12971,7 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
23265d
     }
23265d
     *jobInfo = *info;
23265d
 
23265d
-    if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED ||
23265d
-        jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
23265d
+    if (jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
23265d
         if (fetch)
23265d
             ret = qemuMigrationFetchJobStatus(driver, vm, QEMU_ASYNC_JOB_NONE,
23265d
                                               jobInfo);
23265d
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
23265d
index af0ac03418..5f8595fdba 100644
23265d
--- a/src/qemu/qemu_migration_cookie.c
23265d
+++ b/src/qemu/qemu_migration_cookie.c
23265d
@@ -612,9 +612,6 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
23265d
     virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
23265d
                       VIR_DOMAIN_JOB_TIME_ELAPSED,
23265d
                       jobInfo->timeElapsed);
23265d
-    virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
23265d
-                      VIR_DOMAIN_JOB_TIME_REMAINING,
23265d
-                      jobInfo->timeRemaining);
23265d
     if (stats->downtime_set)
23265d
         virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
23265d
                           VIR_DOMAIN_JOB_DOWNTIME,
23265d
@@ -987,8 +984,6 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
23265d
 
23265d
     virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_ELAPSED "[1])",
23265d
                       ctxt, &jobInfo->timeElapsed);
23265d
-    virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_REMAINING "[1])",
23265d
-                      ctxt, &jobInfo->timeRemaining);
23265d
 
23265d
     if (virXPathULongLong("string(./" VIR_DOMAIN_JOB_DOWNTIME "[1])",
23265d
                           ctxt, &stats->downtime) == 0)
23265d
-- 
23265d
2.15.1
23265d