mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-04-27 21:23:15 +00:00
OpenBSD does not include a UBC kernel and writes must be synchronized with the msync(2) syscall. In addition, the NoSync field of the DB struct should be ignored on OpenBSD, since unlike other platforms, missing msyncs will result in data corruption. Depends on PR #258. Fixes #257.
13 lines
203 B
Go
13 lines
203 B
Go
package bolt
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
var odirect = syscall.O_DIRECT
|
|
|
|
// fdatasync flushes written data to a file descriptor.
|
|
func fdatasync(db *DB) error {
|
|
return syscall.Fdatasync(int(db.file.Fd()))
|
|
}
|