mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
XL: Refactor usage of reduceErrs and consistent behavior. (#2240)
This refactor is also needed in lieu of our quorum requirement change for the newly understood logic behind klauspost/reedsolom implementation.
This commit is contained in:
committed by
Anand Babu (AB) Periasamy
parent
f67c930731
commit
cef26fd6ea
@@ -45,7 +45,7 @@ const (
|
||||
maxErasureBlocks = 16
|
||||
|
||||
// Minimum erasure blocks.
|
||||
minErasureBlocks = 6
|
||||
minErasureBlocks = 4
|
||||
)
|
||||
|
||||
// xlObjects - Implements XL object layer.
|
||||
@@ -84,7 +84,7 @@ func checkSufficientDisks(disks []string) error {
|
||||
}
|
||||
|
||||
// Verify if we have even number of disks.
|
||||
// only combination of 6, 8, 10, 12, 14, 16 are supported.
|
||||
// only combination of 4, 6, 8, 10, 12, 14, 16 are supported.
|
||||
if !isEven(totalDisks) {
|
||||
return errXLNumDisks
|
||||
}
|
||||
@@ -194,9 +194,9 @@ func newXLObjects(disks, ignoredDisks []string) (ObjectLayer, error) {
|
||||
}
|
||||
|
||||
// Figure out read and write quorum based on number of storage disks.
|
||||
// READ and WRITE quorum is always set to (N/2 + 1) number of disks.
|
||||
xl.readQuorum = len(xl.storageDisks)/2 + 1
|
||||
xl.writeQuorum = len(xl.storageDisks)/2 + 1
|
||||
// READ and WRITE quorum is always set to (N/2) number of disks.
|
||||
xl.readQuorum = len(xl.storageDisks) / 2
|
||||
xl.writeQuorum = len(xl.storageDisks) / 2
|
||||
|
||||
// Return successfully initialized object layer.
|
||||
return xl, nil
|
||||
|
||||
Reference in New Issue
Block a user