mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
optimization use small blocks up to 64KB (#17107)
This commit is contained in:
@@ -24,6 +24,9 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// ODirectPlatform indicates if the platform supports O_DIRECT
|
||||
const ODirectPlatform = true
|
||||
|
||||
// OpenFileDirectIO - bypass kernel cache.
|
||||
func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return directio.OpenFile(filePath, flag, perm)
|
||||
|
||||
@@ -28,6 +28,9 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// ODirectPlatform indicates if the platform supports O_DIRECT
|
||||
const ODirectPlatform = true
|
||||
|
||||
// OpenFileDirectIO - bypass kernel cache.
|
||||
func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
|
||||
return directio.OpenFile(filePath, flag, perm)
|
||||
|
||||
@@ -24,6 +24,9 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// ODirectPlatform indicates if the platform supports O_DIRECT
|
||||
const ODirectPlatform = false
|
||||
|
||||
// OpenBSD, Windows, and illumos do not support O_DIRECT.
|
||||
// On Windows there is no documentation on disabling O_DIRECT.
|
||||
// For these systems we do not attempt to build the 'directio' dependency since
|
||||
|
||||
Reference in New Issue
Block a user