diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-04 13:16:55 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-04 13:16:55 -0600 |
commit | abad134af95903657b3a35ae69b827bcba22f841 (patch) | |
tree | bc7a628ffb336b1c790f84b3b489e8235b4ec81d /lib/btrfsutil/rebuilt_tree.go | |
parent | 5d0bd02aefed7e08f3afddf20066605149cb0b87 (diff) | |
parent | 607ea25ea1c0397749db39a15bd52c5e0d3cf552 (diff) |
Merge branch 'lukeshu/fixes'
Diffstat (limited to 'lib/btrfsutil/rebuilt_tree.go')
-rw-r--r-- | lib/btrfsutil/rebuilt_tree.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/btrfsutil/rebuilt_tree.go b/lib/btrfsutil/rebuilt_tree.go index e65a3f6..b996bdb 100644 --- a/lib/btrfsutil/rebuilt_tree.go +++ b/lib/btrfsutil/rebuilt_tree.go @@ -33,13 +33,13 @@ type RebuiltTree struct { mu sync.RWMutex Roots containers.Set[btrfsvol.LogicalAddr] // There are 3 more mutable "members" that are protected by - // `mu`; but they live in a shared ARCache. They are all + // `mu`; but they live in a shared Cache. They are all // derived from tree.Roots, which is why it's OK if they get // evicted. // - // 1. tree.leafToRoots() = tree.forrest.leafs.Load(tree.ID) - // 2. tree.RebuiltItems() = tree.forrest.incItems.Load(tree.ID) - // 3. tree.RebuiltPotentialItems() = tree.forrest.excItems.Load(tree.ID) + // 1. tree.leafToRoots() = tree.forrest.leafs.Acquire(tree.ID) + // 2. tree.RebuiltItems() = tree.forrest.incItems.Acquire(tree.ID) + // 3. tree.RebuiltPotentialItems() = tree.forrest.excItems.Acquire(tree.ID) } // evictable member 1: .leafToRoots() ////////////////////////////////////////////////////////////////////////////////// @@ -120,7 +120,7 @@ func (tree *RebuiltTree) indexNode(ctx context.Context, node btrfsvol.LogicalAdd } // isOwnerOK returns whether it is permissible for a node with -// .Head.Owner=owner to be in this tree. +// .Head.Owner=owner and .Head.Generation=gen to be in this tree. func (tree *RebuiltTree) isOwnerOK(owner btrfsprim.ObjID, gen btrfsprim.Generation) bool { for { if owner == tree.ID { |