提交 d5eb7c48 编写于 作者: J Jim Fehlig

Revert "LXC: show used memory as 0 when domain is not active"

This reverts commit 1ce7c1d2,
which introduced a significant semantic change to the
virDomainGetInfo() API. Additionally, the change was only
made to 2 of the 15 virt drivers.

Conflicts:
	src/qemu/qemu_driver.c
Signed-off-by: NJim Fehlig <jfehlig@suse.com>
(cherry picked from commit 60acb38a)
上级 2b5d3443
...@@ -584,7 +584,7 @@ static int lxcDomainGetInfo(virDomainPtr dom, ...@@ -584,7 +584,7 @@ static int lxcDomainGetInfo(virDomainPtr dom,
if (!virDomainObjIsActive(vm)) { if (!virDomainObjIsActive(vm)) {
info->cpuTime = 0; info->cpuTime = 0;
info->memory = 0; info->memory = vm->def->mem.cur_balloon;
} else { } else {
if (virCgroupGetCpuacctUsage(priv->cgroup, &(info->cpuTime)) < 0) { if (virCgroupGetCpuacctUsage(priv->cgroup, &(info->cpuTime)) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED, virReportError(VIR_ERR_OPERATION_FAILED,
......
...@@ -2712,7 +2712,7 @@ static int qemuDomainGetInfo(virDomainPtr dom, ...@@ -2712,7 +2712,7 @@ static int qemuDomainGetInfo(virDomainPtr dom,
info->memory = vm->def->mem.cur_balloon; info->memory = vm->def->mem.cur_balloon;
} }
} else { } else {
info->memory = 0; info->memory = vm->def->mem.cur_balloon;
} }
info->nrVirtCpu = vm->def->vcpus; info->nrVirtCpu = vm->def->vcpus;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册