From d78ea3e34abd30fb388c4cc39e12611e211416a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 22 Sep 2005 04:16:46 +0000 Subject: r10406: added --nosync option to all ldb tools, so that you can control if transactions are synchronous or not on the command line. add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary ldb databases non-synchronous (This used to be commit dba41164e0c52f1e4351bd9057b16661cee3a822) --- source4/lib/ldb/ldb_tdb/ldb_tdb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source4/lib/ldb/ldb_tdb') diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index c056bd2e2d..a2faaa805f 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -895,11 +895,10 @@ int ltdb_connect(struct ldb_context *ldb, const char *url, tdb_flags = TDB_DEFAULT; -#if 0 - /* set this to run tdb without disk sync, but still with - transactions */ - tdb_flags |= TDB_NOSYNC; -#endif + /* check for the 'nosync' option */ + if (flags & LDB_FLG_NOSYNC) { + tdb_flags |= TDB_NOSYNC; + } if (flags & LDB_FLG_RDONLY) { open_flags = O_RDONLY; -- cgit