From 72a9d87fecedbd3ba3085728b3a34a1da02a4a04 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 15 Oct 2008 10:45:31 +0000 Subject: [PATCH] BDB_PAGESIZE not used any more, use BDB/FS default instead --- servers/slapd/back-bdb/back-bdb.h | 4 ---- servers/slapd/back-bdb/dbcache.c | 6 +++--- servers/slapd/back-bdb/init.c | 5 +++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-bdb/back-bdb.h b/servers/slapd/back-bdb/back-bdb.h index e230af1bb3..967da64768 100644 --- a/servers/slapd/back-bdb/back-bdb.h +++ b/servers/slapd/back-bdb/back-bdb.h @@ -54,10 +54,6 @@ LDAP_BEGIN_DECL #define BDB_ID2ENTRY_PAGESIZE 16384 #endif -#ifndef BDB_PAGESIZE -#define BDB_PAGESIZE 4096 /* BDB's original default */ -#endif - #define DEFAULT_CACHE_SIZE 1000 /* The default search IDL stack cache depth */ diff --git a/servers/slapd/back-bdb/dbcache.c b/servers/slapd/back-bdb/dbcache.c index 7af43edd52..e9ff471ef7 100644 --- a/servers/slapd/back-bdb/dbcache.c +++ b/servers/slapd/back-bdb/dbcache.c @@ -157,10 +157,10 @@ bdb_db_cache( } } - /* If no explicit size set, use the default */ + /* If no explicit size set, use the FS default */ flags = bdb_db_findsize( bdb, name ); - if ( !flags ) flags = BDB_PAGESIZE; - rc = db->bdi_db->set_pagesize( db->bdi_db, flags ); + if ( flags ) + rc = db->bdi_db->set_pagesize( db->bdi_db, flags ); #ifdef BDB_INDEX_USE_HASH rc = db->bdi_db->set_h_hash( db->bdi_db, bdb_db_hash ); diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index 8da08d9506..20b5fe9a66 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -446,8 +446,9 @@ shm_retry: flags |= DB_CREATE; } } else { - if ( !rc ) rc = BDB_PAGESIZE; - rc = db->bdi_db->set_pagesize( db->bdi_db, rc ); + /* Use FS default size if not configured */ + if ( rc ) + rc = db->bdi_db->set_pagesize( db->bdi_db, rc ); rc = db->bdi_db->set_flags( db->bdi_db, DB_DUP | DB_DUPSORT ); -- 2.39.5