summaryrefslogtreecommitdiffstats
path: root/ctdb/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-22 13:53:42 +0930
committerRusty Russell <rusty@rustcorp.com.au>2010-04-22 13:53:42 +0930
commitff2e1c9fd617dc3ce0218d14bf384c4c0176a797 (patch)
treeff8b6157713cae1e9f9027611055a58674b89101 /ctdb/lib
parent9f003c2b5469543440efb765534f4817b31bf1ed (diff)
downloadsamba-ff2e1c9fd617dc3ce0218d14bf384c4c0176a797.tar.gz
samba-ff2e1c9fd617dc3ce0218d14bf384c4c0176a797.tar.xz
samba-ff2e1c9fd617dc3ce0218d14bf384c4c0176a797.zip
tdb: use fdatasync() instead of fsync() in transactions
This might help on some filesystems (Imported from commit 1373e748aa53fbd3afe4d2377208257d42628d86) (This used to be ctdb commit e9ee4aaeb471a7f5ba4c97d3f76f406c1fe9b92f)
Diffstat (limited to 'ctdb/lib')
-rw-r--r--ctdb/lib/tdb/common/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/lib/tdb/common/transaction.c b/ctdb/lib/tdb/common/transaction.c
index ccb4d955a3..606eaa7a6f 100644
--- a/ctdb/lib/tdb/common/transaction.c
+++ b/ctdb/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;