mirror of https://github.com/etcd-io/bbolt.git
Merge branch 'fdatasync' of https://github.com/tv42/bolt into fsync
commit
fd8a13e837
|
@ -0,0 +1,10 @@
|
|||
package bolt
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func fdatasync(f *os.File) error {
|
||||
return syscall.Fdatasync(int(f.Fd()))
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// +build !linux
|
||||
|
||||
package bolt
|
||||
|
||||
import "os"
|
||||
|
||||
// Fall back to syncing metadata too.
|
||||
func fdatasync(f *os.File) error {
|
||||
return f.Sync()
|
||||
}
|
Loading…
Reference in New Issue