Home | History | Annotate | Download | only in ext2fs

Lines Matching defs:tdb_context

216 	int (*tdb_read)(struct tdb_context *, tdb_off_t , void *, tdb_len_t , int );
217 int (*tdb_write)(struct tdb_context *, tdb_off_t, const void *, tdb_len_t);
218 void (*next_hash_chain)(struct tdb_context *, u32 *);
219 int (*tdb_oob)(struct tdb_context *, tdb_off_t , int );
220 int (*tdb_expand_file)(struct tdb_context *, tdb_off_t , tdb_off_t );
221 int (*tdb_brlock)(struct tdb_context *, tdb_off_t , int, int, int, size_t);
224 struct tdb_context {
238 struct tdb_context *next; /* all tdbs to avoid multiple opens */
256 static int tdb_munmap(struct tdb_context *tdb);
257 static void tdb_mmap(struct tdb_context *tdb);
258 static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
259 static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
260 static int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
261 static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
262 static int tdb_transaction_unlock(struct tdb_context *tdb);
263 static int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
264 static int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
265 static int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
266 static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
267 static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
269 static int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
270 static tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec);
271 static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
272 static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d);
273 static int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off);
274 static int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off);
275 static int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
276 static int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec);
277 static int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec);
278 static unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len);
279 static int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
284 static tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
286 static void tdb_io_init(struct tdb_context *tdb);
287 static int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
288 static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
294 enum TDB_ERROR tdb_error(struct tdb_context *tdb)
313 const char *tdb_errorstr(struct tdb_context *tdb)
334 int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset,
381 int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len)
403 static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
476 int tdb_lock(struct tdb_context *tdb, int list, int ltype)
488 int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
497 int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
584 int tdb_transaction_lock(struct tdb_context *tdb, int ltype)
602 int tdb_transaction_unlock(struct tdb_context *tdb)
619 static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op)
662 static int _tdb_unlockall(struct tdb_context *tdb, int ltype)
696 int tdb_lockall(struct tdb_context *tdb)
702 int tdb_lockall_mark(struct tdb_context *tdb)
708 int tdb_lockall_unmark(struct tdb_context *tdb)
714 int tdb_lockall_nonblock(struct tdb_context *tdb)
720 int tdb_unlockall(struct tdb_context *tdb)
726 int tdb_lockall_read(struct tdb_context *tdb)
732 int tdb_lockall_read_nonblock(struct tdb_context *tdb)
738 int tdb_unlockall_read(struct tdb_context *tdb)
745 int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key)
753 int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key)
759 int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key)
765 int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key)
770 int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key)
775 int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key)
780 int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key)
788 int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off)
798 int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off)
811 int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off)
817 int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off)
837 static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, int probe)
875 static int tdb_write(struct tdb_context *tdb, tdb_off_t off,
913 static int tdb_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
946 static void tdb_next_hash_chain(struct tdb_context *tdb, u32 *chain)
967 int tdb_munmap(struct tdb_context *tdb)
983 void tdb_mmap(struct tdb_context *tdb)
1013 static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t addition)
1052 int tdb_expand(struct tdb_context *tdb, tdb_off_t size)
1122 int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d)
1127 int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d)
1135 unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len)
1160 int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key,
1193 int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
1206 int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
1224 void tdb_io_init(struct tdb_context *tdb)
1337 static int transaction_read(struct tdb_context *tdb, tdb_off_t off, void *buf,
1398 static int transaction_write(struct tdb_context *tdb, tdb_off_t off,
1522 static void transaction_next_hash_chain(struct tdb_context *tdb, u32 *chain)
1537 static int transaction_oob(struct tdb_context *tdb, tdb_off_t len, int probe)
1548 static int transaction_expand_file(struct tdb_context *tdb, tdb_off_t size,
1563 static int transaction_brlock(struct tdb_context *tdb, tdb_off_t offset,
1581 transaction is allowed to be pending per tdb_context
1583 int tdb_transaction_start(struct tdb_context *tdb)
1690 int tdb_transaction_cancel(struct tdb_context *tdb)
1745 static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t length)
1771 tdb_context *tdb)
1791 static int tdb_recovery_allocate(struct tdb_context *tdb,
1872 static int transaction_setup_recovery(struct tdb_context *tdb,
1981 int tdb_transaction_commit(struct tdb_context *tdb)
2134 int tdb_transaction_recover(struct tdb_context *tdb)
2259 static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
2289 static int remove_from_freelist(struct tdb_context *tdb, tdb_off_t off, tdb_off_t next)
2309 static int update_tailer(struct tdb_context *tdb, tdb_off_t offset,
2322 int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec)
2424 static tdb_off_t tdb_allocate_ofs(struct tdb_context *tdb, tdb_len_t length, tdb_off_t rec_ptr,
2485 tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec)
2569 static int seen_insert(struct tdb_context *mem_tdb, tdb_off_t rec_ptr)
2579 int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries)
2581 struct tdb_context *mem_tdb = NULL;
2645 static int tdb_next_lock(struct tdb_context *tdb, struct tdb_traverse_lock *tlock,
2752 static int tdb_traverse_internal(struct tdb_context *tdb,
2816 int tdb_traverse_read(struct tdb_context *tdb,
2841 int tdb_traverse(struct tdb_context *tdb,
2864 TDB_DATA tdb_firstkey(struct tdb_context *tdb)
2889 TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA oldkey)
2950 static tdb_off_t tdb_dump_record(struct tdb_context *tdb, int hash,
2981 static int tdb_dump_chain(struct tdb_context *tdb, int i)
3003 void tdb_dump_all(struct tdb_context *tdb)
3013 int tdb_printfreelist(struct tdb_context *tdb)
3066 void tdb_increment_seqnum_nonblock(struct tdb_context *tdb)
3086 static void tdb_increment_seqnum(struct tdb_context *tdb)
3108 static tdb_off_t tdb_find(struct tdb_context *tdb, TDB_DATA key, u32 hash,
3135 tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype,
3152 static int tdb_update_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, TDB_DATA dbuf)
3186 TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key)
3221 int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
3252 static int tdb_exists_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash)
3262 int tdb_exists(struct tdb_context *tdb, TDB_DATA key)
3269 int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct*rec)
3303 static int tdb_count_dead(struct tdb_context *tdb, u32 hash)
3328 static int tdb_purge_dead(struct tdb_context *tdb, u32 hash)
3364 static int tdb_delete_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash)
3416 int tdb_delete(struct tdb_context *tdb, TDB_DATA key)
3425 static tdb_off_t tdb_find_dead(struct tdb_context *tdb, u32 hash,
3456 int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
3595 int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf)
3640 const char *tdb_name(struct tdb_context *tdb)
3650 int tdb_fd(struct tdb_context *tdb)
3659 tdb_log_func tdb_log_fn(struct tdb_context *tdb)
3675 int tdb_get_seqnum(struct tdb_context *tdb)
3683 int tdb_hash_size(struct tdb_context *tdb)
3688 size_t tdb_map_size(struct tdb_context *tdb)
3693 int tdb_get_flags(struct tdb_context *tdb)
3702 void tdb_enable_seqnum(struct tdb_context *tdb)
3710 static struct tdb_context *tdbs = NULL;
3728 static int tdb_new_database(struct tdb_context *tdb, int hash_size)
3776 struct tdb_context *i;
3797 struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
3804 static void null_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
3805 static void null_log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...)
3810 struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
3815 struct tdb_context *tdb;
3821 if (!(tdb = (struct tdb_context *)calloc(1, sizeof *tdb))) {
4007 void tdb_set_max_dead(struct tdb_context *tdb, int max_dead)
4017 int tdb_close(struct tdb_context *tdb)
4019 struct tdb_context **i;
4052 void tdb_set_logging_function(struct tdb_context *tdb,
4058 void *tdb_get_logging_private(struct tdb_context *tdb)
4065 int tdb_reopen(struct tdb_context *tdb)
4119 struct tdb_context *tdb;