/* back-ldbm.h - ldap ldbm back-end header file */
/* $OpenLDAP$ */
-/*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2005 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
*/
#ifndef _BACK_LDBM_H_
LDAP_BEGIN_DECL
+#define LDBM_SUBENTRIES 1
+
#define DEFAULT_CACHE_SIZE 1000
#if defined(HAVE_BERKELEY_DB) && DB_VERSION_MAJOR >= 2
# define DEFAULT_DBCACHE_SIZE 100000
#endif
-#define DEFAULT_DB_DIRECTORY LDAP_RUNDIR LDAP_DIRSEP "openldap-ldbm"
-#define DEFAULT_MODE 0600
-
#define DN_BASE_PREFIX SLAP_INDEX_EQUALITY_PREFIX
#define DN_ONE_PREFIX '%'
#define DN_SUBTREE_PREFIX '@'
#define ID_BLOCK_INDIRECT_VALUE 0
#define ID_BLOCK_INDIRECT(b) (ID_BLOCK_NIDS(b) == ID_BLOCK_INDIRECT_VALUE)
+#define USE_INDIRECT_NIDS 1
+
#ifdef USE_INDIRECT_NIDS
/*
* Use the high bit of ID_BLOCK_NMAX to indicate an INDIRECT block, thus
long dbc_blksize;
char *dbc_name;
LDBM dbc_db;
+ ldap_pvt_thread_mutex_t dbc_write_mutex;
} DBCache;
#define MAXDBCACHE 128
struct ldbminfo {
+ ldap_pvt_thread_rdwr_t li_giant_rwlock;
ID li_nextid;
- ldap_pvt_thread_mutex_t li_nextid_mutex;
- ldap_pvt_thread_mutex_t li_root_mutex;
- ldap_pvt_thread_mutex_t li_add_mutex;
int li_mode;
slap_mask_t li_defaultmask;
char *li_directory;