IDZEBRA
2.2.7
|
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <yaz/log.h>
#include <yaz/snprintf.h>
#include <yaz/xmalloc.h>
#include "isamc-p.h"
Go to the source code of this file.
Macros | |
#define | ISAMC_FREELIST_CHUNK 0 |
#define | SMALL_TEST 0 |
Functions | |
static void | flush_block (ISAMC is, int cat) |
static void | release_fc (ISAMC is, int cat) |
static void | init_fc (ISAMC is, int cat) |
void | isamc_getmethod (ISAMC_M *m) |
ISAMC | isamc_open (BFiles bfs, const char *name, int writeflag, ISAMC_M *method) |
zint | isamc_block_used (ISAMC is, int type) |
int | isamc_block_size (ISAMC is, int type) |
int | isamc_close (ISAMC is) |
int | isamc_read_block (ISAMC is, int cat, zint pos, char *dst) |
int | isamc_write_block (ISAMC is, int cat, zint pos, char *src) |
int | isamc_write_dblock (ISAMC is, int cat, zint pos, char *src, zint nextpos, int offset) |
static zint | alloc_block (ISAMC is, int cat) |
static void | release_block (ISAMC is, int cat, zint pos) |
zint | isamc_alloc_block (ISAMC is, int cat) |
void | isamc_release_block (ISAMC is, int cat, zint pos) |
void | isamc_pp_close (ISAMC_PP pp) |
ISAMC_PP | isamc_pp_open (ISAMC is, ISAM_P ipos) |
int | isamc_pp_read (ISAMC_PP pp, void *buf) |
int | isamc_read_item (ISAMC_PP pp, char **dst) |
zint | isamc_pp_num (ISAMC_PP pp) |
Definition at line 365 of file isamc.c.
References ISAMC_file_s::bf, bf_read(), ISAMC_s::files, ISAMC_head::freelist, ISAMC_file_s::head, ISAMC_file_s::head_is_dirty, ISAMC_head::lastblock, and ISAMC_file_s::no_allocated.
Referenced by isamc_alloc_block().
|
static |
Definition at line 361 of file isamc.c.
Referenced by isamc_close().
|
static |
Definition at line 434 of file isamc.c.
References ISAMC_file_s::fc_list, ISAMC_file_s::fc_max, and ISAMC_s::files.
Referenced by isamc_open().
Definition at line 394 of file isamc.c.
References alloc_block(), ISAMC_M_s::debug, ISAMC_file_s::fc_list, ISAMC_file_s::fc_max, ISAMC_s::files, ISAMC_s::method, and ZINT_FORMAT.
Referenced by flush_blocks().
int isamc_block_size | ( | ISAMC | is, |
int | type | ||
) |
Definition at line 179 of file isamc.c.
References ISAMC_filecat_s::bsize, ISAMC_M_s::filecat, ISAMC_s::method, and ISAMC_s::no_files.
Referenced by zebra_register_statistics().
Definition at line 172 of file isamc.c.
References ISAMC_s::files, ISAMC_file_s::head, ISAMC_head::lastblock, and ISAMC_s::no_files.
Referenced by zebra_register_statistics().
int isamc_close | ( | ISAMC | is | ) |
Definition at line 187 of file isamc.c.
References ISAMC_file_s::alloc_buf, ISAMC_file_s::bf, bf_close(), bf_write(), ISAMC_M_s::debug, ISAMC_file_s::fc_list, ISAMC_s::files, flush_block(), ISAMC_file_s::head, ISAMC_file_s::head_is_dirty, ISAMC_s::merge_buf, ISAMC_s::method, ISAMC_file_s::no_allocated, ISAMC_file_s::no_backward, ISAMC_s::no_files, ISAMC_file_s::no_forward, ISAMC_file_s::no_next, ISAMC_file_s::no_prev, ISAMC_file_s::no_reads, ISAMC_file_s::no_released, ISAMC_file_s::no_remap, ISAMC_file_s::no_skip_writes, ISAMC_file_s::no_writes, release_fc(), ISAMC_file_s::sum_backward, and ISAMC_file_s::sum_forward.
Referenced by isamc_open(), and zebra_register_close().
void isamc_getmethod | ( | ISAMC_M * | m | ) |
Definition at line 45 of file isamc.c.
References ISAMC_M_s::codec, ISAMC_M_s::compare_item, ISAMC_M_s::debug, ISAM_CODEC::decode, ISAM_CODEC::encode, ISAMC_M_s::filecat, ISAMC_M_s::log_item, ISAMC_M_s::max_blocks_mem, ISAM_CODEC::reset, ISAM_CODEC::start, and ISAM_CODEC::stop.
Referenced by key_isamc_m().
Definition at line 77 of file isamc.c.
References ISAMC_file_s::alloc_buf, ISAMC_file_s::alloc_entries_max, ISAMC_file_s::alloc_entries_num, ISAMC_file_s::bf, bf_open(), bf_read(), ISAMC_filecat_s::bsize, ISAMC_M_s::debug, ISAMC_M_s::filecat, FILENAME_MAX, ISAMC_s::files, ISAMC_head::freelist, ISAMC_file_s::head, ISAMC_file_s::head_is_dirty, ISAMC_filecat_s::ifill, init_fc(), isamc_close(), ISAMC_head::lastblock, ISAMC_M_s::max_blocks_mem, ISAMC_s::max_cat, ISAMC_filecat_s::mblocks, ISAMC_s::merge_buf, ISAMC_s::method, ISAMC_filecat_s::mfill, ISAMC_file_s::no_allocated, ISAMC_file_s::no_backward, ISAMC_s::no_files, ISAMC_file_s::no_forward, ISAMC_file_s::no_next, ISAMC_file_s::no_prev, ISAMC_file_s::no_reads, ISAMC_file_s::no_released, ISAMC_file_s::no_remap, ISAMC_file_s::no_skip_writes, ISAMC_file_s::no_writes, ISAMC_file_s::sum_backward, and ISAMC_file_s::sum_forward.
Referenced by zebra_register_open().
void isamc_pp_close | ( | ISAMC_PP | pp | ) |
Definition at line 458 of file isamc.c.
References ISAMC_PP_s::buf, ISAMC_M_s::codec, ISAMC_PP_s::decodeClientData, ISAMC_PP_s::is, ISAMC_s::method, and ISAM_CODEC::stop.
Referenced by inv_stat_handle(), isamc_merge(), r_close(), and rset_trunc_r().
Definition at line 587 of file isamc.c.
References ISAMC_PP_s::numKeys.
Referenced by inv_stat_handle(), and isamc_merge().
Definition at line 467 of file isamc.c.
References ISAMC_filecat_s::bsize, ISAMC_PP_s::buf, ISAMC_PP_s::cat, ISAMC_M_s::codec, ISAMC_M_s::debug, ISAMC_PP_s::decodeClientData, ISAMC_PP_s::deleteFlag, ISAMC_M_s::filecat, ISAMC_PP_s::is, isamc_block, ISAMC_BLOCK_OFFSET_1, isamc_read_block(), isamc_type, ISAMC_s::method, ISAMC_PP_s::next, ISAMC_PP_s::numKeys, ISAMC_PP_s::offset, ISAMC_PP_s::pos, ISAMC_PP_s::size, ISAM_CODEC::start, and ZINT_FORMAT.
Referenced by inv_stat_handle(), isamc_merge(), and rset_trunc_r().
int isamc_pp_read | ( | ISAMC_PP | pp, |
void * | buf | ||
) |
Definition at line 511 of file isamc.c.
References isamc_read_item().
Referenced by inv_stat_handle(), r_read(), and rset_trunc_r().
Definition at line 238 of file isamc.c.
References ISAMC_file_s::bf, bf_read(), ISAMC_s::files, and ISAMC_file_s::no_reads.
Referenced by isamc_pp_open(), and isamc_read_item().
int isamc_read_item | ( | ISAMC_PP | pp, |
char ** | dst | ||
) |
Definition at line 522 of file isamc.c.
References ISAMC_PP_s::buf, ISAMC_PP_s::cat, ISAMC_M_s::codec, ISAMC_M_s::debug, ISAM_CODEC::decode, ISAMC_PP_s::decodeClientData, ISAMC_PP_s::deleteFlag, ISAMC_s::files, ISAMC_PP_s::is, ISAMC_BLOCK_OFFSET_N, isamc_read_block(), isamc_release_block(), ISAMC_s::method, ISAMC_PP_s::next, ISAMC_file_s::no_backward, ISAMC_file_s::no_forward, ISAMC_file_s::no_next, ISAMC_file_s::no_prev, ISAMC_PP_s::offset, ISAMC_PP_s::pos, ISAMC_PP_s::size, ISAMC_file_s::sum_backward, ISAMC_file_s::sum_forward, and ZINT_FORMAT.
Referenced by isamc_merge(), and isamc_pp_read().
Definition at line 417 of file isamc.c.
References ISAMC_M_s::debug, ISAMC_file_s::fc_list, ISAMC_file_s::fc_max, ISAMC_s::files, ISAMC_s::method, release_block(), and ZINT_FORMAT.
Referenced by isamc_merge(), and isamc_read_item().
Definition at line 244 of file isamc.c.
References ISAMC_file_s::bf, bf_write(), ISAMC_M_s::debug, ISAMC_s::files, ISAMC_s::method, ISAMC_file_s::no_writes, and ZINT_FORMAT.
Referenced by flush_blocks(), and isamc_write_dblock().
Definition at line 252 of file isamc.c.
References ISAMC_M_s::debug, ISAMC_BLOCK_OFFSET_N, isamc_write_block(), ISAMC_s::method, and ZINT_FORMAT.
Definition at line 382 of file isamc.c.
References ISAMC_file_s::bf, bf_write(), ISAMC_s::files, ISAMC_head::freelist, ISAMC_file_s::head, ISAMC_file_s::head_is_dirty, and ISAMC_file_s::no_released.
Referenced by isamc_release_block(), and release_fc().
|
static |
Definition at line 445 of file isamc.c.
References ISAMC_file_s::fc_list, ISAMC_file_s::fc_max, ISAMC_s::files, and release_block().
Referenced by isamc_close().