You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
217 B

  1. //go:build linux
  2. // +build linux
  3. package backend
  4. import (
  5. "syscall"
  6. )
  7. // Using Fdatasync to optimize file sync operation
  8. func (df *DiskFile) Sync() error {
  9. fd := df.File.Fd()
  10. return syscall.Fdatasync(int(fd))
  11. }