mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 14:30:46 +02:00
fuse integration: use unix.O_DIRECT instead of a hard-coded x86 value
0x4000 is O_DIRECT only on x86 and amd64; on arm64 it is O_DIRECTORY. The test module already depends on golang.org/x/sys.
This commit is contained in:
1 parent
767b98f6d2
commit
0a4bfa0ca7
1 file changed
+3
-1
@@ -4,12 +4,14 @@ package fuse
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Direct I/O support for Linux
|
||||
|
||||
const (
|
||||
O_DIRECT = 0x4000 // Direct I/O flag for Linux
|
||||
O_DIRECT = unix.O_DIRECT
|
||||
)
|
||||
|
||||
func openDirectIO(path string, flags int, mode uint32) (int, error) {
|
||||
|
||||
Reference in new issue
Block a user