mirror of
https://github.com/go-gitea/bolt.git
synced 2026-07-01 20:35:22 -04:00
b986966361
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()))
|
|
}
|