mirror of
https://github.com/minio/minio.git
synced 2025-02-25 20:39:14 -05:00
XL/Erasure: Blocksize for object-part should be derived from what was decided during xl.NewMultipartUpload which creates xl.json. (#1920)
fixes #1919
This commit is contained in:
parent
d31b38aac8
commit
466a2e01f1
@ -29,13 +29,13 @@ import (
|
||||
// all the disks, writes also calculate individual block's checksum
|
||||
// for future bit-rot protection.
|
||||
func erasureCreateFile(disks []StorageAPI, volume string, path string, partName string, data io.Reader, eInfos []erasureInfo, writeQuorum int) (newEInfos []erasureInfo, size int64, err error) {
|
||||
// Allocated blockSized buffer for reading.
|
||||
buf := make([]byte, blockSizeV1)
|
||||
hashWriters := newHashWriters(len(disks))
|
||||
|
||||
// Just pick one eInfo.
|
||||
eInfo := pickValidErasureInfo(eInfos)
|
||||
|
||||
// Allocated blockSized buffer for reading.
|
||||
buf := make([]byte, eInfo.BlockSize)
|
||||
hashWriters := newHashWriters(len(disks))
|
||||
|
||||
// Read until io.EOF, erasure codes data and writes to all disks.
|
||||
for {
|
||||
var n int
|
||||
|
Loading…
x
Reference in New Issue
Block a user