Commit 556f1c21 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add a setrtabid() method; not strictly necessary but its nice to

record that info in the DB.
parent 912c6bc6
......@@ -2149,6 +2149,9 @@ sub OSSelect($$$$)
# Get the next rtabid for a shared node. Need locking in this case
# since multiple mappers can be running at once.
# We only need to do this on the physical node. On the virtual node, use
# the same slot to store what rtabid was assigned to the vnode.
sub Nextrtabid($)
my ($self) = @_;
......@@ -2173,5 +2176,23 @@ sub Nextrtabid($)
return $rtabid;
# Set rtabid for a node.
sub Setrtabid($$)
my ($self, $rtabid) = @_;
return -1
if (! (ref($self)));
my $node_id = $self->node_id();
DBQueryWarn("update nodes set rtabid='$rtabid' where node_id='$node_id'")
or return -1;
return Refresh($self);
# _Always_ make sure that this 1 is at the end of the file...
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