summaryrefslogtreecommitdiff
path: root/source3/locking
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
commit81d4f40bbe202e5dae3d4d1070b02edf16a9f62e (patch)
treebbaf7d335dfd8743795a8c1aa97474b7b8e9df61 /source3/locking
parent70b59a3b20bc3cd3e1456dc552c43cd1da22f1b0 (diff)
downloadsamba-81d4f40bbe202e5dae3d4d1070b02edf16a9f62e.tar.gz
samba-81d4f40bbe202e5dae3d4d1070b02edf16a9f62e.tar.bz2
samba-81d4f40bbe202e5dae3d4d1070b02edf16a9f62e.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. (This used to be commit e7225f7e813423c3e2a94af6a9d7ce8a1b50a166)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c6
-rw-r--r--source3/locking/locking.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 8af6effb19..5078515b3e 100644
--- a/source3/locking/brlock.c
+++ b/source3/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;
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 5cb1f71555..0ecc90c794 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -301,7 +301,8 @@ BOOL locking_init(int read_only)
return True;
tdb = tdb_open_log(lock_path("locking.tdb"),
- SMB_OPEN_DATABASE_TDB_HASH_SIZE, TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
+ lp_open_files_db_hash_size(),
+ TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST),
read_only?O_RDONLY:O_RDWR|O_CREAT,
0644);