mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: crash observed when position of drives different (#9490)
allocate the disk slice properly before populating disk by its ID and its position. Fixes #9416
This commit is contained in:
parent
da87188ff8
commit
c2529260e7
@ -333,12 +333,15 @@ func newXLSets(ctx context.Context, endpoints Endpoints, storageDisks []StorageA
|
||||
for i := 0; i < setCount; i++ {
|
||||
s.xlDisks[i] = make([]StorageAPI, drivesPerSet)
|
||||
s.xlLockers[i] = make([]dsync.NetLocker, drivesPerSet)
|
||||
}
|
||||
|
||||
for i := 0; i < setCount; i++ {
|
||||
var endpoints Endpoints
|
||||
for j := 0; j < drivesPerSet; j++ {
|
||||
endpoints = append(endpoints, s.endpoints[i*drivesPerSet+j])
|
||||
// Rely on endpoints list to initialize, init lockers and available disks.
|
||||
s.xlLockers[i][j] = newLockAPI(s.endpoints[i*drivesPerSet+j])
|
||||
|
||||
disk := storageDisks[i*drivesPerSet+j]
|
||||
if disk == nil {
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user