[Xen-changelog] [xen-unstable] Don't set memory_dynamic_max when xm mem-set is called. Save the VM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Xen-changelog] [xen-unstable] Don't set memory_dynamic_max when xm mem-set is called. Save the VM

Xen patchbot-unstable
# HG changeset patch
# User Ewan Mellor <[hidden email]>
# Date 1174914576 -3600
# Node ID adbcc10eb4c0667749cb48e196f1af9e0910b610
# Parent  1b4fd14f88bbe8e8c26a24e0645a8d382041abbe
Don't set memory_dynamic_max when xm mem-set is called.  Save the VM
configuration unconditionally when either the max or the target memory values
are set.

Thanks to Masaki Kanno for pointing out the first problem.

Signed-off-by: Ewan Mellor <[hidden email]>
---
 tools/python/xen/xend/XendDomainInfo.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -r 1b4fd14f88bb -r adbcc10eb4c0 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 13:59:36 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 14:09:36 2007 +0100
@@ -586,8 +586,7 @@ class XendDomainInfo:
         if self.domid >= 0:
             self.storeVm("memory", target)
             self.storeDom("memory/target", target << 10)
-        else:
-            xen.xend.XendDomain.instance().managed_config_save(self)
+        xen.xend.XendDomain.instance().managed_config_save(self)
 
     def setMemoryMaximum(self, limit):
         """Set the maximum memory limit of this domain
@@ -608,9 +607,7 @@ class XendDomainInfo:
                 return xc.domain_setmaxmem(self.domid, maxmem)
             except Exception, ex:
                 raise XendError(str(ex))
-        else:
-            self.info['memory_dynamic_max'] = limit * MiB
-            xen.xend.XendDomain.instance().managed_config_save(self)
+        xen.xend.XendDomain.instance().managed_config_save(self)
 
 
     def getVCPUInfo(self):

_______________________________________________
Xen-changelog mailing list
[hidden email]
http://lists.xensource.com/xen-changelog