mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
XL: Bring in support for object versions written during writeQuorum. (#1762)
Erasure is initialized as needed depending on the quorum and onlineDisks. This way we can manage the quorum at the object layer.
This commit is contained in:
committed by
Harshavardhana
parent
cae4782973
commit
553fdb9211
7
xl-v1.go
7
xl-v1.go
@@ -33,7 +33,6 @@ const (
|
||||
// xlObjects - Implements fs object layer.
|
||||
type xlObjects struct {
|
||||
storageDisks []StorageAPI
|
||||
erasureDisk *erasure
|
||||
dataBlocks int
|
||||
parityBlocks int
|
||||
readQuorum int
|
||||
@@ -143,17 +142,11 @@ func newXLObjects(disks []string) (ObjectLayer, error) {
|
||||
|
||||
// FIXME: healFormatXL(newDisks)
|
||||
|
||||
newErasureDisk, err := newErasure(newPosixDisks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Calculate data and parity blocks.
|
||||
dataBlocks, parityBlocks := len(newPosixDisks)/2, len(newPosixDisks)/2
|
||||
|
||||
xl := xlObjects{
|
||||
storageDisks: newPosixDisks,
|
||||
erasureDisk: newErasureDisk,
|
||||
dataBlocks: dataBlocks,
|
||||
parityBlocks: parityBlocks,
|
||||
listObjectMap: make(map[listParams][]*treeWalker),
|
||||
|
||||
Reference in New Issue
Block a user