seaweedfs/weed/storage/backend/disk_file_linux.go

15 lines
217 B
Go
Raw Normal View History

2022-08-10 15:21:57 +00:00
//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))
}