Resource shares with no resource_sharing entry are freely shareable
and do not need the planning system.  Indeed, they currently break the
planner.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 ms-planner | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ms-planner b/ms-planner
index bce6e13..8106544 100755
--- a/ms-planner
+++ b/ms-planner
@@ -71,6 +71,12 @@ sub allocations ($$) {
                        ON owntaskid = taskid
                    WHERE NOT (tasks.type='magic' AND
                                tasks.refkey='allocatable')
+                      AND NOT (resources.restype like 'share-%'
+                           AND NOT EXISTS (
+ SELECT 1 FROM resource_sharing sh
+         WHERE sh.restype = substring(resources.restype from 7)
+           AND sh.resname = resources.resname
+                                          ))
 END
         $resources_q->execute();
        while (my $row= $resources_q->fetchrow_hashref()) {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to