mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
15 lines
217 B
Go
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))
|
|
}
|