WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 11 of 12] [PCR0047] Adding context-dependent behaviour

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 11 of 12] [PCR0047] Adding context-dependent behaviour to function "Xapi_vm_memory_constraints.assert_valid_for_current_context"
From: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
Date: Mon, 1 Feb 2010 16:32:13 +0000
Delivery-date: Mon, 01 Feb 2010 09:04:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1265041922@radon>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>
# Date 1265041876 0
# Node ID ed3d292016d805d42d591f6a0baf8c6e94969582
# Parent  9322132154fe8d245d0477e7d45419ec3d6e8d41
[PCR0047] Adding context-dependent behaviour to function 
"Xapi_vm_memory_constraints.assert_valid_for_current_context".

Signed-off-by: Jonathan Knowles <jonathan.knowles@xxxxxxxxxxxxx>

diff -r 9322132154fe -r ed3d292016d8 ocaml/xapi/xapi_vm_memory_constraints.ml
--- a/ocaml/xapi/xapi_vm_memory_constraints.ml  Mon Feb 01 16:31:16 2010 +0000
+++ b/ocaml/xapi/xapi_vm_memory_constraints.ml  Mon Feb 01 16:31:16 2010 +0000
@@ -66,7 +66,10 @@
                                static_min â?¤ dynamic_min = dynamic_max = 
static_max"]))
 
        let assert_valid_for_current_context ~__context ~constraints =
-               assert_valid ~constraints
+               (if Restrictions.context_ok_for_dmc ~__context
+                       then assert_valid
+                       else assert_valid_and_pinned_at_static_max)
+               ~constraints
 
        let extract ~vm_record = 
        {
1 file changed, 4 insertions(+), 1 deletion(-)
ocaml/xapi/xapi_vm_memory_constraints.ml |    5 ++++-


Attachment: xen-api.hg-12.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>