mirror of
https://github.com/minio/minio.git
synced 2025-02-26 04:49:16 -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
|
// all the disks, writes also calculate individual block's checksum
|
||||||
// for future bit-rot protection.
|
// 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) {
|
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.
|
// Just pick one eInfo.
|
||||||
eInfo := pickValidErasureInfo(eInfos)
|
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.
|
// Read until io.EOF, erasure codes data and writes to all disks.
|
||||||
for {
|
for {
|
||||||
var n int
|
var n int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user