diff options
-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{}{}}, |