diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-15 18:16:13 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-03-15 20:42:51 -0600 |
commit | dcf7632d5657973f87e17413849521738273fa61 (patch) | |
tree | e60520c46628cac8322db2da5e597c0ae16069ba /lib | |
parent | d7e086766e0f4396f29987d3798cefc1bb675d1c (diff) |
btrfsutil: OldRebuiltForrest: errors: Show key range instead of path
Diffstat (limited to 'lib')
-rw-r--r-- | lib/btrfsutil/old_rebuilt_forrest.go | 8 |
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 { |