diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-09-22 11:53:19 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-09-22 11:53:19 -0600 |
commit | d285804df1760edf4c602ecd901be5d5e67bf982 (patch) | |
tree | a69b6978e0c1231f5f051aabe6d16c7e9744c2c6 /tx.go | |
parent | Merge pull request #258 from davecgh/davec_build (diff) | |
parent | Fix bolt on OpenBSD. (diff) | |
download | dedo-d285804df1760edf4c602ecd901be5d5e67bf982.tar.gz dedo-d285804df1760edf4c602ecd901be5d5e67bf982.tar.xz |
Merge pull request #259 from davecgh/jrick_msync
Fix bolt on OpenBSD
Diffstat (limited to 'tx.go')
-rw-r--r-- | tx.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -425,8 +425,8 @@ func (tx *Tx) write() error { // Update statistics. tx.stats.Write++ } - if !tx.db.NoSync { - if err := fdatasync(tx.db.file); err != nil { + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { return err } } @@ -448,8 +448,8 @@ func (tx *Tx) writeMeta() error { if _, err := tx.db.ops.writeAt(buf, int64(p.id)*int64(tx.db.pageSize)); err != nil { return err } - if !tx.db.NoSync { - if err := fdatasync(tx.db.file); err != nil { + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { return err } } |