diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-09 18:56:17 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-04-09 18:56:17 -0600 |
commit | c262f37c6a0ba64d39414b45fd54d172c50762c8 (patch) | |
tree | b0ba414cf714e7ccc26a4ae7b5913237937af98b /lib/btrfs/btrfstree/btree.go | |
parent | 68eb7a16b9759646619a7d9dec2b62fa9d0c30cf (diff) | |
parent | d87587a0e1d689ea1964a7de62b1e4faed120421 (diff) |
Merge branch 'lukeshu/misc'
Diffstat (limited to 'lib/btrfs/btrfstree/btree.go')
-rw-r--r-- | lib/btrfs/btrfstree/btree.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/btrfs/btrfstree/btree.go b/lib/btrfs/btrfstree/btree.go index 25259c0..e7be281 100644 --- a/lib/btrfs/btrfstree/btree.go +++ b/lib/btrfs/btrfstree/btree.go @@ -21,6 +21,11 @@ type Forrest interface { } type Tree interface { + // TreeParentID returns the ID of this tree's parent and the + // generation that this tree was split from its parent. If + // this tree has no parent, then (0, 0, nil) is returned. + TreeParentID(ctx context.Context) (btrfsprim.ObjID, btrfsprim.Generation, error) + // TreeLookup looks up the Item for a given key. // // If no such Item exists, but there is otherwise no error, @@ -70,15 +75,6 @@ type Tree interface { handleFn func(Item) bool, ) error - // CheckOwner returns whether it is permissible for a node - // with .Head.Owner=owner and .Head.Generation=gen to be in - // this tree. - // - // If there is an error determining this, then `failOpen` - // specifies whether it should return an error (false) or nil - // (true). - TreeCheckOwner(ctx context.Context, failOpen bool, owner btrfsprim.ObjID, gen btrfsprim.Generation) error - // TreeWalk is a lower-level call than TreeSubrange. Use with // hesitancy. // |