summaryrefslogtreecommitdiffstats
path: root/source/locking/brlock.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-29 22:19:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:46 -0500
commite7225f7e813423c3e2a94af6a9d7ce8a1b50a166 (patch)
tree12d38bf94c5e7054c073fa7fa4d4d79666e5d6db /source/locking/brlock.c
parent6ae15544ccfc3ff5d97565ad41ba7f57c7d29b0f (diff)
downloadsamba-e7225f7e813423c3e2a94af6a9d7ce8a1b50a166.tar.gz
samba-e7225f7e813423c3e2a94af6a9d7ce8a1b50a166.tar.xz
samba-e7225f7e813423c3e2a94af6a9d7ce8a1b50a166.zip
r14763: Add a new tuning parameter, open files database hash size,
this allows us to experiment with ensuring the tdb hash size for our open files and locking db are appropriately sized. Make the hash size larger by default (10007 instead of 1049) and make the locking db hash size the same as the open file db hash size. Jeremy.
Diffstat (limited to 'source/locking/brlock.c')
-rw-r--r--source/locking/brlock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/locking/brlock.c b/source/locking/brlock.c
index 8af6effb191..5078515b3e9 100644
--- a/source/locking/brlock.c
+++ b/source/locking/brlock.c
@@ -289,8 +289,10 @@ void brl_init(int read_only)
{
if (tdb)
return;
- tdb = tdb_open_log(lock_path("brlock.tdb"), 0, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
- read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 );
+ tdb = tdb_open_log(lock_path("brlock.tdb"),
+ lp_open_files_db_hash_size(),
+ TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
+ read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 );
if (!tdb) {
DEBUG(0,("Failed to open byte range locking database\n"));
return;