summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-13 12:57:37 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-13 22:36:11 +1100
commit1373e748aa53fbd3afe4d2377208257d42628d86 (patch)
tree593710aba2dfba58c5e275adc2e6d59cb05fe77c /lib/tdb
parentf435538576878cca81af42e34979a6e4125fe136 (diff)
downloadsamba-1373e748aa53fbd3afe4d2377208257d42628d86.tar.gz
samba-1373e748aa53fbd3afe4d2377208257d42628d86.tar.bz2
samba-1373e748aa53fbd3afe4d2377208257d42628d86.zip
tdb: use fdatasync() instead of fsync() in transactions
This might help on some filesystems
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index ccb4d955a3..606eaa7a6f 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -548,7 +548,7 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t
return 0;
}
- if (fsync(tdb->fd) != 0) {
+ if (fdatasync(tdb->fd) != 0) {
tdb->ecode = TDB_ERR_IO;
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n"));
return -1;