diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2022-08-30 00:44:30 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2022-08-30 21:29:22 -0600 |
commit | 9a3006e0de95aba2c5c5509fac7d7a2a24943d4a (patch) | |
tree | cc452559da08c5b7a887f7b297f8b37bb903f8c1 /lib | |
parent | 6543bbc9ffeaa2ba28b4d1ba5d6db509213b5e5d (diff) |
wip: fix reinit
Diffstat (limited to 'lib')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildnodes/s3_reinit.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildnodes/s3_reinit.go b/lib/btrfsprogs/btrfsinspect/rebuildnodes/s3_reinit.go index a4b8f0f..a7b2f29 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildnodes/s3_reinit.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildnodes/s3_reinit.go @@ -20,7 +20,7 @@ import ( ) type RebuiltNode struct { - Err string + Errs containers.Set[string] MinKey, MaxKey btrfsprim.Key InTrees containers.Set[btrfsprim.ObjID] btrfstree.Node @@ -56,6 +56,7 @@ func (a RebuiltNode) Merge(b RebuiltNode) (RebuiltNode, error) { // take the union a.InTrees.InsertFrom(b.InTrees) + a.Errs.InsertFrom(b.Errs) return a, nil } @@ -104,7 +105,7 @@ func reInitBrokenNodes(ctx context.Context, fs _FS, badNodes []badNode) (map[btr min, max := spanOfTreePath(fs, path) node := RebuiltNode{ - Err: err.Error(), + Errs: containers.Set[string]{err.Error(): struct{}{}}, MinKey: min, MaxKey: max, InTrees: containers.Set[btrfsprim.ObjID]{path.Node(-1).FromTree: struct{}{}}, |