optimization use small blocks up to 64KB (#17107)

This commit is contained in:
Klaus Post
2023-05-01 09:47:49 -07:00
committed by GitHub
parent b963f69f34
commit e8c0a50862
5 changed files with 52 additions and 10 deletions
+3
View File
@@ -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)