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