|
|
|
|
@ -150,6 +150,12 @@ func (handler *Driver) Token(ctx context.Context, uploadSession *fs.UploadSessio
|
|
|
|
|
return nil, fmt.Errorf("failed to sign upload url: %w", err)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// When disk pre-allocation is disabled, concurrent chunk uploads must be 1
|
|
|
|
|
// to avoid disk fragmentation and write contention on slave storage.
|
|
|
|
|
if !handler.Policy.Settings.PreAllocate {
|
|
|
|
|
handler.Policy.Settings.ChunkConcurrency = 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return &fs.UploadCredential{
|
|
|
|
|
SessionID: uploadSession.Props.UploadSessionID,
|
|
|
|
|
ChunkSize: handler.Policy.Settings.ChunkSize,
|
|
|
|
|
|