summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-15 18:16:13 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-15 20:42:51 -0600
commitdcf7632d5657973f87e17413849521738273fa61 (patch)
treee60520c46628cac8322db2da5e597c0ae16069ba
parentd7e086766e0f4396f29987d3798cefc1bb675d1c (diff)
btrfsutil: OldRebuiltForrest: errors: Show key range instead of path
-rw-r--r--lib/btrfsutil/old_rebuilt_forrest.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/btrfsutil/old_rebuilt_forrest.go b/lib/btrfsutil/old_rebuilt_forrest.go
index 61a3e35..d49f34e 100644
--- a/lib/btrfsutil/old_rebuilt_forrest.go
+++ b/lib/btrfsutil/old_rebuilt_forrest.go
@@ -196,10 +196,10 @@ func (bt *OldRebuiltForrest) addErrs(tree oldRebuiltTree, fn func(btrfsprim.Key,
tree.Errors.Subrange(
func(k btrfsprim.Key) int { return fn(k, 0) },
func(v oldRebuiltTreeError) bool {
- errs = append(errs, &btrfstree.TreeError{
- Path: bt.arena.Inflate(v.Path),
- Err: v.Err,
- })
+ path := bt.arena.Inflate(v.Path)
+ minKey := path.Node(-1).ToKey
+ maxKey := path.Node(-1).ToMaxKey
+ errs = append(errs, fmt.Errorf("keys %v-%v: %w", minKey, maxKey, v.Err))
return true
})
if len(errs) == 0 {