diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-12 17:01:13 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-07-12 17:01:13 -0600 |
commit | bba3428e8f034802b4b5ceb772bde1285a65ee50 (patch) | |
tree | 7b56b8241385c4474c232ccb584bf07089e47e92 /lib/btrfs/io3_btree.go | |
parent | 54ba669b644f13c158fcbbde76943543eaf66e0a (diff) |
Don't include the offset and size in btrfs.Item
Diffstat (limited to 'lib/btrfs/io3_btree.go')
-rw-r--r-- | lib/btrfs/io3_btree.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/btrfs/io3_btree.go b/lib/btrfs/io3_btree.go index 14419fe..759e378 100644 --- a/lib/btrfs/io3_btree.go +++ b/lib/btrfs/io3_btree.go @@ -367,7 +367,7 @@ func (fs *FS) treeSearch(treeRoot treeRoot, fn func(Key) int) (TreePath, *util.R end := len(node.Data.BodyLeaf) for beg < end { midpoint := (beg + end) / 2 - direction := fn(node.Data.BodyLeaf[midpoint].Head.Key) + direction := fn(node.Data.BodyLeaf[midpoint].Key) switch { case direction < 0: end = midpoint @@ -551,7 +551,7 @@ func (fs *FS) TreeSearchAll(treeID ObjID, fn func(Key) int) ([]Item, error) { break } prevItem := prevNode.Data.BodyLeaf[prevPath.Nodes[len(prevPath.Nodes)-1].ItemIdx] - if fn(prevItem.Head.Key) != 0 { + if fn(prevItem.Key) != 0 { break } ret = append(ret, prevItem) @@ -567,7 +567,7 @@ func (fs *FS) TreeSearchAll(treeID ObjID, fn func(Key) int) ([]Item, error) { break } nextItem := nextNode.Data.BodyLeaf[nextPath.Nodes[len(nextPath.Nodes)-1].ItemIdx] - if fn(nextItem.Head.Key) != 0 { + if fn(nextItem.Key) != 0 { break } ret = append(ret, nextItem) |