mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-05-06 19:40:51 +02: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))
|
|
}
|