Commit 5ceddc05 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix to previous revision. This code:

    my $node_type = virtnodetype($virtual);
    if (!(virtnodeisremote($virtual)
 	 && !nodetypeisdedicatedremote($node_type)));

breaks things cause calling virtnodetype() without first checking to
see if its a real vnode, places a null entry in the array, and messes
up anyone else using the virtnodeisvnode() predicate. Instead:

    if (!virtnodeisvnode($virtual) ||
        !(virtnodeisremote($virtual)
	  && !nodetypeisdedicatedremote(virtnodetype($virtual))));

hopefully I got the logic that Dave was intending, correct!
parent a346d3e0
...@@ -1170,10 +1170,10 @@ sub RunAssign () ...@@ -1170,10 +1170,10 @@ sub RunAssign ()
# we do not reserve a widearea physnode when a virtual node # we do not reserve a widearea physnode when a virtual node
# is mapped to it; they are special. # is mapped to it; they are special.
# #
my $node_type = virtnodetype($virtual);
$toreserve{$physical} = 1 $toreserve{$physical} = 1
if (!(virtnodeisremote($virtual) if (!virtnodeisvnode($virtual) ||
&& !nodetypeisdedicatedremote($node_type))); !(virtnodeisremote($virtual)
&& !nodetypeisdedicatedremote(virtnodetype($virtual))));
} }
if (virtnodeisvirt($virtual)) { if (virtnodeisvirt($virtual)) {
...@@ -2989,7 +2989,6 @@ sub InitPnode($$) ...@@ -2989,7 +2989,6 @@ sub InitPnode($$)
my $simhost_violation; my $simhost_violation;
my $inner_elab_role; my $inner_elab_role;
my $plab_role; my $plab_role;
my $node_type = virtnodetype($vnode);
# XXX NSE hack: # XXX NSE hack:
if (virtnodeisvnode($vnode) && virtnodeissim($vnode)) { if (virtnodeisvnode($vnode) && virtnodeissim($vnode)) {
...@@ -3023,7 +3022,8 @@ sub InitPnode($$) ...@@ -3023,7 +3022,8 @@ sub InitPnode($$)
$role = TBDB_RSRVROLE_SIMHOST; $role = TBDB_RSRVROLE_SIMHOST;
$simhost_violation = 0; $simhost_violation = 0;
} }
elsif (virtnodeisremote($vnode) && !nodetypeisdedicatedremote($node_type) elsif (virtnodeisremote($vnode) &&
!nodetypeisdedicatedremote(virtnodetype($vnode))
&& $v2vmap{$vnode} ne $pnode) { && $v2vmap{$vnode} ne $pnode) {
# #
# We never allocate remote pnodes (always allocated), so skip. # We never allocate remote pnodes (always allocated), so skip.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment