Back to index

openldap  2.4.31
Classes | Defines | Typedefs
back-bdb.h File Reference
#include <portable.h>
#include "slap.h"
#include <db.h>
#include "alock.h"
#include "proto-bdb.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  bdb_idl_cache_entry_s
struct  bdb_cache
struct  bdb_db_info
struct  bdb_db_pgsize
struct  bdb_monitor_t
struct  bdb_info
struct  bdb_lock_info
struct  bdb_op_info
struct  bdb_attrinfo
struct  AttrList
struct  IndexRec


#define DN_ONE_PREFIX   '%'
#define DN_SUBTREE_PREFIX   '@'
#define DBTzero(t)   (memset((t), 0, sizeof(DBT)))
#define DBT2bv(t, bv)
#define bv2DBT(bv, t)
#define BDB_TXN_RETRIES   16
#define BDB_MAX_ADD_LOOP   30
#define BDB_SUFFIX   ".bdb"
#define BDB_ID2ENTRY   0
#define BDB_DN2ID   1
#define BDB_NDB   2
#define BDB_ID2ENTRY_PAGESIZE   16384
#define DEFAULT_CACHE_SIZE   1000
#define CACHE_ENTRY_LOADING   0x10
#define CACHE_ENTRY_WALKING   0x20
#define CACHE_ENTRY_NOT_CACHED   0x100
#define BEI(e)   ((EntryInfo *) ((e)->e_private))
#define CACHE_READ_LOCK   0
#define CACHE_WRITE_LOCK   1
#define BDB_INDICES   128
#define BDB_IS_OPEN   0x01
#define BDB_HAS_CONFIG   0x02
#define BDB_UPD_CONFIG   0x04
#define BDB_DEL_INDEX   0x08
#define BDB_RE_OPEN   0x10
#define BDB_CHKSUM   0x20
#define bi_id2entry   bi_databases[BDB_ID2ENTRY]
#define bi_dn2id   bi_databases[BDB_DN2ID]
#define BLI_DONTFREE   1
#define BOI_DONTFREE   1
#define DB_OPEN(db, file, name, type, flags, mode)   ((db)->open)(db, file, name, type, flags, mode)
#define LOCK_DETECT(env, f, t, a)   lock_detect(env, f, t, a)
#define LOCK_GET(env, i, f, o, m, l)   lock_get(env, i, f, o, m, l)
#define LOCK_PUT(env, l)   lock_put(env, l)
#define TXN_CHECKPOINT(env, k, m, f)   txn_checkpoint(env, k, m, f)
#define TXN_BEGIN(env, p, t, f)   txn_begin((env), p, t, f)
#define TXN_PREPARE(txn, gid)   txn_prepare((txn), (gid))
#define TXN_COMMIT(txn, f)   txn_commit((txn), (f))
#define TXN_ABORT(txn)   txn_abort((txn))
#define TXN_ID(txn)   txn_id(txn)
#define XLOCK_ID(env, locker)   lock_id(env, locker)
#define XLOCK_ID_FREE(env, locker)   lock_id_free(env, locker)
#define BDB_CSN_COMMIT   0
#define BDB_CSN_ABORT   1
#define BDB_CSN_RETRY   2
#define BDB_ID2DISK(src, dst)
#define BDB_DISK2ID(src, dst)
#define BDB_INDEX_DELETING   0x8000U /* index is being modified */
#define BDB_INDEX_UPDATE_OP   0x03 /* performing an index update */


typedef struct
typedef struct bdb_entry_info EntryInfo
typedef struct bdb_cache Cache
typedef struct bdb_monitor_t bdb_monitor_t
typedef LDAP_END_DECL struct
typedef struct AttrList AttrList
typedef struct IndexRec IndexRec

Class Documentation

struct bdb_idl_cache_entry_s

Definition at line 65 of file back-bdb.h.

Collaboration diagram for bdb_idl_cache_entry_s:
Class Members
DB * db
ID * idl
int idl_flags
struct bdb_idl_cache_entry_s * idl_lru_next
struct bdb_idl_cache_entry_s * idl_lru_prev
struct bdb_entry_info

Definition at line 75 of file back-bdb.h.

Collaboration diagram for bdb_entry_info:
Class Members
Entry * bei_e
int bei_finders
ID bei_id
Avlnode * bei_kids
ldap_pvt_thread_mutex_t bei_kids_mutex
short bei_lockpad
struct bdb_entry_info * bei_lrunext
struct bdb_entry_info * bei_lruprev
struct bdb_entry_info * bei_parent
short bei_state
struct bdb_cache

Definition at line 122 of file back-bdb.h.

Collaboration diagram for bdb_cache:
Class Members
ldap_pvt_thread_mutex_t c_count_mutex
ID c_cursize
EntryInfo c_dntree
EntryInfo * c_eifree
ldap_pvt_thread_mutex_t c_eifree_mutex
ID c_eimax
ID c_eiused
Avlnode * c_idtree
ID c_leaves
ldap_pvt_thread_mutex_t c_lru_mutex
EntryInfo * c_lruhead
EntryInfo * c_lrutail
ID c_maxsize
ID c_minfree
int c_purging
ldap_pvt_thread_rdwr_t c_rwlock
DB_TXN * c_txn
struct bdb_db_info

