mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-04-28 13:59:43 +00:00
For in memory workload, it does not make sense to use o_direct to copy the file. Adding a option to clear out o_direct and for other future cases.
11 lines
171 B
Go
11 lines
171 B
Go
package bolt
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
// fdatasync flushes written data to a file descriptor.
|
|
func fdatasync(db *DB) error {
|
|
return syscall.Fdatasync(int(db.file.Fd()))
|
|
}
|