提交 16bf7619 编写于 作者: N Nikolay Shirokovskiy 提交者: Jiri Denemark

qemu: drop code for VIR_DOMAIN_JOB_BOUNDED and timeRemaining

qemu driver does not have VIR_DOMAIN_JOB_BOUNDED jobs and
timeRemaining is always 0.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 01f3ea64
...@@ -418,7 +418,6 @@ qemuDomainJobInfoToInfo(qemuDomainJobInfoPtr jobInfo, ...@@ -418,7 +418,6 @@ qemuDomainJobInfoToInfo(qemuDomainJobInfoPtr jobInfo,
{ {
info->type = jobInfo->type; info->type = jobInfo->type;
info->timeElapsed = jobInfo->timeElapsed; info->timeElapsed = jobInfo->timeElapsed;
info->timeRemaining = jobInfo->timeRemaining;
info->memTotal = jobInfo->stats.ram_total; info->memTotal = jobInfo->stats.ram_total;
info->memRemaining = jobInfo->stats.ram_remaining; info->memRemaining = jobInfo->stats.ram_remaining;
...@@ -463,12 +462,6 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo, ...@@ -463,12 +462,6 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
jobInfo->timeElapsed - jobInfo->timeDelta) < 0) jobInfo->timeElapsed - jobInfo->timeDelta) < 0)
goto error; 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 && if (stats->downtime_set &&
virTypedParamsAddULLong(&par, &npar, &maxpar, virTypedParamsAddULLong(&par, &npar, &maxpar,
VIR_DOMAIN_JOB_DOWNTIME, VIR_DOMAIN_JOB_DOWNTIME,
......
...@@ -112,7 +112,6 @@ struct _qemuDomainJobInfo { ...@@ -112,7 +112,6 @@ struct _qemuDomainJobInfo {
info from the source (migrations only). */ info from the source (migrations only). */
/* Computed values */ /* Computed values */
unsigned long long timeElapsed; unsigned long long timeElapsed;
unsigned long long timeRemaining;
long long timeDelta; /* delta = received - sent, i.e., the difference long long timeDelta; /* delta = received - sent, i.e., the difference
between the source and the destination time plus between the source and the destination time plus
the time between the end of Perform phase on the the time between the end of Perform phase on the
......
...@@ -13018,8 +13018,7 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver, ...@@ -13018,8 +13018,7 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
} }
*jobInfo = *info; *jobInfo = *info;
if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED || if (jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
jobInfo->type == VIR_DOMAIN_JOB_UNBOUNDED) {
if (fetch) if (fetch)
ret = qemuMigrationFetchJobStatus(driver, vm, QEMU_ASYNC_JOB_NONE, ret = qemuMigrationFetchJobStatus(driver, vm, QEMU_ASYNC_JOB_NONE,
jobInfo); jobInfo);
......
...@@ -612,9 +612,6 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf, ...@@ -612,9 +612,6 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n", virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
VIR_DOMAIN_JOB_TIME_ELAPSED, VIR_DOMAIN_JOB_TIME_ELAPSED,
jobInfo->timeElapsed); jobInfo->timeElapsed);
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
VIR_DOMAIN_JOB_TIME_REMAINING,
jobInfo->timeRemaining);
if (stats->downtime_set) if (stats->downtime_set)
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n", virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
VIR_DOMAIN_JOB_DOWNTIME, VIR_DOMAIN_JOB_DOWNTIME,
...@@ -987,8 +984,6 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt) ...@@ -987,8 +984,6 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_ELAPSED "[1])", virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_ELAPSED "[1])",
ctxt, &jobInfo->timeElapsed); ctxt, &jobInfo->timeElapsed);
virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_REMAINING "[1])",
ctxt, &jobInfo->timeRemaining);
if (virXPathULongLong("string(./" VIR_DOMAIN_JOB_DOWNTIME "[1])", if (virXPathULongLong("string(./" VIR_DOMAIN_JOB_DOWNTIME "[1])",
ctxt, &stats->downtime) == 0) ctxt, &stats->downtime) == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册