Motr  M0
extmap.c File Reference
#include "lib/trace.h"
#include "be/extmap.h"
#include "lib/vec.h"
#include "lib/errno.h"
#include "lib/arith.h"
#include "lib/misc.h"
#include "lib/finject.h"
#include "lib/memory.h"
#include "lib/cksum_utils.h"
#include "lib/cksum.h"
#include "format/format.h"
Include dependency graph for extmap.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_EXTMAP
 
#define MAX_DUS   8
 

Functions

static int be_emap_cmp (const void *key0, const void *key1)
 
static m0_bcount_t be_emap_ksize (const void *k)
 
static m0_bcount_t be_emap_vsize (const void *d)
 
static int emap_it_pack (struct m0_be_emap_cursor *it, void(*btree_func)(struct m0_be_btree *btree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, const struct m0_buf *val), struct m0_be_tx *tx)
 
static bool emap_it_prefix_ok (const struct m0_be_emap_cursor *it)
 
static int emap_it_open (struct m0_be_emap_cursor *it)
 
static void emap_it_init (struct m0_be_emap_cursor *it, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap *map)
 
static void be_emap_close (struct m0_be_emap_cursor *it)
 
static int emap_it_get (struct m0_be_emap_cursor *it)
 
static int be_emap_lookup (struct m0_be_emap *map, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it)
 
static int be_emap_next (struct m0_be_emap_cursor *it)
 
static int be_emap_prev (struct m0_be_emap_cursor *it)
 
static bool be_emap_invariant (struct m0_be_emap_cursor *it)
 
static int emap_extent_update (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, const struct m0_be_emap_seg *es)
 
static int be_emap_split (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, struct m0_indexvec *vec, m0_bindex_t scan, struct m0_buf *cksum)
 
static bool be_emap_caret_invariant (const struct m0_be_emap_caret *car)
 
static struct m0_rwlockemap_rwlock (struct m0_be_emap *emap)
 
static void emap_dump (struct m0_be_emap_cursor *it)
 
static void emap_key_init (struct m0_be_emap_key *key)
 
static void emap_rec_init (struct m0_be_emap_rec *rec)
 
M0_INTERNAL int m0_be_emap_dump (struct m0_be_emap *map)
 
static void delete_wrapper (struct m0_be_btree *btree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, const struct m0_buf *val)
 
M0_INTERNAL void m0_be_emap_init (struct m0_be_emap *map, struct m0_be_seg *db)
 
M0_INTERNAL void m0_be_emap_fini (struct m0_be_emap *map)
 
M0_INTERNAL void m0_be_emap_create (struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_fid *fid)
 
M0_INTERNAL void m0_be_emap_destroy (struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op)
 
M0_INTERNAL struct m0_be_emap_segm0_be_emap_seg_get (struct m0_be_emap_cursor *it)
 
M0_INTERNAL bool m0_be_emap_ext_is_last (const struct m0_ext *ext)
 
M0_INTERNAL bool m0_be_emap_ext_is_first (const struct m0_ext *ext)
 
M0_INTERNAL struct m0_be_opm0_be_emap_op (struct m0_be_emap_cursor *it)
 
M0_INTERNAL int m0_be_emap_op_rc (const struct m0_be_emap_cursor *it)
 
M0_INTERNAL struct m0_be_domainm0_be_emap_seg_domain (const struct m0_be_emap *map)
 
M0_INTERNAL void m0_be_emap_lookup (struct m0_be_emap *map, const struct m0_uint128 *prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it)
 
M0_INTERNAL void m0_be_emap_close (struct m0_be_emap_cursor *it)
 
static bool be_emap_changed (struct m0_be_emap_cursor *it, m0_bindex_t off)
 
M0_INTERNAL void m0_be_emap_next (struct m0_be_emap_cursor *it)
 
M0_INTERNAL void m0_be_emap_prev (struct m0_be_emap_cursor *it)
 
M0_INTERNAL void m0_be_emap_extent_update (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, const struct m0_be_emap_seg *es)
 
static int update_next_segment (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, m0_bindex_t delta, bool get_next)
 
M0_INTERNAL void m0_be_emap_merge (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, m0_bindex_t delta)
 
M0_INTERNAL void m0_be_emap_split (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, struct m0_indexvec *vec, struct m0_buf *cksum)
 
M0_INTERNAL void m0_be_emap_paste (struct m0_be_emap_cursor *it, struct m0_be_tx *tx, struct m0_ext *ext, uint64_t val, void(*del)(struct m0_be_emap_seg *), void(*cut_left)(struct m0_be_emap_seg *, struct m0_ext *, uint64_t), void(*cut_right)(struct m0_be_emap_seg *, struct m0_ext *, uint64_t))
 
M0_INTERNAL int m0_be_emap_count (struct m0_be_emap_cursor *it, m0_bcount_t *segs)
 
M0_INTERNAL void m0_be_emap_obj_insert (struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_uint128 *prefix, uint64_t val)
 
M0_INTERNAL void m0_be_emap_obj_delete (struct m0_be_emap *map, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_uint128 *prefix)
 
M0_INTERNAL void m0_be_emap_caret_init (struct m0_be_emap_caret *car, struct m0_be_emap_cursor *it, m0_bindex_t index)
 
M0_INTERNAL void m0_be_emap_caret_fini (struct m0_be_emap_caret *car)
 
M0_INTERNAL m0_bcount_t m0_be_emap_caret_step (const struct m0_be_emap_caret *car)
 
M0_INTERNAL int m0_be_emap_caret_move (struct m0_be_emap_caret *car, m0_bcount_t count)
 
M0_INTERNAL int m0_be_emap_caret_move_sync (struct m0_be_emap_caret *car, m0_bcount_t count)
 
M0_INTERNAL void m0_be_emap_credit (struct m0_be_emap *map, enum m0_be_emap_optype optype, m0_bcount_t nr, struct m0_be_tx_credit *accum)
 
static bool be_emap_invariant_check (struct m0_be_emap_cursor *it)
 

Variables

static const struct m0_be_btree_kv_ops be_emap_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_EXTMAP

Definition at line 23 of file extmap.c.

◆ MAX_DUS

#define MAX_DUS   8

Definition at line 38 of file extmap.c.