|
|
@ -333,12 +333,15 @@ func newXLSets(ctx context.Context, endpoints Endpoints, storageDisks []StorageA |
|
|
|
for i := 0; i < setCount; i++ { |
|
|
|
for i := 0; i < setCount; i++ { |
|
|
|
s.xlDisks[i] = make([]StorageAPI, drivesPerSet) |
|
|
|
s.xlDisks[i] = make([]StorageAPI, drivesPerSet) |
|
|
|
s.xlLockers[i] = make([]dsync.NetLocker, drivesPerSet) |
|
|
|
s.xlLockers[i] = make([]dsync.NetLocker, drivesPerSet) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for i := 0; i < setCount; i++ { |
|
|
|
var endpoints Endpoints |
|
|
|
var endpoints Endpoints |
|
|
|
for j := 0; j < drivesPerSet; j++ { |
|
|
|
for j := 0; j < drivesPerSet; j++ { |
|
|
|
endpoints = append(endpoints, s.endpoints[i*drivesPerSet+j]) |
|
|
|
endpoints = append(endpoints, s.endpoints[i*drivesPerSet+j]) |
|
|
|
// Rely on endpoints list to initialize, init lockers and available disks.
|
|
|
|
// Rely on endpoints list to initialize, init lockers and available disks.
|
|
|
|
s.xlLockers[i][j] = newLockAPI(s.endpoints[i*drivesPerSet+j]) |
|
|
|
s.xlLockers[i][j] = newLockAPI(s.endpoints[i*drivesPerSet+j]) |
|
|
|
|
|
|
|
|
|
|
|
disk := storageDisks[i*drivesPerSet+j] |
|
|
|
disk := storageDisks[i*drivesPerSet+j] |
|
|
|
if disk == nil { |
|
|
|
if disk == nil { |
|
|
|
continue |
|
|
|
continue |
|
|
|