diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-30 10:05:10 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-30 10:05:10 -0600 |
commit | e62b128e088346e891b8b2a5e6458cf77abc9d02 (patch) | |
tree | f92fd945ea2393431c01a1bd49ac16264673d467 /lib/btrfs/btrfstree/btree.go | |
parent | cdc2df19c59965149e11c3a5710458c626ea0668 (diff) | |
parent | 6f1914f5db33a0d4431069eb9378cac68daf8cc0 (diff) |
Merge branch 'lukeshu/tree-api-pt2-path'
Diffstat (limited to 'lib/btrfs/btrfstree/btree.go')
-rw-r--r-- | lib/btrfs/btrfstree/btree.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/btrfs/btrfstree/btree.go b/lib/btrfs/btrfstree/btree.go index 4f5d21b..19c7c68 100644 --- a/lib/btrfs/btrfstree/btree.go +++ b/lib/btrfs/btrfstree/btree.go @@ -14,6 +14,17 @@ import ( "git.lukeshu.com/btrfs-progs-ng/lib/btrfs/btrfsvol" ) +type Tree interface { + // 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 +} + type TreeSearcher interface { // How the search should be described in the event of an // error. |