diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-06-21 07:36:01 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-06-21 07:36:01 +0000 |
commit | 15c60ca1b64a4e5dc874f60c764f0ccc8899d740 (patch) | |
tree | 551f4ac266a9727a4e3855a5db50c6b48b9dce8a /src | |
parent | 112ee89501a936ad9c492780be6b63f53b2eb9ca (diff) | |
download | guix-15c60ca1b64a4e5dc874f60c764f0ccc8899d740.tar.gz |
* Disable calls to fsync() since Berkeley DB's DB_TXN_WRITE_NOSYNC
flag doesn't seem to work as advertised.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/db.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc index 8c0678d0e8..e792a371b8 100644 --- a/src/libstore/db.cc +++ b/src/libstore/db.cc @@ -146,6 +146,12 @@ void openEnv(DbEnv * env, const string & path, u_int32_t flags) } +static int my_fsync(int fd) +{ + return 0; +} + + void Database::open(const string & path) { if (env) throw Error(format("environment already open")); @@ -164,6 +170,8 @@ void Database::open(const string & path) env->set_lk_detect(DB_LOCK_DEFAULT); env->set_flags(DB_TXN_WRITE_NOSYNC | DB_LOG_AUTOREMOVE, 1); + db_env_set_func_fsync(my_fsync); + /* The following code provides automatic recovery of the database environment. Recovery is necessary when a process |