summaryrefslogtreecommitdiff
path: root/lib/btrfs/btrfstree
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-04 09:42:44 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-04-17 19:52:26 -0600
commita74c2cd52a12614565349577b8a5a6fbdcf337c3 (patch)
tree23f67521b4ee24581002d06ccaadc285f348041a /lib/btrfs/btrfstree
parenteb19c7c4d4a1a8b49ea4423b706edff651768447 (diff)
btrfsutil: RebuiltTree: Properly track errors for the btrfstree.Tree API
Diffstat (limited to 'lib/btrfs/btrfstree')
-rw-r--r--lib/btrfs/btrfstree/path.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/btrfs/btrfstree/path.go b/lib/btrfs/btrfstree/path.go
index 327a39b..3fd43c8 100644
--- a/lib/btrfs/btrfstree/path.go
+++ b/lib/btrfs/btrfstree/path.go
@@ -134,7 +134,7 @@ func (path Path) String() string {
return ret.String()
}
-func checkOwner(
+func CheckOwner(
ctx context.Context, forrest Forrest, treeID btrfsprim.ObjID,
ownerToCheck btrfsprim.ObjID, genToCheck btrfsprim.Generation,
) error {
@@ -194,7 +194,7 @@ func (path Path) NodeExpectations(ctx context.Context) (_ btrfsvol.LogicalAddr,
Level: containers.OptionalValue(lastElem.ToLevel),
Generation: containers.OptionalValue(lastElem.ToGeneration),
Owner: func(owner btrfsprim.ObjID, gen btrfsprim.Generation) error {
- return checkOwner(ctx, firstElem.Forrest, lastElem.TreeID,
+ return CheckOwner(ctx, firstElem.Forrest, lastElem.TreeID,
owner, gen)
},
MinItem: containers.OptionalValue(btrfsprim.Key{}),
@@ -206,7 +206,7 @@ func (path Path) NodeExpectations(ctx context.Context) (_ btrfsvol.LogicalAddr,
Level: containers.OptionalValue(lastElem.ToLevel),
Generation: containers.OptionalValue(lastElem.ToGeneration),
Owner: func(owner btrfsprim.ObjID, gen btrfsprim.Generation) error {
- return checkOwner(ctx, firstElem.Forrest, lastElem.FromTree,
+ return CheckOwner(ctx, firstElem.Forrest, lastElem.FromTree,
owner, gen)
},
MinItem: containers.OptionalValue(lastElem.ToMinKey),