mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
01f3ea6488
commit
16bf7619b8
@ -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,
|
|||||||
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 {
|
|||||||
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,
|
|||||||
}
|
}
|
||||||
*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,
|
|||||||
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)
|
|||||||
|
|
||||||
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user