diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 18:40:34 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 12:32:08 +0200 |
commit | 580fedc321d0a7a11454ad633736101050ef13df (patch) | |
tree | 49580e11745e83e8868f41caf81c3bcef0daaa73 /lib | |
parent | 985e83ef520da68a60899f0ad977cb28a77b8cbe (diff) | |
download | samba-580fedc321d0a7a11454ad633736101050ef13df.tar.gz samba-580fedc321d0a7a11454ad633736101050ef13df.tar.bz2 samba-580fedc321d0a7a11454ad633736101050ef13df.zip |
tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses
it to speed testing, so we should respect it: handle it in our compat
open wrapper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tdb_compat/tdb_compat.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tdb_compat/tdb_compat.c b/lib/tdb_compat/tdb_compat.c index f432296a40..a9173fc33d 100644 --- a/lib/tdb_compat/tdb_compat.c +++ b/lib/tdb_compat/tdb_compat.c @@ -90,6 +90,12 @@ tdb_open_compat_(const char *name, int hash_size_unused, attr = &cif; tdb_flags &= ~TDB_CLEAR_IF_FIRST; } + + /* Testsuite uses this to speed things up. */ + if (getenv("TDB_NO_FSYNC")) { + tdb_flags |= TDB_NOSYNC; + } + return tdb_open(name, tdb_flags|TDB_ALLOW_NESTING, open_flags, mode, attr); } |