|
|
@ -99,12 +99,18 @@ func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI { |
|
|
|
idMap[id] = struct{}{} |
|
|
|
idMap[id] = struct{}{} |
|
|
|
} |
|
|
|
} |
|
|
|
res := make([]StorageAPI, 0, len(idMap)) |
|
|
|
res := make([]StorageAPI, 0, len(idMap)) |
|
|
|
for _, ss := range z.serverPools { |
|
|
|
for _, s := range z.serverPools { |
|
|
|
for _, disks := range ss.erasureDisks { |
|
|
|
s.erasureDisksMu.RLock() |
|
|
|
|
|
|
|
defer s.erasureDisksMu.RUnlock() |
|
|
|
|
|
|
|
for _, disks := range s.erasureDisks { |
|
|
|
for _, disk := range disks { |
|
|
|
for _, disk := range disks { |
|
|
|
id, _ := disk.GetDiskID() |
|
|
|
if disk == OfflineDisk { |
|
|
|
if _, ok := idMap[id]; ok { |
|
|
|
continue |
|
|
|
res = append(res, disk) |
|
|
|
} |
|
|
|
|
|
|
|
if id, _ := disk.GetDiskID(); id != "" { |
|
|
|
|
|
|
|
if _, ok := idMap[id]; ok { |
|
|
|
|
|
|
|
res = append(res, disk) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|