tdb: added TDB_NO_FSYNC env variable
authorAndrew Tridgell <tridge@samba.org>
Thu, 16 Sep 2010 10:06:44 +0000 (20:06 +1000)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 7 Oct 2010 04:38:04 +0000 (15:08 +1030)
this might help reduce test times and load on test machines

lib/tdb/common/open.c

index 401fa74ae0af0abed7de92bb95e825e479762c91..d195c1c48409f7a6ed28a002ff9dea03a1a4429a 100644 (file)
@@ -228,6 +228,10 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
                goto fail;
        }
 
+       if (getenv("TDB_NO_FSYNC")) {
+               tdb->flags |= TDB_NOSYNC;
+       }
+
        /*
         * TDB_ALLOW_NESTING is the default behavior.
         * Note: this may change in future versions!