+
+/* BDB backend specific entry info */
+typedef struct bdb_entry_info {
+ struct bdb_entry_info *bei_parent;
+ ID bei_id;
+
+ /* we use the bei_id as a lockobj, but we need to make the size != 4
+ * to avoid conflicting with BDB's internal locks. So add a byte here
+ * that is always zero.
+ */
+ char bei_lockpad;
+
+ short bei_state;
+#define CACHE_ENTRY_DELETED 1
+#define CACHE_ENTRY_NO_KIDS 2
+#define CACHE_ENTRY_NOT_LINKED 4
+#define CACHE_ENTRY_NO_GRANDKIDS 8
+#define CACHE_ENTRY_LOADING 0x10
+#define CACHE_ENTRY_WALKING 0x20
+#define CACHE_ENTRY_ONELEVEL 0x40
+#define CACHE_ENTRY_REFERENCED 0x80
+ int bei_finders;
+
+ /*
+ * remaining fields require backend cache lock to access
+ */
+ struct berval bei_nrdn;
+#ifdef BDB_HIER
+ struct berval bei_rdn;
+ int bei_modrdns; /* track renames */
+ int bei_ckids; /* number of kids cached */
+ int bei_dkids; /* number of kids on-disk, plus 1 */
+#endif
+ Entry *bei_e;
+ Avlnode *bei_kids;
+#ifdef SLAP_ZONE_ALLOC
+ struct bdb_info *bei_bdb;
+ int bei_zseq;