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))
}