mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
xl: Fix counting offline disks in StorageInfo (#9082)
Recent modification in the code led to incorrect calculation of offline disks. This commit saves the endpoint list in a xlObjects then we know the name of each disk.
This commit is contained in:
@@ -302,10 +302,16 @@ func newXLSets(endpoints Endpoints, format *formatXLV3, setCount int, drivesPerS
|
||||
s.xlDisks[i] = make([]StorageAPI, drivesPerSet)
|
||||
s.xlLockers[i] = make([]dsync.NetLocker, drivesPerSet)
|
||||
|
||||
var endpoints Endpoints
|
||||
for j := 0; j < drivesPerSet; j++ {
|
||||
endpoints = append(endpoints, s.endpoints[i*s.drivesPerSet+j])
|
||||
}
|
||||
|
||||
// Initialize xl objects for a given set.
|
||||
s.sets[i] = &xlObjects{
|
||||
getDisks: s.GetDisks(i),
|
||||
getLockers: s.GetLockers(i),
|
||||
endpoints: endpoints,
|
||||
nsMutex: mutex,
|
||||
bp: bp,
|
||||
mrfUploadCh: make(chan partialUpload, 10000),
|
||||
|
||||
Reference in New Issue
Block a user