diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-05-27 09:22:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:22:50 -0500 |
commit | d5daef32b226b373185f4f18298a2872cd9a7784 (patch) | |
tree | f4bb13ed0a389fd32b7df26261f99a6a63a213b6 /source3/lib/tdb/common/open.c | |
parent | a32d8a39097c7de3f1b90a8b59434710b03776ff (diff) | |
download | samba-d5daef32b226b373185f4f18298a2872cd9a7784.tar.gz samba-d5daef32b226b373185f4f18298a2872cd9a7784.tar.bz2 samba-d5daef32b226b373185f4f18298a2872cd9a7784.zip |
r23161: Add TDB_VOLATILE as open_flag to activate the per-hashchain dead record
optimization.
(This used to be commit 945f73fa39ba6f2b637379ac20d52b4d0306d77f)
Diffstat (limited to 'source3/lib/tdb/common/open.c')
-rw-r--r-- | source3/lib/tdb/common/open.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/tdb/common/open.c b/source3/lib/tdb/common/open.c index c7fd3f6656..798395cba2 100644 --- a/source3/lib/tdb/common/open.c +++ b/source3/lib/tdb/common/open.c @@ -165,6 +165,10 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, tdb->page_size = 0x2000; } + if (open_flags & TDB_VOLATILE) { + tdb->max_dead_records = 5; + } + if ((open_flags & O_ACCMODE) == O_WRONLY) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n", name)); |