fix: inherit heal opts globally, including bitrot settings (#11166)

Bonus re-use ReadFileStream internal io.Copy buffers, fixes
lots of chatty allocations when reading metacache readers
with many sustained concurrent listing operations

```
   17.30GB  1.27% 84.80%    35.26GB  2.58%  io.copyBuffer
```
This commit is contained in:
Harshavardhana
2020-12-24 23:04:03 -08:00
committed by GitHub
parent 027e17468a
commit 59d3639396
4 changed files with 8 additions and 12 deletions
+1 -1
View File
@@ -823,7 +823,7 @@ func listPathRaw(ctx context.Context, opts listPathRawOptions) (err error) {
defer cancel()
askDisks := len(disks)
var readers = make([]*metacacheReader, askDisks)
readers := make([]*metacacheReader, askDisks)
for i := range disks {
r, w := io.Pipe()
d := disks[i]