diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-09 23:00:48 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-09 23:24:30 +0100 |
commit | 66d6eb27a4e14b41b5a6cbaa828b7ccc4b4244b8 (patch) | |
tree | 3065e0865c34b5101c29bd3b8af4feb675efa20b /source3/lib/tdb | |
parent | 1c4466cedcab04b9188569238a1e795629f3a007 (diff) | |
download | samba-66d6eb27a4e14b41b5a6cbaa828b7ccc4b4244b8.tar.gz samba-66d6eb27a4e14b41b5a6cbaa828b7ccc4b4244b8.tar.bz2 samba-66d6eb27a4e14b41b5a6cbaa828b7ccc4b4244b8.zip |
Fix the max_dead_record calculations
(This used to be commit 2a5c53220a5cc2b4a80fc7c6cb38e87789c5e797)
Diffstat (limited to 'source3/lib/tdb')
-rw-r--r-- | source3/lib/tdb/common/open.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/tdb/common/open.c b/source3/lib/tdb/common/open.c index 0bd1c91a5e..6efa482ac2 100644 --- a/source3/lib/tdb/common/open.c +++ b/source3/lib/tdb/common/open.c @@ -178,9 +178,7 @@ 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; - } + tdb->max_dead_records = (open_flags & TDB_VOLATILE) ? 5 : 0; if ((open_flags & O_ACCMODE) == O_WRONLY) { TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't open tdb %s write-only\n", @@ -283,7 +281,6 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags, tdb->map_size = st.st_size; tdb->device = st.st_dev; tdb->inode = st.st_ino; - tdb->max_dead_records = 0; tdb_mmap(tdb); if (locked) { if (tdb->methods->tdb_brlock(tdb, ACTIVE_LOCK, F_UNLCK, F_SETLK, 0, 1) == -1) { |