[PATCH 01/13] libxl: vz: Use accessor instead of direct access for max_balloon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commits 45697fe5 and f863ac80 used direct access to the variable instead
of the preferred accessor method.
---
 src/libxl/libxl_driver.c | 2 +-
 src/vz/vz_driver.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 8087c27..019f04f 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -553,7 +553,7 @@ libxlAddDom0(libxlDriverPrivatePtr driver)
     vm->def->vcpus = d_info.vcpu_online;
     vm->def->maxvcpus = d_info.vcpu_max_id + 1;
     vm->def->mem.cur_balloon = d_info.current_memkb;
-    vm->def->mem.max_balloon = d_info.max_memkb;
+    virDomainDefSetMemoryInitial(vm->def, d_info.max_memkb);

     ret = 0;

diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 8fa7957..ba5d7e4 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -1200,7 +1200,7 @@ vzDomainGetMaxMemory(virDomainPtr domain)
     if (!(dom = vzDomObjFromDomain(domain)))
         return -1;

-    ret = dom->def->mem.max_balloon;
+    ret = virDomainDefGetMemoryActual(dom->def->mem);
     virObjectUnlock(dom);
     return ret;
 }
-- 
2.4.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]