1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-06 19:40:51 +02:00
seaweedfs/weed/storage/backend/disk_file_linux.go
2022-08-10 08:21:57 -07:00

15 lines
217 B
Go

//go:build linux
// +build linux
package backend
import (
"syscall"
)
// Using Fdatasync to optimize file sync operation
func (df *DiskFile) Sync() error {
fd := df.File.Fd()
return syscall.Fdatasync(int(fd))
}