[libvirt] [PATCH v3 01/16] qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Tue Apr 11 07:39:34 UTC 2017


qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and
timeRemaining is always 0.
---
 src/qemu/qemu_domain.c           | 7 -------
 src/qemu/qemu_domain.h           | 1 -
 src/qemu/qemu_migration_cookie.c | 5 -----
 3 files changed, 13 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 39bc8c7..54d9425 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -408,7 +408,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;
@@ -448,12 +447,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,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index caac5d5..caf1ebe 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -111,7 +111,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
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index bd12f11..ae56569 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -594,9 +594,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,
@@ -966,8 +963,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)
-- 
1.8.3.1




More information about the libvir-list mailing list