From e9ee4aaeb471a7f5ba4c97d3f76f406c1fe9b92f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 Apr 2010 13:53:42 +0930 Subject: [PATCH] tdb: use fdatasync() instead of fsync() in transactions This might help on some filesystems (Imported from commit 1373e748aa53fbd3afe4d2377208257d42628d86) --- lib/tdb/common/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index ccb4d955..606eaa7a 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; -- 2.34.1