diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-29 17:11:27 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-30 00:11:57 -0600 |
commit | 7f1391d48d63a5f8780dddc41817eaa9df3ce880 (patch) | |
tree | 976590735a86c09059e3eb22cf65e0d851d4ce08 /lib/btrfsutil/old_rebuilt_forrest.go | |
parent | 755ac780df4f653879cb376d27cad7ff8e8d7b0f (diff) |
tree-wide: Funnel all btrfstree.ReadNode[btrfsvol.LogicalAddr]() calls through btrfstree.NodeSource.ReadNode()
Diffstat (limited to 'lib/btrfsutil/old_rebuilt_forrest.go')
-rw-r--r-- | lib/btrfsutil/old_rebuilt_forrest.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/btrfsutil/old_rebuilt_forrest.go b/lib/btrfsutil/old_rebuilt_forrest.go index 5b99892..24faf79 100644 --- a/lib/btrfsutil/old_rebuilt_forrest.go +++ b/lib/btrfsutil/old_rebuilt_forrest.go @@ -231,12 +231,7 @@ func (tree oldRebuiltTree) addErrs(fn func(btrfsprim.Key, uint32) int, err error } func (bt *OldRebuiltForrest) readNode(nodeInfo nodeInfo) *btrfstree.Node { - sb, err := bt.inner.Superblock() - if err != nil { - panic(fmt.Errorf("should not happen: i/o error: %w", err)) - } - - node, err := btrfstree.ReadNode[btrfsvol.LogicalAddr](bt.inner, *sb, nodeInfo.LAddr, btrfstree.NodeExpectations{ + node, err := bt.inner.ReadNode(bt.ctx, nodeInfo.LAddr, btrfstree.NodeExpectations{ LAddr: containers.OptionalValue(nodeInfo.LAddr), Level: containers.OptionalValue(nodeInfo.Level), Generation: containers.OptionalValue(nodeInfo.Generation), |