diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-10-03 00:16:04 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-10-03 00:16:04 -0600 |
commit | fb7fb03974c84d4e23ce6257e2f65fa1b7c66fa7 (patch) | |
tree | ebade11fda79c36785572268e9a5d77823c74caf /lib/btrfs | |
parent | 7287d18465288c8161b8c7750727cf2ec307f58c (diff) |
fix bug
Diffstat (limited to 'lib/btrfs')
-rw-r--r-- | lib/btrfs/btrfstree/ops.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/btrfs/btrfstree/ops.go b/lib/btrfs/btrfstree/ops.go index d7db225..49fcbfa 100644 --- a/lib/btrfs/btrfstree/ops.go +++ b/lib/btrfs/btrfstree/ops.go @@ -412,10 +412,10 @@ func (fs TreeOperatorImpl) next(path TreePath, node *diskio.Ref[btrfsvol.Logical path = append(path, TreePathElem{ FromTree: node.Data.Head.Owner, FromItemIdx: 0, - ToNodeAddr: node.Data.BodyInternal[len(node.Data.BodyInternal)-1].BlockPtr, - ToNodeGeneration: node.Data.BodyInternal[len(node.Data.BodyInternal)-1].Generation, + ToNodeAddr: node.Data.BodyInternal[0].BlockPtr, + ToNodeGeneration: node.Data.BodyInternal[0].Generation, ToNodeLevel: node.Data.Head.Level - 1, - ToKey: node.Data.BodyInternal[len(node.Data.BodyInternal)-1].Key, + ToKey: node.Data.BodyInternal[0].Key, }) } else { path = append(path, TreePathElem{ |