From e3f0e61282d0190b9744c69ce69dcaeea22e6a3e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 30 Mar 2023 15:11:31 -0600 Subject: btrfs: ReadableFS: Also embed btrfstree.NodeSource --- lib/btrfsutil/old_rebuilt_forrest.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/btrfsutil') diff --git a/lib/btrfsutil/old_rebuilt_forrest.go b/lib/btrfsutil/old_rebuilt_forrest.go index 91fa275..535aa94 100644 --- a/lib/btrfsutil/old_rebuilt_forrest.go +++ b/lib/btrfsutil/old_rebuilt_forrest.go @@ -461,6 +461,16 @@ func (bt *OldRebuiltForrest) Superblock() (*btrfstree.Superblock, error) { return bt.inner.Superblock() } +// AcquireNode implements btrfstree.NodeSource (and btrfs.ReadableFS). +func (bt *OldRebuiltForrest) AcquireNode(ctx context.Context, addr btrfsvol.LogicalAddr, exp btrfstree.NodeExpectations) (*btrfstree.Node, error) { + return bt.inner.AcquireNode(ctx, addr, exp) +} + +// ReleaseNode implements btrfstree.NodeSource (and btrfs.ReadableFS). +func (bt *OldRebuiltForrest) ReleaseNode(node *btrfstree.Node) { + bt.inner.ReleaseNode(node) +} + // ReadAt implements diskio.ReaderAt[btrfsvol.LogicalAddr] (and btrfs.ReadableFS). func (bt *OldRebuiltForrest) ReadAt(p []byte, off btrfsvol.LogicalAddr) (int, error) { return bt.inner.ReadAt(p, off) -- cgit v1.2.3-2-g168b