mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 22:16:15 +03:00
XL: Implement strided erasure distribution. (#1772)
Strided erasure distribution uses a new randomized block distribution for each Put operation. This information is captured inside `xl.json` for subsequent Get operations.
This commit is contained in:
committed by
Harshavardhana
parent
6dc8323684
commit
d65101a8c8
+5
-1
@@ -24,10 +24,11 @@ type erasure struct {
|
||||
DataBlocks int
|
||||
ParityBlocks int
|
||||
storageDisks []StorageAPI
|
||||
distribution []int
|
||||
}
|
||||
|
||||
// newErasure instantiate a new erasure.
|
||||
func newErasure(disks []StorageAPI) *erasure {
|
||||
func newErasure(disks []StorageAPI, distribution []int) *erasure {
|
||||
// Initialize E.
|
||||
e := &erasure{}
|
||||
|
||||
@@ -46,6 +47,9 @@ func newErasure(disks []StorageAPI) *erasure {
|
||||
// Save all the initialized storage disks.
|
||||
e.storageDisks = disks
|
||||
|
||||
// Save the distribution.
|
||||
e.distribution = distribution
|
||||
|
||||
// Return successfully initialized.
|
||||
return e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user