Definition at line 150 of file back-bdb.h.

Class Members
DB * bdi_db
struct bdb_db_pgsize

Definition at line 155 of file back-bdb.h.

Collaboration diagram for bdb_db_pgsize:
Class Members
struct bdb_db_pgsize * bdp_next
int bdp_size
struct bdb_monitor_t

Definition at line 165 of file back-bdb.h.

Class Members
void * bdm_cb
struct bdb_info

Definition at line 173 of file back-bdb.h.

Collaboration diagram for bdb_info:
Class Members
alock_info_t bi_alock_info
struct bdb_attrinfo ** bi_attrs
Cache bi_cache
ldap_pvt_thread_mutex_t bi_database_mutex
struct bdb_db_info ** bi_databases
BerVarray bi_db_config
char * bi_db_config_path
char * bi_db_crypt_file
int bi_db_opflags
DB_ENV * bi_dbenv
char * bi_dbenv_home
int bi_dbenv_mode
u_int32_t bi_dbenv_xflags
slap_mask_t bi_defaultmask
int bi_flags
ID bi_idl_cache_max_size
ID bi_idl_cache_size
bdb_idl_cache_entry_t * bi_idl_lru_head
bdb_idl_cache_entry_t * bi_idl_lru_tail
Avlnode * bi_idl_tree
ldap_pvt_thread_mutex_t bi_idl_tree_lrulock
ldap_pvt_thread_rdwr_t bi_idl_tree_rwlock
struct re_s * bi_index_task
ID bi_lastid
ldap_pvt_thread_mutex_t bi_lastid_mutex
int bi_linear_index
u_int32_t bi_lock_detect
bdb_monitor_t bi_monitor
int bi_nattrs
int bi_ndatabases
struct bdb_db_pgsize * bi_pagesizes
void * bi_search_stack
int bi_search_stack_depth
long bi_shm_key
int bi_txn_cp
u_int32_t bi_txn_cp_kbyte
u_int32_t bi_txn_cp_min
struct re_s * bi_txn_cp_task
struct bdb_lock_info

Definition at line 243 of file back-bdb.h.

Collaboration diagram for bdb_lock_info:
Class Members
int bli_flag
ID bli_id
DB_LOCK bli_lock
struct bdb_lock_info * bli_next
struct bdb_op_info

Definition at line 251 of file back-bdb.h.

Collaboration diagram for bdb_op_info:
Class Members
char boi_acl_cache
u_int32_t boi_err
char boi_flag
struct bdb_lock_info * boi_locks
OpExtra boi_oe
DB_TXN * boi_txn
struct bdb_attrinfo

Definition at line 349 of file back-bdb.h.

Collaboration diagram for bdb_attrinfo:
Class Members
AttributeDescription * ai_desc
slap_mask_t ai_indexmask
slap_mask_t ai_newmask
struct AttrList

Definition at line 365 of file back-bdb.h.

Collaboration diagram for AttrList:
Class Members
Attribute * attr
struct AttrList * next
struct IndexRec

Definition at line 370 of file back-bdb.h.

Collaboration diagram for IndexRec:
Class Members
AttrInfo * ai
AttrList * attrs
union IndexRec iru

Define Documentation

#define BDB_CHKSUM   0x20

Definition at line 232 of file back-bdb.h.

#define BDB_CSN_ABORT   1

Definition at line 325 of file back-bdb.h.

#define BDB_CSN_COMMIT   0

Definition at line 324 of file back-bdb.h.

#define BDB_CSN_RETRY   2

Definition at line 326 of file back-bdb.h.

#define BDB_DEL_INDEX   0x08

Definition at line 230 of file back-bdb.h.

#define BDB_DISK2ID (   src,
do { unsigned i0; ID tmp = 0; unsigned char *_p; \
              _p = (unsigned char *)(src);       \
              for ( i0=0; i0<sizeof(ID); i0++ ) {       \
                     tmp <<= 8; tmp |= *_p++;    \
              } *(dst) = tmp; \
       } while (0)

Definition at line 338 of file back-bdb.h.

#define BDB_DN2ID   1

Definition at line 45 of file back-bdb.h.

#define BDB_HAS_CONFIG   0x02

Definition at line 228 of file back-bdb.h.

#define BDB_ID2DISK (   src,
do { int i0; ID tmp; unsigned char *_p;   \
              tmp = (src); _p = (unsigned char *)(dst); \
              for ( i0=sizeof(ID)-1; i0>=0; i0-- ) {    \
                     _p[i0] = tmp & 0xff; tmp >>= 8;    \
              } \
       } while(0)

Definition at line 329 of file back-bdb.h.

#define BDB_ID2ENTRY   0

Definition at line 44 of file back-bdb.h.

#define BDB_ID2ENTRY_PAGESIZE   16384

Definition at line 54 of file back-bdb.h.

#define BDB_INDEX_DELETING   0x8000U /* index is being modified */

