summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-18 00:38:16 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-20 12:43:08 -0400
commitae15854423fd855ced22c9cb6c9ec94c83223d30 (patch)
tree7ddc4d50ed95538e87f0fbdeb01525335ab5cf2e /lib
parentc2d3878332b3e8853257b6ee5712a5a995987387 (diff)
btrfsutil: OldRebuiltForrest: Move .TreeLookup() down within the file
Diffstat (limited to 'lib')
-rw-r--r--lib/btrfsutil/old_rebuilt_forrest.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfsutil/old_rebuilt_forrest.go b/lib/btrfsutil/old_rebuilt_forrest.go
index 0d6adc6..fed3dd4 100644
--- a/lib/btrfsutil/old_rebuilt_forrest.go
+++ b/lib/btrfsutil/old_rebuilt_forrest.go
@@ -219,10 +219,6 @@ func (bt *OldRebuiltForrest) rawTreeWalk(ctx context.Context, treeID btrfsprim.O
btrfstree.TreeOperatorImpl{NodeSource: bt.inner}.RawTreeWalk(ctx, *root, errHandle, cbs)
}
-func (bt *OldRebuiltForrest) TreeLookup(treeID btrfsprim.ObjID, key btrfsprim.Key) (btrfstree.Item, error) {
- return bt.TreeSearch(treeID, btrfstree.SearchExactKey(key))
-}
-
func (tree oldRebuiltTree) addErrs(fn func(btrfsprim.Key, uint32) int, err error) error {
var errs derror.MultiError
tree.Errors.Subrange(
@@ -267,6 +263,10 @@ func (bt *OldRebuiltForrest) readNode(nodeInfo nodeInfo) *btrfstree.Node {
return node
}
+func (bt *OldRebuiltForrest) TreeLookup(treeID btrfsprim.ObjID, key btrfsprim.Key) (btrfstree.Item, error) {
+ return bt.TreeSearch(treeID, btrfstree.SearchExactKey(key))
+}
+
func (bt *OldRebuiltForrest) TreeSearch(treeID btrfsprim.ObjID, searcher btrfstree.TreeSearcher) (btrfstree.Item, error) {
tree := bt.RebuiltTree(bt.ctx, treeID)
if tree.RootErr != nil {