avoid passing around poolIdx, setIdx instead pass the relevant disks (#17660)

This commit is contained in:
Harshavardhana
2023-07-17 09:52:05 -07:00
committed by GitHub
parent 9b5c2c386a
commit 24e86d0c59
5 changed files with 38 additions and 30 deletions

View File

@@ -485,7 +485,12 @@ func healFreshDisk(ctx context.Context, z *erasureServerPools, endpoint Endpoint
}
// Remove .healing.bin from all disks with similar heal-id
for _, disk := range z.serverPools[poolIdx].sets[setIdx].getDisks() {
disks, err := z.GetDisks(poolIdx, setIdx)
if err != nil {
return err
}
for _, disk := range disks {
t, err := loadHealingTracker(ctx, disk)
if err != nil {
if !errors.Is(err, errFileNotFound) {