|
|
@ -215,11 +215,12 @@ func (er erasureObjects) GetObject(ctx context.Context, bucket, object string, s |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions, fi FileInfo, metaArr []FileInfo, onlineDisks []StorageAPI) error { |
|
|
|
func (er erasureObjects) getObjectWithFileInfo(ctx context.Context, bucket, object string, startOffset int64, length int64, writer io.Writer, etag string, opts ObjectOptions, fi FileInfo, metaArr []FileInfo, onlineDisks []StorageAPI) error { |
|
|
|
|
|
|
|
tmpDisks := onlineDisks |
|
|
|
// Reorder online disks based on erasure distribution order.
|
|
|
|
// Reorder online disks based on erasure distribution order.
|
|
|
|
onlineDisks = shuffleDisks(onlineDisks, fi.Erasure.Distribution) |
|
|
|
onlineDisks = shuffleDisksByIndex(tmpDisks, metaArr) |
|
|
|
|
|
|
|
|
|
|
|
// Reorder parts metadata based on erasure distribution order.
|
|
|
|
// Reorder parts metadata based on erasure distribution order.
|
|
|
|
metaArr = shufflePartsMetadata(metaArr, fi.Erasure.Distribution) |
|
|
|
metaArr = shufflePartsMetadataByIndex(tmpDisks, metaArr) |
|
|
|
|
|
|
|
|
|
|
|
// For negative length read everything.
|
|
|
|
// For negative length read everything.
|
|
|
|
if length < 0 { |
|
|
|
if length < 0 { |
|
|
|