mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: remove ODirectReader entirely since we do not need it anymore (#18619)
This commit is contained in:
@@ -28,9 +28,39 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/minio/minio/internal/disk"
|
||||
)
|
||||
|
||||
// Block sizes constant.
|
||||
const (
|
||||
BlockSizeSmall = 32 * humanize.KiByte // Default r/w block size for smaller objects.
|
||||
BlockSizeLarge = 2 * humanize.MiByte // Default r/w block size for larger objects.
|
||||
BlockSizeReallyLarge = 4 * humanize.MiByte // Default write block size for objects per shard >= 64MiB
|
||||
)
|
||||
|
||||
// aligned sync.Pool's
|
||||
var (
|
||||
ODirectPoolXLarge = sync.Pool{
|
||||
New: func() interface{} {
|
||||
b := disk.AlignedBlock(BlockSizeReallyLarge)
|
||||
return &b
|
||||
},
|
||||
}
|
||||
ODirectPoolLarge = sync.Pool{
|
||||
New: func() interface{} {
|
||||
b := disk.AlignedBlock(BlockSizeLarge)
|
||||
return &b
|
||||
},
|
||||
}
|
||||
ODirectPoolSmall = sync.Pool{
|
||||
New: func() interface{} {
|
||||
b := disk.AlignedBlock(BlockSizeSmall)
|
||||
return &b
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// WriteOnCloser implements io.WriteCloser and always
|
||||
// executes at least one write operation if it is closed.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user