|
@ -210,6 +210,10 @@ func (n *NodeImpl) GetMaxVolumeId() needle.VolumeId { |
|
|
func (n *NodeImpl) LinkChildNode(node Node) { |
|
|
func (n *NodeImpl) LinkChildNode(node Node) { |
|
|
n.Lock() |
|
|
n.Lock() |
|
|
defer n.Unlock() |
|
|
defer n.Unlock() |
|
|
|
|
|
n.doLinkChildNode(node) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (n *NodeImpl) doLinkChildNode(node Node) { |
|
|
if n.children[node.Id()] == nil { |
|
|
if n.children[node.Id()] == nil { |
|
|
n.children[node.Id()] = node |
|
|
n.children[node.Id()] = node |
|
|
n.UpAdjustDiskUsageDelta(node.GetDiskUsages()) |
|
|
n.UpAdjustDiskUsageDelta(node.GetDiskUsages()) |
|
|