Definition at line 359 of file back-bdb.h.

#define BDB_INDEX_UPDATE_OP   0x03 /* performing an index update */

Definition at line 360 of file back-bdb.h.

#define BDB_INDICES   128

Definition at line 148 of file back-bdb.h.

#define BDB_IS_OPEN   0x01

Definition at line 227 of file back-bdb.h.

#define BDB_MAX_ADD_LOOP   30

Definition at line 41 of file back-bdb.h.

#define BDB_NDB   2

Definition at line 46 of file back-bdb.h.

#define BDB_RE_OPEN   0x10

Definition at line 231 of file back-bdb.h.

#define BDB_SUFFIX   ".bdb"

Definition at line 43 of file back-bdb.h.

#define BDB_TXN_RETRIES   16

Definition at line 39 of file back-bdb.h.

#define BDB_UPD_CONFIG   0x04

Definition at line 229 of file back-bdb.h.

#define BEI (   e)    ((EntryInfo *) ((e)->e_private))

Definition at line 119 of file back-bdb.h.

#define bi_dn2id   bi_databases[BDB_DN2ID]

Definition at line 240 of file back-bdb.h.

#define bi_id2entry   bi_databases[BDB_ID2ENTRY]

Definition at line 239 of file back-bdb.h.

#define BLI_DONTFREE   1

Definition at line 249 of file back-bdb.h.

#define BOI_DONTFREE   1

Definition at line 259 of file back-bdb.h.

#define bv2DBT (   bv,
((t)->data = (bv)->bv_val, \
                                                        (t)->size = (bv)->bv_len )

Definition at line 36 of file back-bdb.h.


Definition at line 86 of file back-bdb.h.

#define CACHE_ENTRY_LOADING   0x10

Definition at line 90 of file back-bdb.h.


Definition at line 89 of file back-bdb.h.


Definition at line 87 of file back-bdb.h.

#define CACHE_ENTRY_NOT_CACHED   0x100

Definition at line 94 of file back-bdb.h.


Definition at line 88 of file back-bdb.h.


Definition at line 92 of file back-bdb.h.


Definition at line 93 of file back-bdb.h.

#define CACHE_ENTRY_WALKING   0x20

Definition at line 91 of file back-bdb.h.

#define CACHE_READ_LOCK   0

Definition at line 145 of file back-bdb.h.

#define CACHE_WRITE_LOCK   1

Definition at line 146 of file back-bdb.h.


Definition at line 321 of file back-bdb.h.

#define DB_OPEN (   db,
)    ((db)->open)(db, file, name, type, flags, mode)

Definition at line 261 of file back-bdb.h.


Definition at line 27 of file back-bdb.h.

#define DBT2bv (   t,
((bv)->bv_val = (t)->data, \
                                                        (bv)->bv_len = (t)->size)

Definition at line 34 of file back-bdb.h.

#define DBTzero (   t)    (memset((t), 0, sizeof(DBT)))

Definition at line 33 of file back-bdb.h.

#define DEFAULT_CACHE_SIZE   1000

Definition at line 57 of file back-bdb.h.


Definition at line 60 of file back-bdb.h.

Definition at line 29 of file back-bdb.h.

#define DN_ONE_PREFIX   '%'

Definition at line 30 of file back-bdb.h.

#define DN_SUBTREE_PREFIX   '@'

Definition at line 31 of file back-bdb.h.

#define LOCK_DETECT (   env,
)    lock_detect(env, f, t, a)

Definition at line 265 of file back-bdb.h.

#define LOCK_GET (   env,
)    lock_get(env, i, f, o, m, l)

Definition at line 266 of file back-bdb.h.

#define LOCK_PUT (   env,
)    lock_put(env, l)

Definition at line 267 of file back-bdb.h.

Definition at line 63 of file back-bdb.h.

#define TXN_ABORT (   txn)    txn_abort((txn))

Definition at line 272 of file back-bdb.h.

#define TXN_BEGIN (   env,
)    txn_begin((env), p, t, f)

Definition at line 269 of file back-bdb.h.

#define TXN_CHECKPOINT (   env,
)    txn_checkpoint(env, k, m, f)

Definition at line 268 of file back-bdb.h.

#define TXN_COMMIT (   txn,
)    txn_commit((txn), (f))

Definition at line 271 of file back-bdb.h.

#define TXN_ID (   txn)    txn_id(txn)

Definition at line 273 of file back-bdb.h.

#define TXN_PREPARE (   txn,
)    txn_prepare((txn), (gid))

Definition at line 270 of file back-bdb.h.

#define XLOCK_ID (   env,
)    lock_id(env, locker)

Definition at line 274 of file back-bdb.h.

#define XLOCK_ID_FREE (   env,
)    lock_id_free(env, locker)

Definition at line 275 of file back-bdb.h.

Typedef Documentation

typedef struct AttrList AttrList
typedef struct bdb_monitor_t bdb_monitor_t
typedef struct bdb_cache Cache
typedef struct bdb_entry_info EntryInfo
typedef struct IndexRec IndexRec