]> git.sur5r.net Git - openldap/commitdiff
BDB_PAGESIZE not used any more, use BDB/FS default instead
authorHoward Chu <hyc@openldap.org>
Wed, 15 Oct 2008 10:45:31 +0000 (10:45 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 15 Oct 2008 10:45:31 +0000 (10:45 +0000)
servers/slapd/back-bdb/back-bdb.h
servers/slapd/back-bdb/dbcache.c
servers/slapd/back-bdb/init.c

index e230af1bb3f719b832ae61bace3809d5f9d57b60..967da64768f6ad7485c348e331c881f8a92e8864 100644 (file)
@@ -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 */
index 7af43edd521ef88118c70a107b545348250d34ca..e9ff471ef7524c8e1b40ad15c13683c3a2e5505a 100644 (file)
@@ -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 );
index 8da08d9506d1bad4d817e88c221583c5b7038a7f..20b5fe9a66e8bf1b9c035915de37178ed652ec49 100644 (file)
@@ -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 );