diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-15 11:09:35 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-15 11:09:35 -0600 |
commit | c2925f0f8a5d69369b43de0d2d201291fe5ed9d1 (patch) | |
tree | 996f557b23618650983146ff0e93e8204a8ff5d3 /lib/btrfsutil/rebuilt_tree.go | |
parent | 9ff81649f425370bf3c1aee32542a784119947f8 (diff) | |
parent | bb9dafebfbf3bfd6ea111c88371844f3402f3f3f (diff) |
Merge branch 'lukeshu/misc'
Diffstat (limited to 'lib/btrfsutil/rebuilt_tree.go')
-rw-r--r-- | lib/btrfsutil/rebuilt_tree.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfsutil/rebuilt_tree.go b/lib/btrfsutil/rebuilt_tree.go index 1009204..3133a9e 100644 --- a/lib/btrfsutil/rebuilt_tree.go +++ b/lib/btrfsutil/rebuilt_tree.go @@ -33,7 +33,7 @@ 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 LRUcache. They are all + // `mu`; but they live in a shared ARCache. They are all // derived from tree.Roots, which is why it's OK if they get // evicted. // @@ -42,7 +42,7 @@ type RebuiltTree struct { // 3. tree.PotentialItems() = tree.forrest.excItems.Load(tree.ID) } -// LRU member 1: .leafToRoots() //////////////////////////////////////////////////////////////////////////////////////// +// evictable member 1: .leafToRoots() ////////////////////////////////////////////////////////////////////////////////// // leafToRoots returns all leafs (lvl=0) in the filesystem that pass // .isOwnerOK, whether or not they're in the tree. @@ -129,7 +129,7 @@ func (tree *RebuiltTree) isOwnerOK(owner btrfsprim.ObjID, gen btrfsprim.Generati } } -// LRU members 2 and 3: .Items() and .PotentialItems() ///////////////////////////////////////////////////////////////// +// evictable members 2 and 3: .Items() and .PotentialItems() /////////////////////////////////////////////////////////// // Items returns a map of the items contained in this tree. // @@ -192,7 +192,7 @@ func (tree *RebuiltTree) items(ctx context.Context, cache containers.Map[btrfspr for j, itemKey := range tree.forrest.graph.Nodes[leaf].Items { newPtr := ItemPtr{ Node: leaf, - Idx: j, + Slot: j, } if oldPtr, exists := index.Load(itemKey); !exists { index.Store(itemKey, newPtr) |