Motr
M0
|
Macros | |
#define | M0_BE_ALLOC_ARR(arr, nr, seg, tx, op) |
#define | M0_BE_ALLOC_PTR(ptr, seg, tx, op) M0_BE_ALLOC_ARR((ptr), 1, (seg), (tx), (op)) |
#define | M0_BE_ALLOC_ARR_SYNC(arr, nr, seg, tx) |
#define | M0_BE_ALLOC_PTR_SYNC(ptr, seg, tx) M0_BE_OP_SYNC(__op, M0_BE_ALLOC_PTR((ptr), (seg), (tx), &__op)) |
#define | M0_BE_FREE_PTR(ptr, seg, tx, op) m0_be_free(m0_be_seg_allocator(seg), (tx), (op), (ptr)) |
#define | M0_BE_FREE_PTR_SYNC(ptr, seg, tx) M0_BE_OP_SYNC(__op, M0_BE_FREE_PTR((ptr), (seg), (tx), &__op)) |
#define | M0_BE_ALLOC_BUF(buf, seg, tx, op) |
#define | M0_BE_ALLOC_BUF_SYNC(buf, seg, tx) M0_BE_OP_SYNC(__op, M0_BE_ALLOC_BUF((buf), (seg), (tx), &__op)) |
#define | M0_BE_ALLOC_CREDIT_PTR(ptr, seg, accum) |
#define | M0_BE_FREE_CREDIT_PTR(ptr, seg, accum) |
#define | M0_BE_ALLOC_CREDIT_ARR(arr, nr, seg, accum) |
#define | M0_BE_FREE_CREDIT_ARR(arr, nr, seg, accum) |
#define | M0_BE_ALLOC_CREDIT_BUF(buf, seg, accum) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BTREE |
#define | BE_DOMAIN_LEVEL(level) |
#define | M0_BE_FMT_DEFINE_INIT_SIMPLE(name) |
#define | M0_BE_FMT_DEFINE_XCODE(name) |
#define | BFLH_F |
#define | BFLH_P(log_hdr) |
#define | BFLRH_F |
#define | BFLRH_P(h) |
#define | M0_BE_FMT_DECODE_CFG_DEFAULT |
#define | M0_BE_FMT_DECODE_CFG_DEFAULT_WITH_TRACE |
#define | M0_BE_FMT_DECLARE(name) |
#define | M0_BE_FMT_REG(size, addr, buf) |
#define | M0_BE_FMT_TX(payload, id) |
#define | M0_BE_IO_CREDIT(reg_nr, reg_size, part_nr) |
#define | BE_IOCRED_F |
#define | BE_IOCRED_P(iocred) (iocred)->bic_reg_nr, (iocred)->bic_reg_size, (iocred)->bic_part_nr |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_BE_LIST_DESCR(name, amb_type, link_field, magic_field, link_magic, head_magic) |
#define | M0_BE_LIST_DESCR_DEFINE(name, hname, scope, amb_type, link_field, magic_field, link_magic, head_magic) |
#define | M0_BE_LIST_DECLARE(name, scope, amb_type) |
#define | M0_BE_LIST_DEFINE(name, scope, amb_type) |
#define | m0_be_list_for(name, head, obj) |
#define | m0_be_list_endfor ;(void)__bl; } while (0) |
#define | m0_be_list_forall(name, var, head, ...) |
#define | BL_F |
#define | BL_P(log) (log)->lg_current, (log)->lg_discarded, (log)->lg_free |
#define | BLR_F |
#define | BLR_P(record) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_BE_OP_SYNC(op_obj, action) |
#define | M0_BE_OP_SYNC_RC(op_obj, action) |
#define | M0_BE_OP_SYNC_WITH(op, action) |
#define | M0_BE_OP_SYNC_WITH_RC(op, action) |
#define | M0_BE_OP_SYNC_RET(op_obj, action, member) |
#define | M0_BE_OP_SYNC_RET_WITH(op, action, member) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_BE_POOL_DESCR(hname, amb_type, pool_field, pool_magic_field, pool_magic) |
#define | M0_BE_POOL_DESCR_DEFINE(name, hname, scope, amb_type, pool_field, pool_magic_field, pool_magic) |
#define | M0_BE_POOL_DEFINE(name, scope, amb_type) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | BE_QUEUE_ITEM2BUF(bq, bqi) M0_BUF_INIT((bq)->bq_cfg.bqc_item_length, &(bqi)->bqi_data) |
#define | BEQ_F |
#define | BEQ_P(bq) |
#define | M0_BE_QUEUE_PUT(bq, op, ptr) m0_be_queue_put(bq, op, &M0_BUF_INIT_PTR(ptr)) |
#define | M0_BE_QUEUE_GET(bq, op, ptr, successful) m0_be_queue_get(bq, op, &M0_BUF_INIT_PTR(ptr), successful) |
#define | M0_BE_QUEUE_PEEK(bq, ptr) m0_be_queue_peek(bq, &M0_BUF_INIT_PTR(ptr)) |
#define | M0_BE_SEG_PG_PRESENT 0x8000000000000000ULL |
#define | M0_BE_SEG_PG_PIN_CNT_MASK (~M0_BE_SEG_PG_PRESENT) |
#define | M0_BE_SEG_GEOM0 |
#define | M0_BE_REG(seg, size, addr) |
#define | M0_BE_REG_PTR(seg, ptr) M0_BE_REG((seg), sizeof *(ptr), (ptr)) |
#define | M0_BE_REG_SEG(seg) M0_BE_REG((seg), (seg)->bs_size, (seg)->bs_addr) |
#define | _FILE_OFFSET_BITS 64 /* for fseeko */ |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | _FT(name) M0_FORMAT_TYPE_ ## name |
#define | _TAG(name) M0_ ## name ## _FORMAT_VERSION , _FT(name) |
#define | _T(name, str, field, ops) |
#define | _B(t, proc) [t] = { .b_type = (t), .b_proc = (proc) } |
#define | FLOG(level, rc, s) |
#define | RLOG(level, prefix, s, r, tag) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | BE_TX_LOCKED_AT_STATE(tx, states) |
#define | M0_BE_CREDIT_INC(n, cr_user, credit) |
#define | M0_BE_CREDIT_DEC(cr_user, tx) |
#define | M0_BE_TX_CAPTURE_PTR(seg, tx, ptr) m0_be_tx_capture((tx), &M0_BE_REG((seg), sizeof *(ptr), (ptr))) |
#define | M0_BE_TX_CAPTURE_ARR(seg, tx, arr, nr) m0_be_tx_capture((tx), &M0_BE_REG((seg), (nr) * sizeof((arr)[0]), (arr))) |
#define | M0_BE_TX_CAPTURE_BUF(seg, tx, buf) m0_be_tx_capture((tx), &M0_BE_REG((seg), (buf)->b_nob, (buf)->b_addr)) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | BTBI_F |
#define | BTBI_P(btbi) |
#define | M0_DEBUG_BE_CREDITS (1) |
#define | M0_BE_TX_CREDIT(nr, size) (struct m0_be_tx_credit){ .tc_reg_nr = (nr), .tc_reg_size = (size) } |
#define | M0_BE_TX_CREDIT_TYPE(type) M0_BE_TX_CREDIT(1, sizeof(type)) |
#define | M0_BE_TX_CREDIT_PTR(ptr) M0_BE_TX_CREDIT(1, sizeof *(ptr)) |
#define | M0_BE_TX_CREDIT_BUF(buf) M0_BE_TX_CREDIT(1, (buf)->b_nob) |
#define | BETXCR_F "(%lu,%lu)" |
#define | BETXCR_P(c) |
#define | M0_BE_TX_GROUP_TX_FORALL(gr, tx) m0_tl_for(grp, &(gr)->tg_txs, (tx)) |
#define | M0_BE_TX_GROUP_TX_ENDFOR m0_tl_endfor |
#define | gft_fmt_group_choose(gft) |
#define | REGD_EXT(rd) |
#define | ARRAY_ALLOC_NZ(arr, nr) ((arr) = m0_alloc_nz((nr) * sizeof ((arr)[0]))) |
#define | M0_BE_REG_D(reg, buf) |
#define | M0_BE_REG_D_CREDIT(rd) M0_BE_TX_CREDIT(1, (rd)->rd_reg.br_size) |
#define | M0_BE_REG_AREA_FORALL(ra, rd) |
#define | CFG(tx_nr_max, reg_nr_max, payload_sz_max, ra_sz_max) |
#define | REG(size, addr, buf) |
#define | TX(p_addr, p_nob, id) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
#define | BE_UT_QUEUE_TEST(q_size_max, producers, consumers, items_nr) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
#define | TX_PAYLOAD_TEST(credit, fill, capture, offset) |
#define | M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
Typedefs | |
typedef void(* | m0_be_log_got_space_cb_t) (struct m0_be_log *log) |
typedef void(* | m0_be_log_record_cb_t) (struct m0_be_log_record *record) |
typedef void(* | m0_be_log_full_cb_t) (struct m0_be_log *log) |
typedef void(* | m0_be_op_cb_t) (struct m0_be_op *op, void *param) |
typedef void(* | m0_be_tx_cb_t) (const struct m0_be_tx *tx) |
typedef void(* | m0_be_group_format_reg_area_rebuild_t) (struct m0_be_reg_area *ra, struct m0_be_reg_area *ra_new, void *param) |
Functions | |
struct m0_be_allocator_call_stat | M0_XCA_DOMAIN (be) |
M0_INTERNAL int | m0_be_allocator_init (struct m0_be_allocator *a, struct m0_be_seg *seg) |
M0_INTERNAL void | m0_be_allocator_fini (struct m0_be_allocator *a) |
M0_INTERNAL bool | m0_be_allocator__invariant (struct m0_be_allocator *a) |
M0_INTERNAL int | m0_be_allocator_create (struct m0_be_allocator *a, struct m0_be_tx *tx, uint32_t *zone_percent, uint32_t zones_nr) |
M0_INTERNAL void | m0_be_allocator_destroy (struct m0_be_allocator *a, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_allocator_credit (struct m0_be_allocator *a, enum m0_be_allocator_op optype, m0_bcount_t size, unsigned shift, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_alloc_aligned (struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void **ptr, m0_bcount_t size, unsigned shift, uint64_t zonemask) |
M0_INTERNAL void | m0_be_alloc (struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void **ptr, m0_bcount_t size) |
M0_INTERNAL void | m0_be_free_aligned (struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void *ptr) |
M0_INTERNAL void | m0_be_free (struct m0_be_allocator *a, struct m0_be_tx *tx, struct m0_be_op *op, void *ptr) |
M0_INTERNAL void | m0_be_alloc_stats (struct m0_be_allocator *a, struct m0_be_allocator_stats *out) |
M0_INTERNAL void | m0_be_alloc_stats_credit (struct m0_be_allocator *a, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_alloc_stats_capture (struct m0_be_allocator *a, struct m0_be_tx *tx) |
M0_BASSERT (sizeof(struct be_alloc_chunk) %(1UL<< M0_BE_ALLOC_SHIFT_MIN)==0) | |
M0_INTERNAL int | m0_backend_init (void) |
M0_INTERNAL void | m0_backend_fini (void) |
static struct m0_be_op__btree * | op_tree (struct m0_be_op *op) |
static struct m0_rwlock * | btree_rwlock (struct m0_be_btree *tree) |
static struct be_btree_key_val * | be_btree_search (struct m0_be_btree *btree, void *key) |
static void | btree_root_set (struct m0_be_btree *btree, struct m0_be_bnode *new_root) |
static void | btree_op_fill (struct m0_be_op *op, struct m0_be_btree *btree, struct m0_be_tx *tx, enum m0_be_btree_op optype, struct m0_be_btree_anchor *anchor) |
static struct m0_be_allocator * | tree_allocator (const struct m0_be_btree *btree) |
static void | mem_free (const struct m0_be_btree *btree, struct m0_be_tx *tx, void *ptr) |
static void | mem_update (const struct m0_be_btree *btree, struct m0_be_tx *tx, void *ptr, m0_bcount_t size) |
static void * | mem_alloc (const struct m0_be_btree *btree, struct m0_be_tx *tx, m0_bcount_t size, uint64_t zonemask) |
static void | btree_mem_alloc_credit (const struct m0_be_btree *btree, m0_bcount_t size, struct m0_be_tx_credit *accum) |
static void | btree_mem_free_credit (const struct m0_be_btree *btree, m0_bcount_t size, struct m0_be_tx_credit *accum) |
static m0_bcount_t | be_btree_ksize (const struct m0_be_btree *btree, const void *key) |
static m0_bcount_t | be_btree_vsize (const struct m0_be_btree *btree, const void *data) |
static int | be_btree_compare (const struct m0_be_btree *btree, const void *key0, const void *key1) |
static int | key_lt (const struct m0_be_btree *btree, const void *key0, const void *key1) |
static int | key_gt (const struct m0_be_btree *btree, const void *key0, const void *key1) |
static int | key_eq (const struct m0_be_btree *btree, const void *key0, const void *key1) |
static struct m0_be_bnode * | be_btree_node_alloc (const struct m0_be_btree *btree, struct m0_be_tx *tx) |
static void | btree_node_free (struct m0_be_bnode *node, const struct m0_be_btree *btree, struct m0_be_tx *tx) |
static void | btree_pair_release (struct m0_be_btree *btree, struct m0_be_tx *tx, struct be_btree_key_val *kv) |
static struct btree_node_pos | be_btree_get_btree_node (struct m0_be_btree_cursor *it, const void *key, bool slant) |
static void | be_btree_delete_key_from_node (struct m0_be_btree *tree, struct m0_be_tx *tx, struct btree_node_pos *node_pos) |
static void | be_btree_move_parent_key (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_bnode *node, enum position_t pos, unsigned int index) |
static void | be_btree_get_max_key_pos (struct m0_be_bnode *node, struct btree_node_pos *pos) |
static void | be_btree_get_min_key_pos (struct m0_be_bnode *node, struct btree_node_pos *pos) |
static int | iter_prepare (struct m0_be_bnode *node, bool print) |
static bool | btree_backlink_invariant (const struct m0_be_btree_backlink *h, const struct m0_be_seg *seg, const uint64_t *parent) |
static bool | btree_node_invariant (const struct m0_be_btree *btree, const struct m0_be_bnode *node, bool root) |
static bool | btree_node_subtree_invariant (const struct m0_be_btree *btree, const struct m0_be_bnode *node) |
static bool | btree_invariant (const struct m0_be_btree *btree) |
static void | btree_node_update (struct m0_be_bnode *node, const struct m0_be_btree *btree, struct m0_be_tx *tx) |
static void | btree_node_keyval_update (struct m0_be_bnode *node, const struct m0_be_btree *btree, struct m0_be_tx *tx, unsigned int index) |
static void | btree_create (struct m0_be_btree *btree, struct m0_be_tx *tx, const struct m0_fid *btree_fid) |
static void | be_btree_set_node_params (struct m0_be_bnode *p_node, unsigned int num_active_key, unsigned int level, bool isleaf) |
static void | be_btree_split_child (struct m0_be_btree *btree, struct m0_be_tx *tx, struct m0_be_bnode *parent, unsigned int index) |
static void | be_btree_insert_into_nonfull (struct m0_be_btree *btree, struct m0_be_tx *tx, struct m0_be_bnode *node, struct be_btree_key_val *kv) |
static void | be_btree_insert_newkey (struct m0_be_btree *btree, struct m0_be_tx *tx, struct be_btree_key_val *kv) |
static void | be_btree_shift_key_vals (struct m0_be_bnode *dest, struct m0_be_bnode *src, unsigned int start_index, unsigned int key_src_offset, unsigned int key_dest_offset, unsigned int child_src_offset, unsigned int child_dest_offset, unsigned int stop_index) |
static struct m0_be_bnode * | be_btree_merge_siblings (struct m0_be_tx *tx, struct m0_be_btree *tree, struct m0_be_bnode *parent, unsigned int idx) |
static void | be_btree_move_parent_key_to_right_child (struct m0_be_bnode *parent, struct m0_be_bnode *lch, struct m0_be_bnode *rch, unsigned int idx) |
static void | be_btree_move_parent_key_to_left_child (struct m0_be_bnode *parent, struct m0_be_bnode *lch, struct m0_be_bnode *rch, unsigned int idx) |
static void | btree_node_child_delete (struct m0_be_btree *btree, struct m0_be_tx *tx, struct m0_be_bnode *node, unsigned index, struct btree_node_pos *child, bool left) |
static int | be_btree_delete_key (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_bnode *bnode, void *key) |
static void | node_push (struct m0_be_btree_cursor *it, struct m0_be_bnode *node, int idx) |
static struct m0_be_bnode * | node_pop (struct m0_be_btree_cursor *it, int *idx) |
static void | be_btree_destroy (struct m0_be_btree *btree, struct m0_be_tx *tx) |
static void | btree_truncate (struct m0_be_btree *btree, struct m0_be_tx *tx, m0_bcount_t limit) |
static void * | be_btree_get_max_key (struct m0_be_btree *tree) |
static void * | be_btree_get_min_key (struct m0_be_btree *tree) |
static void | btree_save (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, const struct m0_buf *val, struct m0_be_btree_anchor *anchor, enum btree_save_optype optype, uint64_t zonemask) |
M0_INTERNAL void | m0_be_btree_init (struct m0_be_btree *tree, struct m0_be_seg *seg, const struct m0_be_btree_kv_ops *ops) |
M0_INTERNAL void | m0_be_btree_fini (struct m0_be_btree *tree) |
M0_INTERNAL void | m0_be_btree_create (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_fid *btree_fid) |
M0_INTERNAL void | m0_be_btree_destroy (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_btree_truncate (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, m0_bcount_t limit) |
static void | btree_node_alloc_credit (const struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
static void | btree_node_update_credit (struct m0_be_tx_credit *accum, m0_bcount_t nr) |
static void | btree_node_free_credit (const struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
static void | btree_credit (const struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
static void | btree_rebalance_credit (const struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
static void | kv_insert_credit (const struct m0_be_btree *tree, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
static void | kv_delete_credit (const struct m0_be_btree *tree, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
static void | btree_node_split_child_credit (const struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
static void | insert_credit (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum, bool use_current_height) |
static void | delete_credit (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_insert_credit (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_insert_credit2 (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_delete_credit (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_update_credit (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_update_credit2 (const struct m0_be_btree *tree, m0_bcount_t nr, m0_bcount_t ksize, m0_bcount_t vsize, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_create_credit (const struct m0_be_btree *tree, m0_bcount_t nr, struct m0_be_tx_credit *accum) |
static int | btree_count_items (struct m0_be_btree *tree, m0_bcount_t *ksize, m0_bcount_t *vsize) |
M0_INTERNAL void | m0_be_btree_destroy_credit (struct m0_be_btree *tree, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_btree_clear_credit (struct m0_be_btree *tree, struct m0_be_tx_credit *fixed_part, struct m0_be_tx_credit *single_record, m0_bcount_t *records_nr) |
static void | be_btree_insert (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, const struct m0_buf *val, struct m0_be_btree_anchor *anchor, uint64_t zonemask) |
M0_INTERNAL void | m0_be_btree_save (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, const struct m0_buf *val, bool overwrite) |
M0_INTERNAL void | m0_be_btree_insert (struct m0_be_btree *tree, 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_btree_update (struct m0_be_btree *tree, 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_btree_delete (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key) |
static void | be_btree_lookup (struct m0_be_btree *tree, struct m0_be_op *op, const struct m0_buf *key_in, struct m0_buf *key_out, struct m0_buf *value) |
M0_INTERNAL void | m0_be_btree_lookup (struct m0_be_btree *tree, struct m0_be_op *op, const struct m0_buf *key, struct m0_buf *value) |
M0_INTERNAL void | m0_be_btree_lookup_slant (struct m0_be_btree *tree, struct m0_be_op *op, struct m0_buf *key, struct m0_buf *value) |
M0_INTERNAL void | m0_be_btree_maxkey (struct m0_be_btree *tree, struct m0_be_op *op, struct m0_buf *out) |
M0_INTERNAL void | m0_be_btree_minkey (struct m0_be_btree *tree, struct m0_be_op *op, struct m0_buf *out) |
M0_INTERNAL void | m0_be_btree_update_inplace (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, struct m0_be_btree_anchor *anchor) |
M0_INTERNAL void | m0_be_btree_insert_inplace (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, struct m0_be_btree_anchor *anchor, uint64_t zonemask) |
M0_INTERNAL void | m0_be_btree_save_inplace (struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op, const struct m0_buf *key, struct m0_be_btree_anchor *anchor, bool overwrite, uint64_t zonemask) |
M0_INTERNAL void | m0_be_btree_lookup_inplace (struct m0_be_btree *tree, struct m0_be_op *op, const struct m0_buf *key, struct m0_be_btree_anchor *anchor) |
M0_INTERNAL void | m0_be_btree_release (struct m0_be_tx *tx, struct m0_be_btree_anchor *anchor) |
static void | print_single_node (struct m0_be_bnode *node) |
M0_INTERNAL void | m0_be_btree_cursor_init (struct m0_be_btree_cursor *cur, struct m0_be_btree *btree) |
M0_INTERNAL void | m0_be_btree_cursor_fini (struct m0_be_btree_cursor *cursor) |
M0_INTERNAL void | m0_be_btree_cursor_get (struct m0_be_btree_cursor *cur, const struct m0_buf *key, bool slant) |
M0_INTERNAL int | m0_be_btree_cursor_get_sync (struct m0_be_btree_cursor *cur, const struct m0_buf *key, bool slant) |
static int | btree_cursor_seek (struct m0_be_btree_cursor *cur, void *key) |
M0_INTERNAL int | m0_be_btree_cursor_first_sync (struct m0_be_btree_cursor *cur) |
M0_INTERNAL int | m0_be_btree_cursor_last_sync (struct m0_be_btree_cursor *cur) |
M0_INTERNAL void | m0_be_btree_cursor_next (struct m0_be_btree_cursor *cur) |
M0_INTERNAL void | m0_be_btree_cursor_prev (struct m0_be_btree_cursor *cur) |
M0_INTERNAL int | m0_be_btree_cursor_next_sync (struct m0_be_btree_cursor *cur) |
M0_INTERNAL int | m0_be_btree_cursor_prev_sync (struct m0_be_btree_cursor *cur) |
M0_INTERNAL void | m0_be_btree_cursor_put (struct m0_be_btree_cursor *cursor) |
M0_INTERNAL void | m0_be_btree_cursor_kv_get (struct m0_be_btree_cursor *cur, struct m0_buf *key, struct m0_buf *val) |
M0_INTERNAL bool | m0_be_btree_is_empty (struct m0_be_btree *tree) |
M0_INTERNAL void | btree_dbg_print (struct m0_be_btree *tree) |
M0_BASSERT (sizeof(bool)==1) | |
static void | be_domain_lock (struct m0_be_domain *dom) |
static void | be_domain_unlock (struct m0_be_domain *dom) |
static int | m0_be_segobj_opt_iterate (struct m0_be_seg *dict, const struct m0_be_0type *objtype, struct m0_buf *opt, char **suffix, bool begin) |
M0_INTERNAL int | m0_be_segobj_opt_next (struct m0_be_seg *dict, const struct m0_be_0type *objtype, struct m0_buf *opt, char **suffix) |
M0_INTERNAL int | m0_be_segobj_opt_begin (struct m0_be_seg *dict, const struct m0_be_0type *objtype, struct m0_buf *opt, char **suffix) |
static const char * | id_cut (const char *prefix, const char *key) |
static int | _0types_visit (struct m0_be_domain *dom, bool init) |
static int | be_domain_stob_open (struct m0_be_domain *dom, uint64_t stob_key, const char *stob_create_cfg, struct m0_stob **out, bool create) |
static int | be_domain_seg_structs_create (struct m0_be_domain *dom, struct m0_be_tx *tx, struct m0_be_seg *seg) |
static int | be_domain_seg_close (struct m0_be_domain *dom, struct m0_be_seg *seg, bool destroy) |
static int | be_domain_seg_open (struct m0_be_domain *dom, struct m0_be_seg *seg, uint64_t stob_key) |
static int | be_domain_seg_destroy (struct m0_be_domain *dom, uint64_t seg_id) |
static int | be_domain_seg_create (struct m0_be_domain *dom, struct m0_be_tx *tx, struct m0_be_seg *seg, const struct m0_be_0type_seg_cfg *seg_cfg) |
static int | be_0type_seg_init (struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data) |
static void | be_0type_seg_fini (struct m0_be_domain *dom, const char *suffix, const struct m0_buf *data) |
M0_INTERNAL void | be_domain_log_cleanup (const char *stob_domain_location, struct m0_be_log_cfg *log_cfg, bool create) |
static int | be_domain_mkfs_seg0 (struct m0_be_domain *dom, const struct m0_be_0type_seg_cfg *seg0_cfg) |
static void | be_domain_ldsc_sync (struct m0_be_log_discard *ld, struct m0_be_op *op, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_domain_cleanup_by_location (const char *stob_domain_location) |
M0_INTERNAL struct m0_be_tx * | m0_be_domain_tx_find (struct m0_be_domain *dom, uint64_t id) |
M0_INTERNAL struct m0_be_engine * | m0_be_domain_engine (struct m0_be_domain *dom) |
M0_INTERNAL struct m0_be_seg * | m0_be_domain_seg0_get (struct m0_be_domain *dom) |
M0_INTERNAL struct m0_be_log * | m0_be_domain_log (struct m0_be_domain *dom) |
M0_INTERNAL struct m0_be_seg * | m0_be_domain_seg (const struct m0_be_domain *dom, const void *addr) |
M0_INTERNAL struct m0_be_seg * | m0_be_domain_seg_first (const struct m0_be_domain *dom) |
M0_INTERNAL struct m0_be_seg * | m0_be_domain_seg_by_id (const struct m0_be_domain *dom, uint64_t id) |
static void | be_domain_seg_suffix_make (const struct m0_be_domain *dom, uint64_t seg_id, char *str, size_t str_size) |
M0_INTERNAL void | m0_be_domain_seg_create_credit (struct m0_be_domain *dom, const struct m0_be_0type_seg_cfg *seg_cfg, struct m0_be_tx_credit *cred) |
M0_INTERNAL void | m0_be_domain_seg_destroy_credit (struct m0_be_domain *dom, struct m0_be_seg *seg, struct m0_be_tx_credit *cred) |
M0_INTERNAL int | m0_be_domain_seg_create (struct m0_be_domain *dom, struct m0_be_tx *tx, const struct m0_be_0type_seg_cfg *seg_cfg, struct m0_be_seg **out) |
M0_INTERNAL int | m0_be_domain_seg_destroy (struct m0_be_domain *dom, struct m0_be_tx *tx, struct m0_be_seg *seg) |
M0_INTERNAL bool | m0_be_domain_is_locked (const struct m0_be_domain *dom) |
M0_INTERNAL void | m0_be_domain__0type_register (struct m0_be_domain *dom, struct m0_be_0type *type) |
M0_INTERNAL void | m0_be_domain__0type_unregister (struct m0_be_domain *dom, struct m0_be_0type *type) |
static int | be_domain_level_enter (struct m0_module *module) |
static void | be_domain_level_leave (struct m0_module *module) |
M0_INTERNAL void | m0_be_domain_module_setup (struct m0_be_domain *dom, const struct m0_be_domain_cfg *cfg) |
M0_INTERNAL void | m0_be_domain_tx_size_max (struct m0_be_domain *dom, struct m0_be_tx_credit *cred, m0_bcount_t *payload_size) |
M0_INTERNAL void | m0_be_domain__group_limits (struct m0_be_domain *dom, uint32_t *group_nr, uint32_t *tx_per_group) |
M0_INTERNAL bool | m0_be_domain_is_stob_log (struct m0_be_domain *dom, const struct m0_stob_id *stob_id) |
M0_INTERNAL bool | m0_be_domain_is_stob_seg (struct m0_be_domain *dom, const struct m0_stob_id *stob_id) |
M0_INTERNAL struct m0_be_seg * | m0_be_domain_seg_by_addr (struct m0_be_domain *dom, void *addr) |
M0_INTERNAL bool | m0_be_domain_seg_is_valid (struct m0_be_domain *dom, struct m0_be_seg *seg) |
M0_TL_DESCR_DEFINE (etx, "m0_be_engine::eng_txs[]", M0_INTERNAL, struct m0_be_tx, t_engine_linkage, t_magic, M0_BE_TX_MAGIC, M0_BE_TX_ENGINE_MAGIC) | |
M0_TL_DEFINE (etx, M0_INTERNAL, struct m0_be_tx) | |
M0_TL_DESCR_DEFINE (egr, "m0_be_engine::eng_groups[]", static, struct m0_be_tx_group, tg_engine_linkage, tg_magic, M0_BE_TX_MAGIC, M0_BE_TX_ENGINE_MAGIC) | |
M0_TL_DEFINE (egr, static, struct m0_be_tx_group) | |
static bool | be_engine_is_locked (const struct m0_be_engine *en) |
static void | be_engine_tx_group_open (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
static void | be_engine_group_freeze (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
static void | be_engine_group_tryclose (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
static void | be_engine_tx_group_state_move (struct m0_be_engine *en, struct m0_be_tx_group *gr, enum m0_be_tx_group_state state) |
static int | be_engine_cfg_validate (struct m0_be_engine_cfg *en_cfg) |
M0_INTERNAL int | m0_be_engine_init (struct m0_be_engine *en, struct m0_be_domain *dom, struct m0_be_engine_cfg *en_cfg) |
M0_INTERNAL void | m0_be_engine_fini (struct m0_be_engine *en) |
static void | be_engine_lock (struct m0_be_engine *en) |
static void | be_engine_unlock (struct m0_be_engine *en) |
static bool | be_engine_invariant (struct m0_be_engine *en) |
static uint64_t | be_engine_tx_id_allocate (struct m0_be_engine *en) |
static struct m0_be_tx * | be_engine_tx_peek (struct m0_be_engine *en, enum m0_be_tx_state state) |
static void | be_engine_tx_state_post (struct m0_be_engine *en, struct m0_be_tx *tx, enum m0_be_tx_state state) |
static bool | is_engine_at_stopped_or_done (const struct m0_be_engine *en, bool stopped) |
static struct m0_be_tx * | be_engine_tx_opening_peek (struct m0_be_engine *en) |
static void | be_engine_got_tx_open (struct m0_be_engine *en, struct m0_be_tx *tx) |
static void | be_engine_group_timer_cb (struct m0_sm_timer *timer) |
static void | be_engine_group_timer_arm (struct m0_sm_group *sm_grp, struct m0_sm_ast *ast) |
static void | be_engine_group_timer_disarm (struct m0_sm_group *sm_grp, struct m0_sm_ast *ast) |
static void | be_engine_group_timeout_arm (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
static struct m0_be_tx_group * | be_engine_group_find (struct m0_be_engine *en) |
static int | be_engine_tx_trygroup (struct m0_be_engine *en, struct m0_be_tx *tx) |
static bool | be_engine_recovery_is_finished (struct m0_be_engine *en) |
static void | be_engine_recovery_finish (struct m0_be_engine *en) |
static void | be_engine_try_recovery (struct m0_be_engine *en) |
static struct m0_be_tx * | be_engine_recovery_tx_find (struct m0_be_engine *en, enum m0_be_tx_state state) |
static void | be_engine_got_tx_grouping (struct m0_be_engine *en) |
static void | be_engine_got_tx_closed (struct m0_be_engine *en, struct m0_be_tx *tx) |
static void | be_engine_got_tx_done (struct m0_be_engine *en, struct m0_be_tx *tx) |
M0_INTERNAL bool | m0_be_engine__invariant (struct m0_be_engine *en) |
M0_INTERNAL void | m0_be_engine__tx_init (struct m0_be_engine *en, struct m0_be_tx *tx, enum m0_be_tx_state state) |
M0_INTERNAL void | m0_be_engine__tx_fini (struct m0_be_engine *en, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_engine__tx_state_set (struct m0_be_engine *en, struct m0_be_tx *tx, enum m0_be_tx_state state) |
M0_INTERNAL void | m0_be_engine__tx_force (struct m0_be_engine *en, struct m0_be_tx *tx) |
static void | be_engine_tx_group_ready (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_engine__tx_group_ready (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
static void | be_engine_group_stop_nr (struct m0_be_engine *en, size_t nr) |
static int | be_engine_group_start (struct m0_be_engine *en, size_t index) |
M0_INTERNAL int | m0_be_engine_start (struct m0_be_engine *en) |
M0_INTERNAL void | m0_be_engine_stop (struct m0_be_engine *en) |
M0_INTERNAL void | m0_be_engine_got_log_space_cb (struct m0_be_log *log) |
M0_INTERNAL void | m0_be_engine_full_log_cb (struct m0_be_log *log) |
M0_INTERNAL struct m0_be_tx * | m0_be_engine__tx_find (struct m0_be_engine *en, uint64_t id) |
M0_INTERNAL int | m0_be_engine__exclusive_open_invariant (struct m0_be_engine *en, struct m0_be_tx *excl) |
M0_INTERNAL void | m0_be_engine_tx_size_max (struct m0_be_engine *en, struct m0_be_tx_credit *cred, m0_bcount_t *payload_size) |
M0_INTERNAL void | m0_be_engine__group_limits (struct m0_be_engine *en, uint32_t *group_nr, uint32_t *tx_per_group) |
M0_INTERNAL void | m0_be_engine__tx_group_discard (struct m0_be_engine *en, struct m0_be_tx_group *gr) |
M0_BE_LIST_DESCR_DEFINE (fl, "m0_be_fl", static, struct be_alloc_chunk, bac_linkage_free, bac_magic_free, M0_BE_ALLOC_FREE_LINK_MAGIC, M0_BE_ALLOC_FREE_MAGIC) | |
M0_BE_LIST_DEFINE (fl, static, struct be_alloc_chunk) | |
static struct m0_be_list * | be_fl_list (struct m0_be_fl *fl, unsigned long index) |
static bool | be_fl_list_is_empty (struct m0_be_fl *fl, unsigned long index) |
M0_INTERNAL void | m0_be_fl_create (struct m0_be_fl *fl, struct m0_be_tx *tx, struct m0_be_seg *seg) |
M0_INTERNAL void | m0_be_fl_destroy (struct m0_be_fl *fl, struct m0_be_tx *tx) |
static unsigned long | be_fl_index_round_up (struct m0_be_fl *fl, m0_bcount_t size) |
static unsigned long | be_fl_index_round_down_chunk (struct m0_be_fl *fl, const struct be_alloc_chunk *chunk) |
M0_INTERNAL bool | m0_be_fl__invariant (struct m0_be_fl *fl) |
M0_INTERNAL void | m0_be_fl_add (struct m0_be_fl *fl, struct m0_be_tx *tx, struct be_alloc_chunk *chunk) |
M0_INTERNAL void | m0_be_fl_del (struct m0_be_fl *fl, struct m0_be_tx *tx, struct be_alloc_chunk *chunk) |
M0_INTERNAL struct be_alloc_chunk * | m0_be_fl_pick (struct m0_be_fl *fl, m0_bcount_t size) |
M0_INTERNAL void | m0_be_fl_credit (struct m0_be_fl *fl, enum m0_be_fl_op fl_op, struct m0_be_tx_credit *accum) |
M0_BASSERT (M0_BE_FL_STEP *M0_BE_FL_NR< M0_BCOUNT_MAX) | |
static void * | disabled_xcode_alloc (struct m0_xcode_cursor *it, size_t nob) |
static void | disabled_xcode_free (struct m0_xcode_cursor *it) |
static m0_bcount_t | be_fmt_xcoded_size (struct m0_xcode_type *type, void *object) |
static int | be_fmt_encode (struct m0_xcode_type *type, void *object, struct m0_bufvec_cursor *cur) |
static void * | be_fmt_alloc (struct m0_xcode_cursor *it, size_t nob) |
static int | be_fmt_decode (struct m0_xcode_type *type, void **object, struct m0_bufvec_cursor *cur, const struct m0_be_fmt_decode_cfg *cfg) |
static void | be_fmt_decoded_free (struct m0_xcode_type *type, void *object) |
static bool | m0_be_fmt_group__invariant (struct m0_be_fmt_group *fg) |
static void | be_fmt_content_bufs_init (struct m0_be_fmt_group *fg) |
M0_INTERNAL void | m0_be_fmt_type_trace_end (const struct m0_xcode_cursor *it) |
M0_INTERNAL int | m0_be_fmt_type_trace (const struct m0_xcode_cursor *it) |
M0_INTERNAL int | m0_be_fmt_group_init (struct m0_be_fmt_group *fg, const struct m0_be_fmt_group_cfg *cfg) |
M0_INTERNAL void | m0_be_fmt_group_fini (struct m0_be_fmt_group *fg) |
M0_INTERNAL void | m0_be_fmt_group_reset (struct m0_be_fmt_group *fg) |
M0_INTERNAL m0_bcount_t | m0_be_fmt_group_size (struct m0_be_fmt_group *fg) |
M0_INTERNAL m0_bcount_t | m0_be_fmt_group_size_max (const struct m0_be_fmt_group_cfg *cfg) |
M0_INTERNAL int | m0_be_fmt_group_encode (struct m0_be_fmt_group *fg, struct m0_bufvec_cursor *cur) |
M0_INTERNAL int | m0_be_fmt_group_decode (struct m0_be_fmt_group **fg, struct m0_bufvec_cursor *cur, const struct m0_be_fmt_decode_cfg *cfg) |
M0_INTERNAL void | m0_be_fmt_group_decoded_free (struct m0_be_fmt_group *fg) |
M0_INTERNAL void | m0_be_fmt_group_reg_add (struct m0_be_fmt_group *fg, const struct m0_be_fmt_reg *freg) |
M0_INTERNAL uint32_t | m0_be_fmt_group_reg_nr (const struct m0_be_fmt_group *fg) |
M0_INTERNAL void | m0_be_fmt_group_reg_by_id (const struct m0_be_fmt_group *fg, uint32_t index, struct m0_be_fmt_reg *freg) |
M0_INTERNAL void | m0_be_fmt_group_tx_add (struct m0_be_fmt_group *fg, const struct m0_be_fmt_tx *ftx) |
M0_INTERNAL uint32_t | m0_be_fmt_group_tx_nr (const struct m0_be_fmt_group *fg) |
M0_INTERNAL void | m0_be_fmt_group_tx_by_id (const struct m0_be_fmt_group *fg, uint32_t index, struct m0_be_fmt_tx *ftx) |
M0_INTERNAL struct m0_be_fmt_group_info * | m0_be_fmt_group_info_get (struct m0_be_fmt_group *fg) |
M0_INTERNAL bool | m0_be_fmt_group_sanity_check (struct m0_be_fmt_group *fg) |
M0_INTERNAL int | m0_be_fmt_log_record_header_init (struct m0_be_fmt_log_record_header *obj, const struct m0_be_fmt_log_record_header_cfg *cfg) |
M0_INTERNAL void | m0_be_fmt_log_record_header_fini (struct m0_be_fmt_log_record_header *obj) |
M0_INTERNAL void | m0_be_fmt_log_record_header_reset (struct m0_be_fmt_log_record_header *obj) |
M0_INTERNAL m0_bcount_t | m0_be_fmt_log_record_header_size_max (const struct m0_be_fmt_log_record_header_cfg *cfg) |
M0_INTERNAL void | m0_be_fmt_log_record_header_io_size_add (struct m0_be_fmt_log_record_header *obj, m0_bcount_t size) |
M0_BE_FMT_DEFINE_XCODE (log_record_header) | |
M0_BE_FMT_DEFINE_INIT_SIMPLE (log_record_footer) | |
M0_BE_FMT_DEFINE_XCODE (log_record_footer) | |
M0_BE_FMT_DEFINE_INIT_SIMPLE (log_store_header) | |
M0_BE_FMT_DEFINE_XCODE (log_store_header) | |
M0_BE_FMT_DEFINE_INIT_SIMPLE (cblock) | |
M0_BE_FMT_DEFINE_XCODE (cblock) | |
M0_BE_FMT_DEFINE_INIT_SIMPLE (log_header) | |
M0_BE_FMT_DEFINE_XCODE (log_header) | |
M0_BASSERT (sizeof(((struct m0_be_fmt_group *) NULL) ->fg_cfg)==sizeof(struct m0_be_fmt_group_cfg *)) | |
M0_BE_FMT_DECLARE (group) | |
M0_BE_FMT_DECLARE (log_store_header) | |
M0_BE_FMT_DECLARE (log_record_footer) | |
M0_BE_FMT_DECLARE (log_header) | |
M0_BE_FMT_DECLARE (cblock) | |
M0_BE_FMT_DECLARE (log_record_header) | |
static bool | be_io_cb (struct m0_clink *link) |
static m0_bindex_t | be_io_stob_offset_pack (m0_bindex_t offset, uint32_t bshift) |
static m0_bcount_t | be_io_size_pack (m0_bcount_t size, uint32_t bshift) |
static m0_bcount_t | be_io_size_unpack (m0_bcount_t size, uint32_t bshift) |
static void | be_io_free (struct m0_be_io *bio) |
static void | be_io_part_init (struct m0_be_io_part *bip, struct m0_be_io *bio) |
static void | be_io_part_fini (struct m0_be_io_part *bip) |
static bool | be_io_part_invariant (struct m0_be_io_part *bip) |
static int | be_io_part_launch (struct m0_be_io_part *bip) |
static void | be_io_part_reset (struct m0_be_io_part *bip) |
static bool | be_io_part_add (struct m0_be_io_part *bip, void *ptr_user, m0_bindex_t offset_stob, m0_bcount_t size) |
M0_INTERNAL int | m0_be_io_init (struct m0_be_io *bio) |
M0_INTERNAL int | m0_be_io_allocate (struct m0_be_io *bio, struct m0_be_io_credit *iocred) |
M0_INTERNAL void | m0_be_io_deallocate (struct m0_be_io *bio) |
M0_INTERNAL void | m0_be_io_fini (struct m0_be_io *bio) |
M0_INTERNAL bool | m0_be_io__invariant (struct m0_be_io *bio) |
static void | be_io_vec_cut (struct m0_be_io *bio, struct m0_be_io_part *bip) |
M0_INTERNAL void | m0_be_io_add (struct m0_be_io *bio, struct m0_stob *stob, void *ptr_user, m0_bindex_t offset_stob, m0_bcount_t size) |
M0_INTERNAL void | m0_be_io_add_nostob (struct m0_be_io *bio, void *ptr_user, m0_bindex_t offset_stob, m0_bcount_t size) |
static void | be_io_vec_fork (struct m0_be_io *bio, unsigned index) |
static unsigned | be_io_vec_index_by_ptr (struct m0_be_io *bio, m0_bindex_t *iv_ptr) |
M0_INTERNAL void | m0_be_io_stob_assign (struct m0_be_io *bio, struct m0_stob *stob, m0_bindex_t offset, m0_bcount_t size) |
M0_INTERNAL void | m0_be_io_stob_move (struct m0_be_io *bio, struct m0_stob *stob, m0_bindex_t offset, m0_bindex_t win_start, m0_bcount_t win_size) |
M0_INTERNAL void | m0_be_io_vec_pack (struct m0_be_io *bio) |
M0_INTERNAL m0_bcount_t | m0_be_io_size (struct m0_be_io *bio) |
M0_INTERNAL void | m0_be_io_configure (struct m0_be_io *bio, enum m0_stob_io_opcode opcode) |
static void | be_io_finished (struct m0_be_io *bio) |
static void | be_io_empty_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
M0_INTERNAL void | m0_be_io_launch (struct m0_be_io *bio, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_io_sync_enable (struct m0_be_io *bio) |
M0_INTERNAL bool | m0_be_io_sync_is_enabled (struct m0_be_io *bio) |
M0_INTERNAL enum m0_stob_io_opcode | m0_be_io_opcode (struct m0_be_io *io) |
M0_INTERNAL bool | m0_be_io_is_empty (struct m0_be_io *bio) |
M0_INTERNAL void | m0_be_io_reset (struct m0_be_io *bio) |
M0_INTERNAL void | m0_be_io_sort (struct m0_be_io *bio) |
M0_INTERNAL void | m0_be_io_user_data_set (struct m0_be_io *bio, void *data) |
M0_INTERNAL void * | m0_be_io_user_data (struct m0_be_io *bio) |
M0_INTERNAL int | m0_be_io_single (struct m0_stob *stob, enum m0_stob_io_opcode opcode, void *ptr_user, m0_bindex_t offset_stob, m0_bcount_t size) |
static bool | be_io_part_intersect (const struct m0_be_io_part *bip1, const struct m0_be_io_part *bip2) |
M0_INTERNAL bool | m0_be_io_intersect (const struct m0_be_io *bio1, const struct m0_be_io *bio2) |
M0_INTERNAL bool | m0_be_io_ptr_user_is_eq (const struct m0_be_io *bio1, const struct m0_be_io *bio2) |
M0_INTERNAL bool | m0_be_io_offset_stob_is_eq (const struct m0_be_io *bio1, const struct m0_be_io *bio2) |
M0_INTERNAL void | m0_be_io_credit_add (struct m0_be_io_credit *iocred0, const struct m0_be_io_credit *iocred1) |
M0_INTERNAL bool | m0_be_io_credit_le (const struct m0_be_io_credit *iocred0, const struct m0_be_io_credit *iocred1) |
M0_TL_DESCR_DEFINE (sched_io, "be log scheduler IOs", static, struct m0_be_io, bio_sched_link, bio_sched_magic, M0_BE_IO_SCHED_MAGIC, M0_BE_IO_SCHED_HEAD_MAGIC) | |
M0_TL_DEFINE (sched_io, static, struct m0_be_io) | |
M0_INTERNAL int | m0_be_io_sched_init (struct m0_be_io_sched *sched, struct m0_be_io_sched_cfg *cfg) |
M0_INTERNAL void | m0_be_io_sched_fini (struct m0_be_io_sched *sched) |
M0_INTERNAL void | m0_be_io_sched_lock (struct m0_be_io_sched *sched) |
M0_INTERNAL void | m0_be_io_sched_unlock (struct m0_be_io_sched *sched) |
M0_INTERNAL bool | m0_be_io_sched_is_locked (struct m0_be_io_sched *sched) |
static bool | be_io_sched_invariant (struct m0_be_io_sched *sched) |
static void | be_io_sched_launch_next (struct m0_be_io_sched *sched) |
static void | be_io_sched_launch_next_locked (struct m0_be_io_sched *sched) |
static void | be_io_sched_cb (struct m0_be_op *op, void *param) |
static void | be_io_sched_insert (struct m0_be_io_sched *sched, struct m0_be_io *io) |
M0_INTERNAL void | m0_be_io_sched_add (struct m0_be_io_sched *sched, struct m0_be_io *io, struct m0_ext *ext, struct m0_be_op *op) |
static bool | be_list_invariant (const struct m0_be_list *blist, const struct m0_be_list_descr *descr) |
static bool | be_tlink_invariant (const struct m0_be_list_link *link, const struct m0_be_list_descr *descr) |
M0_INTERNAL void | m0_be_list_credit (enum m0_be_list_op optype, m0_bcount_t nr, struct m0_be_tx_credit *accum) |
static void | be_list_capture (struct m0_be_list *blist, struct m0_be_tx *tx) |
static void | be_tlink_capture (struct m0_be_list_link *link, struct m0_be_tx *tx) |
static struct m0_be_list_link * | be_list_obj2link (const void *obj, const struct m0_be_list_descr *descr) |
static void * | be_list_link2obj (struct m0_be_list_link *link, const struct m0_be_list_descr *descr) |
M0_INTERNAL void | m0_be_list_create (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_list_destroy (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx) |
M0_INTERNAL bool | m0_be_list_is_empty (struct m0_be_list *blist, const struct m0_be_list_descr *descr) |
M0_INTERNAL void | m0_be_tlink_create (void *obj, const struct m0_be_list_descr *descr, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tlink_destroy (void *obj, const struct m0_be_list_descr *descr, struct m0_be_tx *tx) |
static bool | be_tlink_is_tail (struct m0_be_list *blist, struct m0_be_list_link *link) |
static bool | be_tlink_is_head (struct m0_be_list *blist, struct m0_be_list_link *link) |
static bool | be_tlink_is_in_list (struct m0_be_list_link *link) |
M0_INTERNAL void * | m0_be_list_tail (struct m0_be_list *blist, const struct m0_be_list_descr *descr) |
M0_INTERNAL void * | m0_be_list_head (struct m0_be_list *blist, const struct m0_be_list_descr *descr) |
M0_INTERNAL void * | m0_be_list_prev (struct m0_be_list *blist, const struct m0_be_list_descr *descr, const void *obj) |
M0_INTERNAL void * | m0_be_list_next (struct m0_be_list *blist, const struct m0_be_list_descr *descr, const void *obj) |
M0_INTERNAL void | m0_be_list_add (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx, void *obj) |
M0_INTERNAL void | m0_be_list_add_after (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx, void *obj, void *obj_new) |
M0_INTERNAL void | m0_be_list_add_before (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx, void *obj, void *obj_new) |
M0_INTERNAL void | m0_be_list_add_tail (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx, void *obj) |
M0_INTERNAL void | m0_be_list_del (struct m0_be_list *blist, const struct m0_be_list_descr *descr, struct m0_be_tx *tx, void *obj) |
static void | be_log_header_update (struct m0_be_log *log) |
static int | be_log_header_write (struct m0_be_log *log, struct m0_be_fmt_log_header *log_hdr) |
M0_TL_DESCR_DEFINE (record, "be log records", static, struct m0_be_log_record, lgr_linkage, lgr_magic, M0_BE_LOG_RECORD_MAGIC, M0_BE_LOG_RECORD_HEAD_MAGIC) | |
M0_TL_DEFINE (record, static, struct m0_be_log_record) | |
static struct m0_be_log * | be_log_module2log (struct m0_module *module) |
static int | be_log_level_enter (struct m0_module *module) |
static void | be_log_level_leave (struct m0_module *module) |
M0_INTERNAL void | m0_be_log_module_setup (struct m0_be_log *log, struct m0_be_log_cfg *lg_cfg, bool create_mode) |
static void | be_log_module_fini (struct m0_be_log *log, bool destroy_mode) |
static int | be_log_module_init (struct m0_be_log *log, struct m0_be_log_cfg *log_cfg, bool create_mode) |
M0_INTERNAL bool | m0_be_log__invariant (struct m0_be_log *log) |
M0_INTERNAL int | m0_be_log_open (struct m0_be_log *log, struct m0_be_log_cfg *log_cfg) |
M0_INTERNAL void | m0_be_log_close (struct m0_be_log *log) |
M0_INTERNAL int | m0_be_log_create (struct m0_be_log *log, struct m0_be_log_cfg *log_cfg) |
M0_INTERNAL void | m0_be_log_destroy (struct m0_be_log *log) |
static void | be_log_header_io (struct m0_be_log *log, enum m0_be_log_store_io_type io_type, struct m0_be_op *op) |
static void | be_log_header_io_sync (struct m0_be_log *log, enum m0_be_log_store_io_type io_type) |
static m0_bcount_t | be_log_record_header_size (void) |
static m0_bcount_t | be_log_record_footer_size (void) |
M0_INTERNAL m0_bcount_t | m0_be_log_reserved_size (struct m0_be_log *log, m0_bcount_t *lio_size, int lio_nr) |
static void | be_log_record_io_done_cb (struct m0_be_op *op, void *param) |
M0_INTERNAL void | m0_be_log_record_init (struct m0_be_log_record *record, struct m0_be_log *log) |
M0_INTERNAL void | m0_be_log_record_fini (struct m0_be_log_record *record) |
M0_INTERNAL void | m0_be_log_record_reset (struct m0_be_log_record *record) |
M0_INTERNAL void | m0_be_log_record_assign (struct m0_be_log_record *record, struct m0_be_log_record_iter *iter, bool need_discard) |
M0_INTERNAL void | m0_be_log_record_ext (struct m0_be_log_record *record, struct m0_ext *ext) |
M0_INTERNAL void | m0_be_log_record_skip_discard (struct m0_be_log_record *record) |
M0_INTERNAL void | m0_be_log_record_discard (struct m0_be_log *log, m0_bcount_t size) |
static void | be_log_io_credit (struct m0_be_log *log, struct m0_be_io_credit *accum) |
M0_INTERNAL int | m0_be_log_record_io_create (struct m0_be_log_record *record, m0_bcount_t size_max) |
static int | be_log_record_header_init (struct m0_be_fmt_log_record_header *hdr) |
M0_INTERNAL int | m0_be_log_record_allocate (struct m0_be_log_record *record) |
M0_INTERNAL void | m0_be_log_record_deallocate (struct m0_be_log_record *record) |
M0_INTERNAL void | m0_be_log_record_io_size_set (struct m0_be_log_record *record, int index, m0_bcount_t size) |
M0_INTERNAL void | m0_be_log_record_io_prepare (struct m0_be_log_record *record, enum m0_stob_io_opcode opcode, m0_bcount_t size_reserved) |
M0_INTERNAL void | m0_be_log_record_io_launch (struct m0_be_log_record *record, struct m0_be_op *op) |
M0_INTERNAL struct m0_bufvec * | m0_be_log_record_io_bufvec (struct m0_be_log_record *record, int index) |
M0_INTERNAL m0_bindex_t | m0_be_log_record_position (const struct m0_be_log_record *record) |
M0_INTERNAL m0_bindex_t | m0_be_log_record_discarded (const struct m0_be_log_record *record) |
M0_INTERNAL int | m0_be_log_reserve (struct m0_be_log *log, m0_bcount_t size) |
M0_INTERNAL void | m0_be_log_unreserve (struct m0_be_log *log, m0_bcount_t size) |
M0_INTERNAL uint32_t | m0_be_log_bshift (struct m0_be_log *log) |
M0_INTERNAL void | m0_be_log_header__set (struct m0_be_fmt_log_header *hdr, m0_bindex_t discarded, m0_bindex_t lsn, m0_bcount_t size) |
M0_INTERNAL bool | m0_be_log_header__is_eq (struct m0_be_fmt_log_header *hdr1, struct m0_be_fmt_log_header *hdr2) |
M0_INTERNAL bool | m0_be_log_header__repair (struct m0_be_fmt_log_header **hdrs, int nr, struct m0_be_fmt_log_header *out) |
M0_INTERNAL int | m0_be_log_header_read (struct m0_be_log *log, struct m0_be_fmt_log_header *log_hdr) |
static int | be_log_read_plain (struct m0_be_log *log, m0_bindex_t pos, m0_bcount_t size, void *out) |
M0_INTERNAL bool | m0_be_fmt_log_record_header__invariant (struct m0_be_fmt_log_record_header *header, struct m0_be_log *log) |
static void | be_log_record_header_copy (struct m0_be_fmt_log_record_header *dest, struct m0_be_fmt_log_record_header *src) |
static int | be_log_record_iter_read (struct m0_be_log *log, struct m0_be_log_record_iter *iter, m0_bindex_t pos) |
M0_INTERNAL int | m0_be_log_record_iter_init (struct m0_be_log_record_iter *iter) |
M0_INTERNAL void | m0_be_log_record_iter_fini (struct m0_be_log_record_iter *iter) |
M0_INTERNAL void | m0_be_log_record_iter_copy (struct m0_be_log_record_iter *dest, struct m0_be_log_record_iter *src) |
M0_INTERNAL int | m0_be_log_record_initial (struct m0_be_log *log, struct m0_be_log_record_iter *curr) |
M0_INTERNAL int | m0_be_log_record_next (struct m0_be_log *log, const struct m0_be_log_record_iter *curr, struct m0_be_log_record_iter *next) |
M0_INTERNAL int | m0_be_log_record_prev (struct m0_be_log *log, const struct m0_be_log_record_iter *curr, struct m0_be_log_record_iter *prev) |
M0_INTERNAL bool | m0_be_log_recovery_record_available (struct m0_be_log *log) |
M0_INTERNAL void | m0_be_log_recovery_record_get (struct m0_be_log *log, struct m0_be_log_record_iter *iter) |
M0_INTERNAL m0_bindex_t | m0_be_log_recovery_discarded (struct m0_be_log *log) |
M0_INTERNAL bool | m0_be_log_contains_stob (struct m0_be_log *log, const struct m0_stob_id *stob_id) |
M0_TL_DESCR_DEFINE (ld_start, "m0_be_log_discard::lds_start_q", static, struct m0_be_log_discard_item, ldi_start_link, ldi_magic, M0_BE_LOG_DISCARD_MAGIC, M0_BE_LOG_DISCARD_HEAD_MAGIC) | |
M0_TL_DEFINE (ld_start, static, struct m0_be_log_discard_item) | |
M0_BE_POOL_DESCR_DEFINE (ld, "m0_be_log_discard::lds_item_pool", static, struct m0_be_log_discard_item, ldi_pool_item, ldi_pool_magic, M0_BE_LOG_DISCARD_POOL_MAGIC) | |
M0_BE_POOL_DEFINE (ld, static, struct m0_be_log_discard_item) | |
static void | be_log_discard_sync_done_cb (struct m0_be_op *op, void *param) |
static void | be_log_discard_timer_start (struct m0_be_log_discard *ld) |
static void | be_log_discard_timer_cancel (struct m0_be_log_discard *ld) |
M0_INTERNAL int | m0_be_log_discard_init (struct m0_be_log_discard *ld, struct m0_be_log_discard_cfg *ld_cfg) |
static void | be_log_discard_wait (struct m0_be_log_discard *ld) |
M0_INTERNAL void | m0_be_log_discard_fini (struct m0_be_log_discard *ld) |
static void | be_log_discard_lock (struct m0_be_log_discard *ld) |
static void | be_log_discard_unlock (struct m0_be_log_discard *ld) |
static bool | be_log_discard_is_locked (struct m0_be_log_discard *ld) |
static void | be_log_discard_flush_finished (struct m0_be_log_discard *ld) |
static void | be_log_discard_check_sync (struct m0_be_log_discard *ld, bool force) |
static void | be_log_discard_item_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
static void | be_log_discard_item_trydiscard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
static void | be_log_discard_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static void | be_log_discard_timer_cb (struct m0_sm_timer *timer) |
static int | be_log_discard_timer_start_loc (void *param) |
static int | be_log_discard_timer_cancel_loc (void *param) |
M0_INTERNAL void | m0_be_log_discard_sync (struct m0_be_log_discard *ld) |
M0_INTERNAL void | m0_be_log_discard_flush (struct m0_be_log_discard *ld, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_log_discard_item_starting (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_log_discard_item_finished (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
static void | be_log_discard_item_reset (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_log_discard_item_get (struct m0_be_log_discard *ld, struct m0_be_op *op, struct m0_be_log_discard_item **ldi) |
M0_INTERNAL void | m0_be_log_discard_item_put (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_log_discard_item_user_data_set (struct m0_be_log_discard_item *ldi, void *data) |
M0_INTERNAL void * | m0_be_log_discard_item_user_data (struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_log_discard_item_ext_set (struct m0_be_log_discard_item *ldi, struct m0_ext *ext) |
M0_INTERNAL struct m0_ext * | m0_be_log_discard_item_ext (struct m0_be_log_discard_item *ldi) |
M0_INTERNAL int | m0_be_log_sched_init (struct m0_be_log_sched *sched, struct m0_be_log_sched_cfg *cfg) |
M0_INTERNAL void | m0_be_log_sched_fini (struct m0_be_log_sched *sched) |
M0_INTERNAL void | m0_be_log_sched_lock (struct m0_be_log_sched *sched) |
M0_INTERNAL void | m0_be_log_sched_unlock (struct m0_be_log_sched *sched) |
M0_INTERNAL bool | m0_be_log_sched_is_locked (struct m0_be_log_sched *sched) |
M0_INTERNAL void | m0_be_log_sched_add (struct m0_be_log_sched *sched, struct m0_be_log_io *lio, struct m0_be_op *op) |
M0_INTERNAL int | m0_be_log_io_init (struct m0_be_log_io *lio) |
M0_INTERNAL void | m0_be_log_io_fini (struct m0_be_log_io *lio) |
M0_INTERNAL void | m0_be_log_io_reset (struct m0_be_log_io *lio) |
M0_INTERNAL int | m0_be_log_io_allocate (struct m0_be_log_io *lio, struct m0_be_io_credit *iocred, uint32_t log_bshift) |
M0_INTERNAL void | m0_be_log_io_deallocate (struct m0_be_log_io *lio) |
M0_INTERNAL struct m0_bufvec * | m0_be_log_io_bufvec (struct m0_be_log_io *lio) |
M0_INTERNAL struct m0_be_io * | m0_be_log_io_be_io (struct m0_be_log_io *lio) |
M0_INTERNAL void | m0_be_log_io_user_data_set (struct m0_be_log_io *lio, void *data) |
M0_INTERNAL void * | m0_be_log_io_user_data (struct m0_be_log_io *lio) |
M0_INTERNAL bool | m0_be_log_io_is_empty (struct m0_be_log_io *lio) |
static int | be_log_store_buf_alloc_aligned (struct m0_be_log_store *ls, struct m0_buf *buf, m0_bcount_t size) |
static void | be_log_store_buf_free_aligned (struct m0_be_log_store *ls, struct m0_buf *buf) |
M0_INTERNAL bool | m0_be_log_store__invariant (struct m0_be_log_store *ls) |
static int | be_log_store_zero (struct m0_be_log_store *ls, m0_bcount_t ls_size) |
static struct m0_be_log_store * | be_log_store_module2store (struct m0_module *module) |
static bool | be_log_store_header_validate (struct m0_be_fmt_log_store_header *header, uint64_t alignment) |
static int | be_log_store_rbuf_alloc (struct m0_be_log_store *ls, struct m0_buf *buf) |
static void | be_log_store_rbuf_free (struct m0_be_log_store *ls, struct m0_buf *buf) |
static int | be_log_store_rbuf_init_fini_index (struct m0_be_log_store *ls, int i, bool init) |
static void | be_log_store_rbuf_fini_nr (struct m0_be_log_store *ls, int nr) |
static void | be_log_store_rbuf_fini (struct m0_be_log_store *ls) |
static int | be_log_store_rbuf_init (struct m0_be_log_store *ls) |
static void | be_log_store_rbuf_arr_free (struct m0_be_log_store *ls) |
static int | be_log_store_level_enter (struct m0_module *module) |
static void | be_log_store_level_leave (struct m0_module *module) |
M0_INTERNAL void | m0_be_log_store_module_setup (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg, bool create_mode) |
static void | be_log_store_module_fini (struct m0_be_log_store *ls, bool destroy_mode) |
static int | be_log_store_module_init (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg, bool create_mode) |
M0_INTERNAL int | m0_be_log_store_open (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg) |
M0_INTERNAL int | m0_be_log_store_create (struct m0_be_log_store *ls, struct m0_be_log_store_cfg *ls_cfg) |
M0_INTERNAL void | m0_be_log_store_destroy (struct m0_be_log_store *ls) |
M0_INTERNAL void | m0_be_log_store_close (struct m0_be_log_store *ls) |
M0_INTERNAL uint32_t | m0_be_log_store_bshift (struct m0_be_log_store *ls) |
M0_INTERNAL m0_bcount_t | m0_be_log_store_buf_size (struct m0_be_log_store *ls) |
M0_INTERNAL void | m0_be_log_store_io_credit (struct m0_be_log_store *ls, struct m0_be_io_credit *accum) |
M0_INTERNAL int | m0_be_log_store_io_window (struct m0_be_log_store *ls, m0_bindex_t offset, m0_bcount_t *length) |
M0_INTERNAL void | m0_be_log_store_io_discard (struct m0_be_log_store *ls, m0_bindex_t offset, struct m0_be_op *op) |
static m0_bindex_t | be_log_store_phys_addr (struct m0_be_log_store *ls, m0_bindex_t position) |
M0_INTERNAL void | m0_be_log_store_io_translate (struct m0_be_log_store *ls, m0_bindex_t position, struct m0_be_io *bio) |
M0_INTERNAL struct m0_buf * | m0_be_log_store_rbuf_write_buf (struct m0_be_log_store *ls) |
M0_INTERNAL struct m0_buf * | m0_be_log_store_rbuf_read_buf_first (struct m0_be_log_store *ls, unsigned *iter) |
M0_INTERNAL struct m0_buf * | m0_be_log_store_rbuf_read_buf_next (struct m0_be_log_store *ls, unsigned *iter) |
static struct m0_be_log_io * | be_log_store_rbuf_io_and_op (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned index) |
M0_INTERNAL struct m0_be_log_io * | m0_be_log_store_rbuf_io_first (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned *iter) |
M0_INTERNAL struct m0_be_log_io * | m0_be_log_store_rbuf_io_next (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type, struct m0_be_op **op, unsigned *iter) |
M0_INTERNAL void | m0_be_log_store_rbuf_io_reset (struct m0_be_log_store *ls, enum m0_be_log_store_io_type io_type) |
M0_INTERNAL bool | m0_be_log_store_overwrites (struct m0_be_log_store *ls, m0_bindex_t index, m0_bcount_t size, m0_bindex_t position) |
M0_INTERNAL bool | m0_be_log_store_contains_stob (struct m0_be_log_store *ls, const struct m0_stob_id *stob_id) |
M0_TL_DESCR_DEFINE (bos, "m0_be_op::bo_children", static, struct m0_be_op, bo_set_link, bo_set_link_magic, M0_BE_OP_SET_LINK_MAGIC, M0_BE_OP_SET_MAGIC) | |
M0_TL_DEFINE (bos, static, struct m0_be_op) | |
static void | be_op_sm_init (struct m0_be_op *op) |
static void | be_op_sm_fini (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_init (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_fini (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_lock (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_unlock (struct m0_be_op *op) |
M0_INTERNAL bool | m0_be_op_is_locked (const struct m0_be_op *op) |
static void | be_op_set_add (struct m0_be_op *parent, struct m0_be_op *child) |
static bool | be_op_set_del (struct m0_be_op *parent, struct m0_be_op *child) |
M0_INTERNAL void | m0_be_op_reset (struct m0_be_op *op) |
static void | be_op_state_change (struct m0_be_op *op, enum m0_be_op_state state) |
M0_INTERNAL void | m0_be_op_active (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_done (struct m0_be_op *op) |
M0_INTERNAL bool | m0_be_op_is_done (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_callback_set (struct m0_be_op *op, m0_be_op_cb_t cb, void *param, enum m0_be_op_state state) |
M0_INTERNAL int | m0_be_op_tick_ret (struct m0_be_op *op, struct m0_fom *fom, int next_state) |
M0_INTERNAL void | m0_be_op_wait (struct m0_be_op *op) |
M0_INTERNAL void | m0_be_op_set_add (struct m0_be_op *parent, struct m0_be_op *child) |
M0_INTERNAL void | m0_be_op_rc_set (struct m0_be_op *op, int rc) |
M0_INTERNAL int | m0_be_op_rc (struct m0_be_op *op) |
M0_BE_POOL_DESCR_DEFINE (pdio, "pd_io pool", static, struct m0_be_pd_io, bpi_pool_item, bpi_pool_magic, M0_BE_PD_IO_MAGIC) | |
M0_BE_POOL_DEFINE (pdio, static, struct m0_be_pd_io) | |
static void | be_pd_io_move (struct m0_be_pd *pd, struct m0_be_pd_io *pdio, enum m0_be_pd_io_state state) |
static void | be_pd_io_op_done (struct m0_be_op *op, void *param) |
M0_INTERNAL int | m0_be_pd_init (struct m0_be_pd *pd, struct m0_be_pd_cfg *pd_cfg) |
M0_INTERNAL void | m0_be_pd_fini (struct m0_be_pd *pd) |
M0_INTERNAL void | m0_be_pd_io_add (struct m0_be_pd *pd, struct m0_be_pd_io *pdio, struct m0_ext *ext, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_pd_io_get (struct m0_be_pd *pd, struct m0_be_pd_io **pdio, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_pd_io_put (struct m0_be_pd *pd, struct m0_be_pd_io *pdio) |
M0_INTERNAL struct m0_be_io * | m0_be_pd_io_be_io (struct m0_be_pd_io *pdio) |
static void | be_pd_sync_run (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
M0_INTERNAL void | m0_be_pd_sync (struct m0_be_pd *pd, m0_bindex_t pos, struct m0_stob **stobs, int nr, struct m0_be_op *op) |
M0_TL_DESCR_DEFINE (be_pool, "list of be_pool_items", static, struct m0_be_pool_item, bpli_link, bpli_magic, M0_BE_POOL_MAGIC, M0_BE_POOL_HEAD_MAGIC) | |
M0_TL_DEFINE (be_pool, static, struct m0_be_pool_item) | |
M0_TL_DESCR_DEFINE (be_pool_q, "list of be_pool_queue_items", static, struct be_pool_queue_item, bplq_link, bplq_magic, M0_BE_POOL_QUEUE_MAGIC, M0_BE_POOL_QUEUE_HEAD_MAGIC) | |
M0_TL_DEFINE (be_pool_q, static, struct be_pool_queue_item) | |
M0_INTERNAL int | m0_be_pool_init (struct m0_be_pool *pool, struct m0_be_pool_cfg *cfg) |
M0_INTERNAL void | m0_be_pool_fini (struct m0_be_pool *pool) |
static void | be_pool_lock (struct m0_be_pool *pool) |
static void | be_pool_unlock (struct m0_be_pool *pool) |
static bool | be_pool_is_locked (struct m0_be_pool *pool) |
static void * | be_pool_amb (const struct m0_be_pool_descr *d, struct m0_be_pool_item *item) |
static struct m0_be_pool_item * | be_pool_item (const struct m0_be_pool_descr *d, void *obj) |
static uint64_t | be_pool_magic (const struct m0_be_pool_descr *d, void *obj) |
static void | be_pool_magic_set (const struct m0_be_pool_descr *d, void *obj, uint64_t magic) |
static bool | be_pool_obj__invariant (const struct m0_be_pool_descr *d, void *obj) |
static void | be_pool_get (const struct m0_be_pool_descr *d, struct m0_be_pool *pool, void **obj) |
static void | be_pool_got_free_item (const struct m0_be_pool_descr *d, struct m0_be_pool *pool) |
M0_INTERNAL void | m0_be_pool_add (const struct m0_be_pool_descr *d, struct m0_be_pool *pool, void *obj) |
M0_INTERNAL void * | m0_be_pool_del (const struct m0_be_pool_descr *d, struct m0_be_pool *pool) |
M0_INTERNAL void | m0_be_pool_get (const struct m0_be_pool_descr *d, struct m0_be_pool *pool, void **obj, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_pool_put (const struct m0_be_pool_descr *d, struct m0_be_pool *pool, void *obj) |
M0_TL_DESCR_DEFINE (bqq, "m0_be_queue::bq_q*[]", static, struct be_queue_item, bqi_link, bqi_magic, M0_BE_QUEUE_Q_MAGIC, M0_BE_QUEUE_Q_HEAD_MAGIC) | |
M0_TL_DEFINE (bqq, static, struct be_queue_item) | |
M0_TL_DESCR_DEFINE (bqop, "m0_be_queue::bq_op_*[]", static, struct be_queue_wait_op, bbo_link, bbo_magic, M0_BE_QUEUE_OP_MAGIC, M0_BE_QUEUE_OP_HEAD_MAGIC) | |
M0_TL_DEFINE (bqop, static, struct be_queue_wait_op) | |
static uint64_t | bq_queue_items_max (struct m0_be_queue *bq) |
static struct be_queue_item * | be_queue_qitem (struct m0_be_queue *bq, uint64_t index) |
static bool | be_queue_invariant (struct m0_be_queue *bq) |
M0_INTERNAL int | m0_be_queue_init (struct m0_be_queue *bq, struct m0_be_queue_cfg *cfg) |
M0_INTERNAL void | m0_be_queue_fini (struct m0_be_queue *bq) |
M0_INTERNAL void | m0_be_queue_lock (struct m0_be_queue *bq) |
M0_INTERNAL void | m0_be_queue_unlock (struct m0_be_queue *bq) |
static uint64_t | be_queue_items_nr (struct m0_be_queue *bq) |
static bool | be_queue_is_empty (struct m0_be_queue *bq) |
static bool | be_queue_is_full (struct m0_be_queue *bq) |
static struct be_queue_item * | be_queue_q_put (struct m0_be_queue *bq, const struct m0_buf *data) |
static void | be_queue_q_peek (struct m0_be_queue *bq, struct m0_buf *data) |
static void | be_queue_q_get (struct m0_be_queue *bq, struct m0_buf *data, bool *successful) |
static void | be_queue_op_put (struct m0_be_queue *bq, struct m0_be_op *op, struct be_queue_item *bqi) |
static void | be_queue_op_put_done (struct m0_be_queue *bq) |
static bool | be_queue_op_put_is_waiting (struct m0_be_queue *bq) |
static void | be_queue_op_get (struct m0_be_queue *bq, struct m0_be_op *op, struct m0_buf *data, bool *successful) |
static void | be_queue_op_get_done (struct m0_be_queue *bq, bool success) |
static bool | be_queue_op_get_is_waiting (struct m0_be_queue *bq) |
M0_INTERNAL void | m0_be_queue_put (struct m0_be_queue *bq, struct m0_be_op *op, const struct m0_buf *data) |
M0_INTERNAL void | m0_be_queue_end (struct m0_be_queue *bq) |
M0_INTERNAL void | m0_be_queue_get (struct m0_be_queue *bq, struct m0_be_op *op, struct m0_buf *data, bool *successful) |
M0_INTERNAL bool | m0_be_queue_peek (struct m0_be_queue *bq, struct m0_buf *data) |
M0_INTERNAL void | m0_be_recovery_init (struct m0_be_recovery *rvr, struct m0_be_recovery_cfg *cfg) |
M0_INTERNAL void | m0_be_recovery_fini (struct m0_be_recovery *rvr) |
M0_INTERNAL int | m0_be_recovery_run (struct m0_be_recovery *rvr) |
M0_INTERNAL bool | m0_be_recovery_log_record_available (struct m0_be_recovery *rvr) |
M0_INTERNAL void | m0_be_recovery_log_record_get (struct m0_be_recovery *rvr, struct m0_be_log_record_iter *iter) |
static const struct m0_be_seg_geom * | be_seg_geom_find_by_id (const struct m0_be_seg_hdr *hdr, uint64_t id) |
static int | be_seg_geom_len (const struct m0_be_seg_geom *geom) |
static int | be_seg_hdr_size (void) |
static int | be_seg_hdr_create (struct m0_stob *stob, struct m0_be_seg_hdr *hdr) |
M0_INTERNAL bool | m0_be_seg_geom_eq (const struct m0_be_seg_geom *left, const struct m0_be_seg_geom *right) |
static bool | be_seg_geom_has_no_overlapps (const struct m0_be_seg_geom *geom, int len) |
M0_INTERNAL int | m0_be_seg_create_multiple (struct m0_stob *stob, const struct m0_be_seg_geom *geom) |
M0_INTERNAL int | m0_be_seg_create (struct m0_be_seg *seg, m0_bcount_t size, void *addr) |
M0_INTERNAL int | m0_be_seg_destroy (struct m0_be_seg *seg) |
M0_INTERNAL void | m0_be_seg_init (struct m0_be_seg *seg, struct m0_stob *stob, struct m0_be_domain *dom, uint64_t seg_id) |
M0_INTERNAL void | m0_be_seg_fini (struct m0_be_seg *seg) |
M0_INTERNAL bool | m0_be_seg__invariant (const struct m0_be_seg *seg) |
bool | m0_be_reg__invariant (const struct m0_be_reg *reg) |
static void | be_seg_madvise (struct m0_be_seg *seg, m0_bcount_t dump_limit, int flag) |
M0_INTERNAL int | m0_be_seg_open (struct m0_be_seg *seg) |
M0_INTERNAL void | m0_be_seg_close (struct m0_be_seg *seg) |
M0_INTERNAL bool | m0_be_seg_contains (const struct m0_be_seg *seg, const void *addr) |
M0_INTERNAL bool | m0_be_reg_eq (const struct m0_be_reg *r1, const struct m0_be_reg *r2) |
M0_INTERNAL m0_bindex_t | m0_be_seg_offset (const struct m0_be_seg *seg, const void *addr) |
M0_INTERNAL m0_bindex_t | m0_be_reg_offset (const struct m0_be_reg *reg) |
M0_INTERNAL m0_bcount_t | m0_be_seg_reserved (const struct m0_be_seg *seg) |
M0_INTERNAL struct m0_be_allocator * | m0_be_seg_allocator (struct m0_be_seg *seg) |
static int | be_seg_io (struct m0_be_reg *reg, void *ptr, enum m0_stob_io_opcode opcode) |
M0_INTERNAL int | m0_be_seg__read (struct m0_be_reg *reg, void *dst) |
M0_INTERNAL int | m0_be_seg__write (struct m0_be_reg *reg, void *src) |
M0_INTERNAL int | m0_be_reg__read (struct m0_be_reg *reg) |
M0_INTERNAL int | m0_be_reg__write (struct m0_be_reg *reg) |
M0_INTERNAL unsigned long | m0_be_reg_gen_idx (const struct m0_be_reg *reg) |
M0_INTERNAL bool | m0_be_seg_contains_stob (struct m0_be_seg *seg, const struct m0_stob_id *stob_id) |
void | m0_be_0type_register (struct m0_be_domain *dom, struct m0_be_0type *zt) |
void | m0_be_0type_unregister (struct m0_be_domain *dom, struct m0_be_0type *zt) |
void | m0_be_0type_del_credit (struct m0_be_domain *dom, const struct m0_be_0type *zt, const char *suffix, struct m0_be_tx_credit *credit) |
void | m0_be_0type_add_credit (struct m0_be_domain *dom, const struct m0_be_0type *zt, const char *suffix, const struct m0_buf *data, struct m0_be_tx_credit *credit) |
int | m0_be_0type_add (struct m0_be_0type *zt, struct m0_be_domain *dom, struct m0_be_tx *tx, const char *suffix, const struct m0_buf *data) |
int | m0_be_0type_del (struct m0_be_0type *zt, struct m0_be_domain *dom, struct m0_be_tx *tx, const char *suffix) |
M0_BE_LIST_DESCR_DEFINE (be_seg_dict, "be_seg_dict", static, struct be_seg_dict_keyval, dkv_link, dkv_magic, M0_BE_SEG_DICT_MAGIC, M0_BE_SEG_DICT_HEAD_MAGIC) | |
M0_BE_LIST_DEFINE (be_seg_dict, static, struct be_seg_dict_keyval) | |
static struct m0_be_list * | be_seg_dict_get (const struct m0_be_seg *seg) |
static void | be_seg_dict_kv_get (const struct be_seg_dict_keyval *kv) |
static void | be_seg_dict_kv_put (const struct be_seg_dict_keyval *kv) |
static struct be_seg_dict_keyval * | be_seg_dict_find (struct m0_be_seg *seg, const char *user_key, bool(*compare)(const char *dict_key, const char *user_key)) |
static bool | be_seg_dict_kv_eq (const char *dict_key, const char *user_key) |
M0_INTERNAL void | m0_be_seg_dict_insert_credit (struct m0_be_seg *seg, const char *name, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_seg_dict_delete_credit (struct m0_be_seg *seg, const char *name, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_seg_dict_create_credit (struct m0_be_seg *seg, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_seg_dict_destroy_credit (struct m0_be_seg *seg, struct m0_be_tx_credit *accum) |
M0_INTERNAL void | m0_be_seg_dict_init (struct m0_be_seg *seg) |
M0_INTERNAL void | m0_be_seg_dict_fini (struct m0_be_seg *seg) |
M0_INTERNAL int | m0_be_seg_dict_lookup (struct m0_be_seg *seg, const char *name, void **out) |
static bool | be_seg_dict_kv_begin (const char *dict_key, const char *user_key) |
static bool | be_seg_dict_kv_next (const char *dict_key, const char *user_key) |
static int | be_seg_dict_iterate (struct m0_be_seg *seg, const char *prefix, const char *start_key, const char **this_key, void **this_rec, bool(*compare)(const char *dict_key, const char *user_key)) |
M0_INTERNAL int | m0_be_seg_dict_begin (struct m0_be_seg *seg, const char *start_key, const char **this_key, void **this_rec) |
M0_INTERNAL int | m0_be_seg_dict_next (struct m0_be_seg *seg, const char *prefix, const char *start_key, const char **this_key, void **this_rec) |
M0_INTERNAL int | m0_be_seg_dict_insert (struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name, void *value) |
M0_INTERNAL int | m0_be_seg_dict_delete (struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name) |
M0_INTERNAL void | m0_be_seg_dict_create (struct m0_be_seg *seg, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_seg_dict_destroy (struct m0_be_seg *seg, struct m0_be_tx *tx) |
M0_TL_DESCR_DECLARE (ad_domains, M0_EXTERN) | |
M0_TL_DECLARE (ad_domains, M0_EXTERN, struct ad_domain_map) | |
static int | init (void) |
static void | fini (void) |
static int | scan (struct scanner *s) |
static void | stats_print (void) |
static int | parse (struct scanner *s) |
static int | get (struct scanner *s, void *buf, size_t nob) |
static int | getat (struct scanner *s, off_t off, void *buf, size_t nob) |
static int | deref (struct scanner *s, const void *addr, void *buf, size_t nob) |
static int | recdo (struct scanner *s, const struct m0_format_tag *tag, struct rectype *rt) |
static const char * | recname (const struct rectype *rt) |
static const char * | bname (const struct btype *bt) |
static int | btree (struct scanner *s, struct rectype *r, char *buf) |
static int | bnode (struct scanner *s, struct rectype *r, char *buf) |
static int | seghdr (struct scanner *s, struct rectype *r, char *buf) |
static void * | scanner_action (size_t len, enum action_opcode opc, const struct action_ops *ops) |
static void | genadd (uint64_t gen) |
static void | generation_id_print (uint64_t gen) |
static void | generation_id_get (FILE *fp, uint64_t *gen_id) |
static int | generation_id_verify (struct scanner *s, uint64_t gen) |
static void | seg_get (FILE *fp, struct m0_be_seg *out) |
static int | scanner_cache_init (struct scanner *s) |
static int | scanner_init (struct scanner *s) |
static void | scanner_fini (struct scanner *s) |
static int | builder_init (struct builder *b) |
static void | builder_fini (struct builder *b) |
static void | ad_dom_fini (struct builder *b) |
static void | builder_thread (struct builder *b) |
static void | be_cfg_default_init (struct m0_be_domain_cfg *dom_cfg, struct m0_be_tx_bulk_cfg *tb_cfg) |
static int | format_header_verify (const struct m0_format_header *h, uint16_t rtype) |
static bool | btree_node_pre_is_valid (const struct m0_be_bnode *node, struct scanner *s) |
static bool | btree_node_post_is_valid (const struct m0_be_bnode *node, const struct m0_be_btree_kv_ops *ops) |
static bool | btree_kv_is_valid (struct m0_be_bnode *node, int index, struct m0_buf *key) |
static void | btree_bad_kv_count_update (uint64_t type, int count) |
static void * | builder_action (struct builder *b, size_t len, enum action_opcode opc, const struct action_ops *ops) |
static bool | fid_without_type_eq (const struct m0_fid *fid0, const struct m0_fid *fid1) |
static struct cache_slot * | cache_lookup (struct cache *c, struct m0_fid *fid) |
static struct cache_slot * | cache_insert (struct cache *c, const struct m0_fid *fid) |
static void | qinit (struct queue *q, uint64_t maxnr) |
static void | qfini (struct queue *q) |
static void | qput (struct queue *q, struct action *act) |
static struct action * | qget (struct queue *q) |
static struct action * | qtry (struct queue *q) |
static struct action * | qpeek (struct queue *q) |
static bool | isqempty (struct queue *q) |
static int | ctg_proc (struct scanner *s, struct btype *b, struct m0_be_bnode *node, off_t node_offset) |
static int | ctg_pver_fid_get (struct m0_fid *fid) |
static void | test (void) |
static int | cob_proc (struct scanner *s, struct btype *b, struct m0_be_bnode *node, off_t node_offset) |
static int | emap_proc (struct scanner *s, struct btype *b, struct m0_be_bnode *node, off_t node_offset) |
static int | emap_prep (struct action *act, struct m0_be_tx_credit *cred) |
static void | emap_act (struct action *act, struct m0_be_tx *tx) |
static void | emap_fini (struct action *act) |
static int | emap_kv_get (struct scanner *s, const struct be_btree_key_val *kv, struct m0_buf *key_buf, struct m0_buf *val_buf) |
static void | sig_handler (int num) |
static int | be_cfg_from_yaml_update (const char *yaml_file, struct m0_be_domain_cfg *cfg) |
static int | nv_scan_offset_init (uint64_t workers_nr, uint64_t partitions_nr) |
static void | nv_scan_offset_fini (void) |
static off_t | nv_scan_offset_get (off_t snapshot_size) |
static void | nv_scan_offset_update (void) |
static void | scanner_thread (struct scanner *s) |
M0_BASSERT (ARRAY_SIZE(rt)==M0_FORMAT_TYPE_NR+1) | |
int | main (int argc, char **argv) |
static bool | seg_hdr_get (FILE *fp, struct m0_be_seg_hdr *out) |
static int | btree_check (struct scanner *s, struct rectype *r, char *buf) |
static int | bnode_check (struct scanner *s, struct rectype *r, char *buf) |
static struct m0_stob_ad_domain * | emap_dom_find (const struct action *act, const struct m0_fid *emap_fid, int *lockid) |
static void | emap_to_gob_convert (const struct m0_uint128 *emap_prefix, struct m0_fid *out) |
static int | emap_entry_lookup (struct m0_stob_ad_domain *adom, struct m0_uint128 prefix, m0_bindex_t offset, struct m0_be_emap_cursor *it) |
static int | seghdr_ver (struct scanner *s, struct rectype *r, char *buf) |
static int | seghdr_check (struct scanner *s, struct rectype *r, char *buf) |
static void | builder_do (struct m0_be_tx_bulk *tb, struct m0_be_tx *tx, struct m0_be_op *op, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | builder_done (struct m0_be_tx_bulk *tb, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | builder_work_put (struct m0_be_tx_bulk *tb, struct builder *b) |
static int | ad_dom_init (struct builder *b) |
static void | be_cfg_update (struct m0_be_domain_cfg *cfg, const char *str_key, const char *str_value) |
static bool | btree_kv_post_is_valid (struct scanner *s, struct m0_buf *key, struct m0_buf *val) |
static int | ctg_k_get (struct scanner *s, const void *addr, struct m0_buf *kbuf) |
static int | ctg_v_get (struct scanner *s, const void *addr, struct m0_buf *vbuf) |
static int | ctg_btree_fid_get (struct m0_buf *kbuf, struct m0_fid *fid) |
static struct cache_slot * | ctg_getslot_insertcred (struct ctg_action *ca, struct builder *b, struct m0_fid *cas_ctg_fid, struct m0_be_tx_credit *accum) |
static int | ctg_prep (struct action *act, struct m0_be_tx_credit *accum) |
static struct m0_cas_ctg * | ctg_create_meta (struct ctg_action *ca, struct m0_be_tx *tx) |
static void | ctg_act (struct action *act, struct m0_be_tx *tx) |
static void | ctg_fini (struct action *act) |
static bool | qinvariant (const struct queue *q) |
static int | cob_kv_get (struct scanner *s, const struct be_btree_key_val *kv, struct m0_buf *key, struct m0_buf *val) |
static int | cob_prep (struct action *act, struct m0_be_tx_credit *accum) |
static void | cob_act (struct action *act, struct m0_be_tx *tx) |
static void | cob_fini (struct action *act) |
static int | noop_prep (struct action *act, struct m0_be_tx_credit *cred) |
static void | noop_act (struct action *act, struct m0_be_tx *tx) |
static void | noop_fini (struct action *act) |
static void | test_queue (void) |
void | m0_betool_m0_init (void) |
void | m0_betool_m0_fini (void) |
M0_TL_DESCR_DECLARE (zt, M0_EXTERN) | |
M0_TL_DEFINE (zt, M0_EXTERN, struct m0_be_0type) | |
void | track_cob_btrees (struct m0_cob_domain *cdom, bool print_btree) |
void | track_ad_btrees (struct stob_ad_0type_rec *rec, bool print_btree) |
static void | scan_btree (struct m0_be_domain *dom, bool print_btree) |
static void | be_recovery_run (char *path) |
static int | be_log_resize (char *path, uint64_t size) |
static void | scan (char *path, char *what) |
int | main (int argc, char *argv[]) |
int | m0_betool_st_mkfs (void) |
static void | betool_st_data_check (struct m0_be_ut_backend *ut_be, struct m0_be_seg *seg, uint64_t *fill) |
M0_BASSERT (ARRAY_SIZE(betool_st_event_descr)==BETOOL_ST_TIME_NR) | |
static void | betool_st_event_time (m0_time_t *time, enum betool_st_event event) |
static void | betool_st_event_time_print (m0_time_t *time, const char *info, uint64_t fill) |
static void | betool_st_data_write (struct m0_be_ut_backend *ut_be, struct m0_be_seg *seg, uint64_t fill, uint64_t fill_end) |
int | m0_betool_st_run (void) |
static bool | be_tx_state_invariant (const struct m0_sm *mach) |
static bool | be_tx_is_locked (const struct m0_be_tx *tx) |
static void | be_tx_state_move_ast (struct m0_be_tx *tx, enum m0_be_tx_state state) |
static void | be_tx_ast_cb (struct m0_sm_group *sm_group, struct m0_sm_ast *ast) |
static struct m0_sm_ast * | be_tx_ast (struct m0_be_tx *tx, enum m0_be_tx_state state) |
static void | be_tx_state_move (struct m0_be_tx *tx, enum m0_be_tx_state state, int rc) |
M0_INTERNAL void | m0_be_tx_init (struct m0_be_tx *tx, uint64_t tid, struct m0_be_domain *dom, struct m0_sm_group *sm_group, m0_be_tx_cb_t persistent, m0_be_tx_cb_t discarded, void(*filler)(struct m0_be_tx *tx, void *payload), void *datum) |
M0_INTERNAL void | m0_be_tx_fini (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_prep (struct m0_be_tx *tx, const struct m0_be_tx_credit *credit) |
M0_INTERNAL void | m0_be_tx_payload_prep (struct m0_be_tx *tx, m0_bcount_t size) |
M0_INTERNAL void | m0_be_tx_open (struct m0_be_tx *tx) |
static void | be_tx_make_reg_d (struct m0_be_tx *tx, struct m0_be_reg_d *rd, const struct m0_be_reg *reg) |
M0_INTERNAL void | m0_be_tx_capture (struct m0_be_tx *tx, const struct m0_be_reg *reg) |
M0_INTERNAL void | m0_be_tx_uncapture (struct m0_be_tx *tx, const struct m0_be_reg *reg) |
static void | addb2_add_tx_attrs (const struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_close (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_get (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_put (struct m0_be_tx *tx) |
M0_INTERNAL int | m0_be_tx_timedwait (struct m0_be_tx *tx, uint64_t states, m0_time_t deadline) |
M0_INTERNAL enum m0_be_tx_state | m0_be_tx_state (const struct m0_be_tx *tx) |
M0_INTERNAL const char * | m0_be_tx_state_name (enum m0_be_tx_state state) |
static int | be_tx_memory_allocate (struct m0_be_tx *tx) |
static void | be_tx_gc (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx__state_post (struct m0_be_tx *tx, enum m0_be_tx_state state) |
M0_INTERNAL bool | m0_be_tx__invariant (const struct m0_be_tx *tx) |
M0_INTERNAL struct m0_be_reg_area * | m0_be_tx__reg_area (struct m0_be_tx *tx) |
M0_INTERNAL int | m0_be_tx_open_sync (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_exclusive_open (struct m0_be_tx *tx) |
M0_INTERNAL int | m0_be_tx_exclusive_open_sync (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_close_sync (struct m0_be_tx *tx) |
M0_INTERNAL bool | m0_be_tx__is_fast (struct m0_be_tx *tx) |
M0_INTERNAL int | m0_be_tx_fol_add (struct m0_be_tx *tx, struct m0_fol_rec *rec) |
M0_INTERNAL void | m0_be_tx_force (struct m0_be_tx *tx) |
M0_INTERNAL bool | m0_be_tx__is_exclusive (const struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx__recovering_set (struct m0_be_tx *tx) |
M0_INTERNAL bool | m0_be_tx__is_recovering (struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_deconstruct (struct m0_be_tx *tx, struct m0_be_fmt_tx *ftx) |
M0_INTERNAL void | m0_be_tx_reconstruct (struct m0_be_tx *tx, const struct m0_be_fmt_tx *ftx) |
M0_INTERNAL void | m0_be_tx__group_assign (struct m0_be_tx *tx, struct m0_be_tx_group *gr) |
static bool | be_should_break (struct m0_be_engine *eng, uint64_t fraction, const struct m0_be_tx_credit *accum, const struct m0_be_tx_credit *delta) |
M0_INTERNAL bool | m0_be_should_break (struct m0_be_engine *eng, const struct m0_be_tx_credit *accum, const struct m0_be_tx_credit *delta) |
M0_INTERNAL bool | m0_be_should_break_half (struct m0_be_engine *eng, const struct m0_be_tx_credit *accum, const struct m0_be_tx_credit *delta) |
M0_INTERNAL void | m0_be_tx_gc_enable (struct m0_be_tx *tx, void(*gc_free)(struct m0_be_tx *, void *param), void *param) |
M0_INTERNAL void | m0_be_tx_lsn_set (struct m0_be_tx *tx, m0_bindex_t lsn, m0_bindex_t lsn_discarded) |
M0_INTERNAL void | m0_be_tx_lsn_get (struct m0_be_tx *tx, m0_bindex_t *lsn, m0_bindex_t *lsn_discarded) |
M0_INTERNAL int | m0_be_tx_mod_init (void) |
M0_INTERNAL void | m0_be_tx_mod_fini (void) |
struct m0_be_tx_remid | M0_XCA_DOMAIN (be|rpc) |
M0_INTERNAL bool | m0_be_tx_should_break (struct m0_be_tx *tx, const struct m0_be_tx_credit *c) |
static void | be_tx_bulk_finish_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static void | be_tx_bulk_queue_get_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static void | be_tx_bulk_init_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static bool | be_tx_bulk_open_cb (struct m0_clink *clink) |
static void | be_tx_bulk_close_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast) |
static void | be_tx_bulk_gc_cb (struct m0_be_tx *tx, void *param) |
static void | be_tx_bulk_queue_get_done_cb (struct m0_be_op *op, void *param) |
M0_INTERNAL int | m0_be_tx_bulk_init (struct m0_be_tx_bulk *tb, struct m0_be_tx_bulk_cfg *tb_cfg) |
M0_INTERNAL void | m0_be_tx_bulk_fini (struct m0_be_tx_bulk *tb) |
static void | be_tx_bulk_lock (struct m0_be_tx_bulk *tb) |
static void | be_tx_bulk_unlock (struct m0_be_tx_bulk *tb) |
static void | be_tx_bulk_queues_drain (struct m0_be_tx_bulk *tb) |
static void | be_tx_bulk_open (struct be_tx_bulk_worker *worker, struct m0_be_tx_credit *cred, m0_bcount_t cred_payload) |
M0_INTERNAL void | m0_be_tx_bulk_run (struct m0_be_tx_bulk *tb, struct m0_be_op *op) |
M0_INTERNAL bool | m0_be_tx_bulk_put (struct m0_be_tx_bulk *tb, struct m0_be_op *op, struct m0_be_tx_credit *credit, m0_bcount_t payload_credit, uint64_t partition, void *user) |
M0_INTERNAL void | m0_be_tx_bulk_end (struct m0_be_tx_bulk *tb) |
M0_INTERNAL int | m0_be_tx_bulk_status (struct m0_be_tx_bulk *tb) |
M0_INTERNAL void | m0_be_tx_credit_add (struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_INTERNAL void | m0_be_tx_credit_sub (struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_INTERNAL void | m0_be_tx_credit_mul (struct m0_be_tx_credit *c, m0_bcount_t k) |
M0_INTERNAL void | m0_be_tx_credit_mul_bp (struct m0_be_tx_credit *c, unsigned bp) |
M0_INTERNAL void | m0_be_tx_credit_mac (struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c1, m0_bcount_t k) |
M0_INTERNAL bool | m0_be_tx_credit_le (const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_INTERNAL bool | m0_be_tx_credit_eq (const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_INTERNAL void | m0_be_tx_credit_max (struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_INTERNAL void | m0_be_tx_credit_add_max (struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1) |
M0_TL_DESCR_DEFINE (rtxs, "m0_be_tx_group::tg_txs_recovering", static, struct be_recovering_tx, rtx_link, rtx_magic, M0_BE_TX_MAGIC, M0_BE_TX_GROUP_MAGIC) | |
M0_TL_DEFINE (rtxs, static, struct be_recovering_tx) | |
M0_TL_DESCR_DEFINE (grp, "m0_be_tx_group::tg_txs", M0_INTERNAL, struct m0_be_tx, t_group_linkage, t_magic, M0_BE_TX_MAGIC, M0_BE_TX_GROUP_MAGIC) | |
M0_TL_DEFINE (grp, M0_INTERNAL, struct m0_be_tx) | |
M0_INTERNAL void | m0_be_tx_group_stable (struct m0_be_tx_group *gr) |
M0_INTERNAL struct m0_sm_group * | m0_be_tx_group__sm_group (struct m0_be_tx_group *gr) |
M0_INTERNAL bool | m0_be_tx_group_is_recovering (struct m0_be_tx_group *gr) |
static void | be_tx_group_reg_area_gather (struct m0_be_tx_group *gr) |
static void | be_tx_group_payload_gather (struct m0_be_tx_group *gr) |
static void | be_tx_group_deconstruct (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_close (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_reset (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_prepare (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL int | m0_be_tx_group_init (struct m0_be_tx_group *gr, struct m0_be_tx_group_cfg *gr_cfg) |
M0_INTERNAL bool | m0_be_tx_group__invariant (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_fini (struct m0_be_tx_group *gr) |
static void | be_tx_group_tx_to_gr_map (const struct m0_be_tx *tx, const struct m0_be_tx_group *gr) |
static void | be_tx_group_tx_add (struct m0_be_tx_group *gr, struct m0_be_tx *tx) |
M0_INTERNAL int | m0_be_tx_group_tx_add (struct m0_be_tx_group *gr, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_group_tx_closed (struct m0_be_tx_group *gr, struct m0_be_tx *tx) |
M0_INTERNAL void | m0_be_tx_group_tx_del (struct m0_be_tx_group *gr, struct m0_be_tx *tx) |
M0_INTERNAL size_t | m0_be_tx_group_tx_nr (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_open (struct m0_be_tx_group *gr) |
M0_INTERNAL int | m0_be_tx_group_start (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_stop (struct m0_be_tx_group *gr) |
M0_INTERNAL int | m0_be_tx_group__allocate (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group__deallocate (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_seg_place_prepare (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_seg_place (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_tx_group_encode (struct m0_be_tx_group *gr) |
M0_INTERNAL void | m0_be_tx_group_log_write (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_tx_group__tx_state_post (struct m0_be_tx_group *gr, enum m0_be_tx_state state, bool del_tx_from_group) |
M0_INTERNAL void | m0_be_tx_group_recovery_prepare (struct m0_be_tx_group *gr, struct m0_be_log *log) |
M0_INTERNAL void | m0_be_tx_group_log_read (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL int | m0_be_tx_group_decode (struct m0_be_tx_group *gr) |
static void | be_tx_group_reconstruct_reg_area (struct m0_be_tx_group *gr) |
static struct be_recovering_tx * | tx2tx_group_recovering_tx (struct m0_be_tx *tx) |
static bool | be_tx_group_recovering_tx_open (struct m0_clink *clink) |
static void | be_tx_group_recovering_gc (struct m0_be_tx *tx, void *param) |
static void | be_tx_group_reconstruct_transactions (struct m0_be_tx_group *gr, struct m0_sm_group *sm_grp) |
M0_INTERNAL int | m0_be_tx_group_reconstruct (struct m0_be_tx_group *gr, struct m0_sm_group *sm_grp) |
M0_INTERNAL void | m0_be_tx_group_reconstruct_tx_open (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_tx_group_reconstruct_tx_close (struct m0_be_tx_group *gr, struct m0_be_op *op_gc) |
M0_INTERNAL int | m0_be_tx_group_reapply (struct m0_be_tx_group *gr, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_tx_group_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_tx_group_seg_io_credit (struct m0_be_tx_group_cfg *gr_cfg, struct m0_be_io_credit *io_cred) |
M0_TL_DESCR_DECLARE (grp, M0_EXTERN) | |
M0_TL_DECLARE (grp, M0_INTERNAL, struct m0_be_tx) | |
static struct m0_be_tx_group_fom * | fom2tx_group_fom (const struct m0_fom *fom) |
static void | tx_group_fom_fini (struct m0_fom *fom) |
static int | tx_group_fom_tick (struct m0_fom *fom) |
static size_t | tx_group_fom_locality (const struct m0_fom *fom) |
static void | be_tx_group_fom_handle (struct m0_sm_group *gr, struct m0_sm_ast *ast) |
static void | be_tx_group_fom_iff_waiting_wakeup (struct m0_fom *fom) |
static void | be_tx_group_fom_stable (struct m0_sm_group *_, struct m0_sm_ast *ast) |
static void | be_tx_group_fom_stop (struct m0_sm_group *gr, struct m0_sm_ast *ast) |
M0_INTERNAL void | m0_be_tx_group_fom_init (struct m0_be_tx_group_fom *m, struct m0_be_tx_group *gr, struct m0_reqh *reqh) |
M0_INTERNAL void | m0_be_tx_group_fom_fini (struct m0_be_tx_group_fom *m) |
M0_INTERNAL void | m0_be_tx_group_fom_reset (struct m0_be_tx_group_fom *m) |
static void | be_tx_group_fom_ast_post (struct m0_be_tx_group_fom *gf, struct m0_sm_ast *ast) |
M0_INTERNAL int | m0_be_tx_group_fom_start (struct m0_be_tx_group_fom *gf) |
M0_INTERNAL void | m0_be_tx_group_fom_stop (struct m0_be_tx_group_fom *gf) |
M0_INTERNAL void | m0_be_tx_group_fom_handle (struct m0_be_tx_group_fom *m) |
M0_INTERNAL void | m0_be_tx_group_fom_stable (struct m0_be_tx_group_fom *gf) |
M0_INTERNAL struct m0_sm_group * | m0_be_tx_group_fom__sm_group (struct m0_be_tx_group_fom *m) |
M0_INTERNAL void | m0_be_tx_group_fom_recovery_prepare (struct m0_be_tx_group_fom *m) |
M0_INTERNAL void | m0_be_tx_group_fom_mod_init (void) |
M0_INTERNAL void | m0_be_tx_group_fom_mod_fini (void) |
static struct m0_be_group_format * | be_group_format_module2gft (struct m0_module *module) |
static int | be_group_format_level_enter (struct m0_module *module) |
static void | be_group_format_level_leave (struct m0_module *module) |
M0_INTERNAL void | m0_be_group_format_reset (struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_module_setup (struct m0_be_group_format *gft, struct m0_be_group_format_cfg *gft_cfg) |
static void | be_group_format_module_fini (struct m0_be_group_format *gft, bool deallocate) |
static int | be_group_format_module_init (struct m0_be_group_format *gft, struct m0_be_group_format_cfg *gft_cfg, bool allocate) |
M0_INTERNAL int | m0_be_group_format_init (struct m0_be_group_format *gft, struct m0_be_group_format_cfg *gft_cfg, struct m0_be_tx_group *group, struct m0_be_log *log) |
M0_INTERNAL void | m0_be_group_format_fini (struct m0_be_group_format *gft) |
M0_INTERNAL bool | m0_be_group_format__invariant (struct m0_be_group_format *go) |
M0_INTERNAL int | m0_be_group_format_allocate (struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_deallocate (struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_prepare (struct m0_be_group_format *gft, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_group_format_encode (struct m0_be_group_format *gft) |
M0_INTERNAL int | m0_be_group_format_decode (struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_reg_log_add (struct m0_be_group_format *gft, const struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_group_format_reg_seg_add (struct m0_be_group_format *gft, const struct m0_be_reg_d *rd) |
M0_INTERNAL uint32_t | m0_be_group_format_reg_nr (const struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_reg_get (const struct m0_be_group_format *gft, uint32_t index, struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_group_format_tx_add (struct m0_be_group_format *gft, struct m0_be_fmt_tx *ftx) |
M0_INTERNAL uint32_t | m0_be_group_format_tx_nr (const struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_tx_get (const struct m0_be_group_format *gft, uint32_t index, struct m0_be_fmt_tx *ftx) |
M0_INTERNAL struct m0_be_fmt_group_info * | m0_be_group_format_group_info (struct m0_be_group_format *gft) |
M0_INTERNAL m0_bcount_t | m0_be_group_format_log_reserved_size (struct m0_be_log *log, struct m0_be_tx_credit *cred, m0_bcount_t cred_payload) |
M0_INTERNAL m0_bindex_t | m0_be_group_format_log_position (const struct m0_be_group_format *gft) |
M0_INTERNAL m0_bindex_t | m0_be_group_format_log_discarded (const struct m0_be_group_format *gft) |
M0_INTERNAL void | m0_be_group_format_log_use (struct m0_be_group_format *gft, m0_bcount_t size_reserved) |
M0_INTERNAL void | m0_be_group_format_recovery_prepare (struct m0_be_group_format *gft, struct m0_be_log *log) |
M0_INTERNAL void | m0_be_group_format_log_write (struct m0_be_group_format *gft, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_group_format_log_read (struct m0_be_group_format *gft, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_group_format_seg_place_prepare (struct m0_be_group_format *gft) |
static void | be_tx_group_format_seg_io_starting (struct m0_be_op *op, void *param) |
static void | be_tx_group_format_seg_io_finished (struct m0_be_op *op, void *param) |
static void | be_tx_group_format_seg_io_op_gc (struct m0_be_op *op, void *param) |
M0_INTERNAL void | m0_be_group_format_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
M0_INTERNAL void | m0_be_group_format_seg_place (struct m0_be_group_format *gft, struct m0_be_op *op) |
M0_INTERNAL void | m0_be_group_format_seg_io_credit (struct m0_be_group_format_cfg *gft_cfg, struct m0_be_io_credit *io_cred) |
M0_INTERNAL bool | m0_be_reg_d__invariant (const struct m0_be_reg_d *rd) |
M0_INTERNAL bool | m0_be_reg_d_is_in (const struct m0_be_reg_d *rd, void *ptr) |
static bool | be_reg_d_are_overlapping (const struct m0_be_reg_d *rd1, const struct m0_be_reg_d *rd2) |
static bool | be_reg_d_is_partof (const struct m0_be_reg_d *super, const struct m0_be_reg_d *sub) |
static void * | be_reg_d_fb (const struct m0_be_reg_d *rd) |
static void * | be_reg_d_fb1 (const struct m0_be_reg_d *rd) |
static void * | be_reg_d_lb (const struct m0_be_reg_d *rd) |
static void * | be_reg_d_lb1 (const struct m0_be_reg_d *rd) |
static m0_bcount_t | be_reg_d_size (const struct m0_be_reg_d *rd) |
static void | be_reg_d_sub_make (struct m0_be_reg_d *super, struct m0_be_reg_d *sub) |
static void | be_reg_d_arr_insert2 (void *arr[2], void *value) |
static void | be_reg_d_arr_first_subreg (struct m0_be_reg_d **rd_arr, int nr, void *start, void **addr, m0_bcount_t *size) |
static bool | be_rdt_contains (const struct m0_be_reg_d_tree *rdt, const struct m0_be_reg_d *rd) |
M0_INTERNAL int | m0_be_rdt_init (struct m0_be_reg_d_tree *rdt, size_t size_max) |
M0_INTERNAL void | m0_be_rdt_fini (struct m0_be_reg_d_tree *rdt) |
M0_INTERNAL bool | m0_be_rdt__invariant (const struct m0_be_reg_d_tree *rdt) |
M0_INTERNAL size_t | m0_be_rdt_size (const struct m0_be_reg_d_tree *rdt) |
static bool | be_rdt_check_i (const struct m0_be_reg_d_tree *rdt, void *addr, size_t index) |
static size_t | be_rdt_find_i (const struct m0_be_reg_d_tree *rdt, void *addr) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_rdt_find (const struct m0_be_reg_d_tree *rdt, void *addr) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_rdt_next (const struct m0_be_reg_d_tree *rdt, struct m0_be_reg_d *prev) |
M0_INTERNAL void | m0_be_rdt_ins (struct m0_be_reg_d_tree *rdt, const struct m0_be_reg_d *rd) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_rdt_del (struct m0_be_reg_d_tree *rdt, const struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_rdt_reset (struct m0_be_reg_d_tree *rdt) |
M0_INTERNAL int | m0_be_regmap_init (struct m0_be_regmap *rm, const struct m0_be_regmap_ops *ops, void *ops_data, size_t size_max, bool split_on_absorb) |
M0_INTERNAL void | m0_be_regmap_fini (struct m0_be_regmap *rm) |
M0_INTERNAL bool | m0_be_regmap__invariant (const struct m0_be_regmap *rm) |
static struct m0_be_reg_d * | be_regmap_find_fb (struct m0_be_regmap *rm, const struct m0_be_reg_d *rd) |
static void | be_regmap_reg_d_cut (struct m0_be_regmap *rm, struct m0_be_reg_d *rd, m0_bcount_t cut_start, m0_bcount_t cut_end) |
static void | be_regmap_reg_d_split (struct m0_be_regmap *rm, struct m0_be_reg_d *rdi, struct m0_be_reg_d *rd, struct m0_be_reg_d *rd_new) |
M0_INTERNAL void | m0_be_regmap_add (struct m0_be_regmap *rm, struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_regmap_del (struct m0_be_regmap *rm, const struct m0_be_reg_d *rd) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_regmap_first (struct m0_be_regmap *rm) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_regmap_next (struct m0_be_regmap *rm, struct m0_be_reg_d *prev) |
M0_INTERNAL size_t | m0_be_regmap_size (const struct m0_be_regmap *rm) |
M0_INTERNAL void | m0_be_regmap_reset (struct m0_be_regmap *rm) |
M0_INTERNAL int | m0_be_reg_area_init (struct m0_be_reg_area *ra, const struct m0_be_tx_credit *prepared, enum m0_be_reg_area_type type) |
M0_INTERNAL void | m0_be_reg_area_fini (struct m0_be_reg_area *ra) |
M0_INTERNAL bool | m0_be_reg_area__invariant (const struct m0_be_reg_area *ra) |
M0_INTERNAL void | m0_be_reg_area_used (struct m0_be_reg_area *ra, struct m0_be_tx_credit *used) |
M0_INTERNAL void | m0_be_reg_area_prepared (struct m0_be_reg_area *ra, struct m0_be_tx_credit *prepared) |
M0_INTERNAL void | m0_be_reg_area_captured (struct m0_be_reg_area *ra, struct m0_be_tx_credit *captured) |
static void | be_reg_d_cpy (void *dst, const struct m0_be_reg_d *rd) |
static void * | be_reg_area_alloc (struct m0_be_reg_area *ra, m0_bcount_t size) |
static void | be_reg_area_add_copy (void *data, struct m0_be_reg_d *rd) |
static void | be_reg_area_add (void *data, struct m0_be_reg_d *rd) |
static void | be_reg_area_del (void *data, const struct m0_be_reg_d *rd) |
static void | be_reg_area_cpy_copy (void *data, const struct m0_be_reg_d *super, const struct m0_be_reg_d *rd) |
static void | be_reg_area_cpy (void *data, const struct m0_be_reg_d *super, const struct m0_be_reg_d *rd) |
static void | be_reg_area_cut (void *data, struct m0_be_reg_d *rd, m0_bcount_t cut_at_start, m0_bcount_t cut_at_end) |
static void | be_reg_area_split (void *data, struct m0_be_reg_d *rd, struct m0_be_reg_d *rd_new) |
M0_INTERNAL void | m0_be_reg_area_capture (struct m0_be_reg_area *ra, struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_reg_area_uncapture (struct m0_be_reg_area *ra, const struct m0_be_reg_d *rd) |
M0_INTERNAL void | m0_be_reg_area_merge_in (struct m0_be_reg_area *ra, struct m0_be_reg_area *src) |
M0_INTERNAL void | m0_be_reg_area_reset (struct m0_be_reg_area *ra) |
M0_INTERNAL void | m0_be_reg_area_optimize (struct m0_be_reg_area *ra) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_reg_area_first (struct m0_be_reg_area *ra) |
M0_INTERNAL struct m0_be_reg_d * | m0_be_reg_area_next (struct m0_be_reg_area *ra, struct m0_be_reg_d *prev) |
M0_INTERNAL int | m0_be_reg_area_merger_init (struct m0_be_reg_area_merger *brm, int reg_area_nr_max) |
M0_INTERNAL void | m0_be_reg_area_merger_fini (struct m0_be_reg_area_merger *brm) |
M0_INTERNAL void | m0_be_reg_area_merger_reset (struct m0_be_reg_area_merger *brm) |
M0_INTERNAL void | m0_be_reg_area_merger_add (struct m0_be_reg_area_merger *brm, struct m0_be_reg_area *ra) |
static void | be_reg_area_merger_max_gen_idx (struct m0_be_reg_area_merger *brm, void *addr, m0_bcount_t size, struct m0_be_reg_d *rd_new) |
M0_INTERNAL void | m0_be_reg_area_merger_merge_to (struct m0_be_reg_area_merger *brm, struct m0_be_reg_area *ra) |
static int | txs_allocate (struct m0_reqh_service **out, const struct m0_reqh_service_type *stype) |
M0_INTERNAL int | m0_be_txs_register (void) |
M0_INTERNAL void | m0_be_txs_unregister (void) |
static int | txs_start (struct m0_reqh_service *service) |
static void | txs_stop (struct m0_reqh_service *service) |
static void | txs_fini (struct m0_reqh_service *service) |
M0_INTERNAL int | m0_be_tx_service_init (struct m0_be_engine *en, struct m0_reqh *reqh) |
M0_INTERNAL void | m0_be_tx_service_fini (struct m0_be_engine *en) |
void | m0_be_ut_fmt_log_header (void) |
void | m0_be_ut_fmt_cblock (void) |
static bool | fmt_group_eq (struct m0_be_fmt_group *left, struct m0_be_fmt_group *right) |
static void | be_fmt_group_populate (struct m0_be_fmt_group *group, void *payload, size_t payload_size, size_t TX_NR_MAX, size_t REG_NR_MAX) |
static void | spoil_nr (struct m0_be_ut_fmt_group_test *t, struct m0_buf *b) |
void | m0_be_ut_fmt_group_size_max (void) |
static m0_bcount_t | be_ut_fmt_group_size_max_check (struct m0_be_fmt_group_cfg *fg_cfg, uint64_t *seed) |
static void | be_ut_fmt_group_size_max_test (struct m0_be_fmt_group_cfg *fg_cfg2, uint64_t *seed) |
void | m0_be_ut_fmt_group_size_max_rnd (void) |
void | m0_be_ut_fmt_group (void) |
static void | be_ut_io_sched_io_ready_add (struct be_ut_io_sched_test *test, struct m0_be_io *bio, struct m0_be_op *op) |
static void | be_ut_io_sched_io_ready_get (struct be_ut_io_sched_test *test, struct m0_be_io **bio, struct m0_be_op **op) |
static void | be_ut_io_sched_io_state_add (struct be_ut_io_sched_test *test, struct be_ut_io_sched_io_state *state) |
static void | be_ut_io_sched_io_completion_cb (struct m0_be_op *op, void *param) |
static void | be_ut_io_sched_io_start_cb (struct m0_be_op *op, void *param) |
static void | be_ut_io_sched_thread (void *param) |
static void | be_ut_io_sched_states_check (struct be_ut_io_sched_io_state *states, int states_nr, struct m0_atomic64 *states_pos) |
M0_UT_THREADS_DEFINE (be_ut_io_sched, &be_ut_io_sched_thread) | |
void | m0_be_ut_io_sched (void) |
static void | be_ut_log_discard_usecase_sync (struct m0_be_log_discard *ld, struct m0_be_op *op, struct m0_be_log_discard_item *ldi) |
static void | be_ut_log_discard_usecase_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
void | m0_be_ut_log_discard_usecase (void) |
static void | be_ut_log_discard_gp_sync (struct m0_be_log_discard *ld, struct m0_be_op *op, struct m0_be_log_discard_item *ldi) |
static void | be_ut_log_discard_gp_discard (struct m0_be_log_discard *ld, struct m0_be_log_discard_item *ldi) |
static void | be_ut_log_discard_gp_consume (struct be_ut_log_discard_gp_test *test) |
static void | be_ut_log_discard_gp_produce (struct be_ut_log_discard_gp_test *test) |
static void | be_ut_log_discard_gp_thread (void *param) |
static void | be_ut_log_discard_gp_set (struct be_ut_log_discard_gp_test_item *item, bool is_producer, int index, struct be_ut_log_discard_gp_test *test) |
M0_UT_THREADS_DEFINE (be_ut_log_discard_gp_producers, &be_ut_log_discard_gp_thread) | |
M0_UT_THREADS_DEFINE (be_ut_log_discard_gp_consumers, &be_ut_log_discard_gp_thread) | |
void | m0_be_ut_log_discard_getput (void) |
void | m0_be_ut_op_usecase (void) |
static void | be_ut_op_mt_thread_func (void *param) |
M0_UT_THREADS_DEFINE (be_ut_op_mt, &be_ut_op_mt_thread_func) | |
void | m0_be_ut_op_mt (void) |
void | m0_be_ut_op_set_usecase (void) |
static void | be_ut_op_set_tree_swap (unsigned *a, unsigned *b) |
static void | be_ut_op_set_tree_random_shuffle (unsigned *arr, unsigned nr, bool keep_half_dist_order, uint64_t *seed) |
static void | be_ut_op_set_tree_do (struct m0_be_op *op, struct m0_be_op *child, enum be_ut_op_set_tree_cmd cmd) |
static void | be_ut_op_set_tree_recursive (struct m0_be_op *op, enum be_ut_op_set_tree_cmd cmd, int level, int index, uint64_t *seed) |
void | m0_be_ut_op_set_tree (void) |
static void | be_ut_pd_usecase_thread (void *param) |
M0_UT_THREADS_DEFINE (be_ut_pd_usecase, &be_ut_pd_usecase_thread) | |
void | m0_be_ut_pd_usecase (void) |
static uint64_t | be_ut_queue_data_index (struct be_ut_queue_ctx *ctx, struct be_ut_queue_data *data) |
static void | be_ut_queue_try_peek (struct be_ut_queue_thread_param *param, struct be_ut_queue_ctx *ctx) |
static void | be_ut_queue_thread (void *_param) |
static void | be_ut_queue_with_cfg (struct be_ut_queue_cfg *test_cfg) |
static void | be_ut_queue (enum be_ut_queue_test test) |
void | m0_be_ut_queue_1_1_1 (void) |
void | m0_be_ut_queue_2_1_1 (void) |
void | m0_be_ut_queue_100_1_1 (void) |
void | m0_be_ut_queue_100_1_10 (void) |
void | m0_be_ut_queue_100_10_1 (void) |
void | m0_be_ut_queue_100_10_10 (void) |
void | m0_be_ut_queue_10_100_1 (void) |
void | m0_be_ut_queue_10_100_5 (void) |
void | m0_be_ut_queue_10_1_100 (void) |
void | m0_be_ut_queue_10_5_100 (void) |
void | m0_be_ut_queue_10_100_100 (void) |
void | m0_be_ut_queue_from_1_to_10 (void) |
void | m0_be_ut_tx_usecase_success (void) |
void | m0_be_ut_tx_usecase_failure (void) |
static void | be_ut_tx_test (size_t nr) |
static void | be_ut_tx_alloc_init (void **alloc, struct m0_be_seg *seg) |
static void | be_ut_tx_alloc_fini (void **alloc) |
static void * | be_ut_tx_alloc (void **alloc, m0_bcount_t size) |
void | m0_be_ut_tx_states (void) |
void | m0_be_ut_tx_empty (void) |
void | m0_be_ut_tx_single (void) |
void | m0_be_ut_tx_several (void) |
static void | be_ut_transact (struct be_ut_tx_x *x, struct m0_be_seg *seg, void **alloc) |
static void | be_ut_tx_do_force (struct be_ut_tx_x *xs, size_t nr) |
static void | be_ut_tx_force (size_t nr) |
void | m0_be_ut_tx_force (void) |
static void | be_ut_tx_reg_rand (struct m0_be_reg *reg, struct m0_be_seg *seg, uint64_t *seed) |
static void | be_ut_tx_reg_rand_fill (struct m0_be_reg *reg, uint64_t *seed) |
void | m0_be_ut_tx_persistence (void) |
static bool | be_ut_tx_fast_cb (struct m0_clink *clink) |
static void | be_ut_tx_fast_gc_free (struct m0_be_tx *tx, void *param) |
void | m0_be_ut_tx_fast (void) |
static void | be_ut_tx_run_tx_helper (struct be_ut_tx_thread_state *state, struct m0_be_tx *tx, bool exclusive) |
static void | be_ut_tx_thread (struct be_ut_tx_thread_state *state) |
void | m0_be_ut_tx_concurrent_helper (bool exclusive) |
void | m0_be_ut_tx_concurrent (void) |
void | m0_be_ut_tx_concurrent_excl (void) |
M0_BASSERT (BE_UT_TX_CAPTURING_RANGE >=sizeof(uint64_t)) | |
void | m0_be_ut_tx_capturing (void) |
static bool | be_ut_tx_gc_cb (struct m0_clink *clink) |
static void | be_ut_tx_gc_free (struct m0_be_tx *tx, void *param) |
static void | be_ut_tx_gc_free_tx_failed (struct m0_be_tx *tx, void *param) |
void | m0_be_ut_tx_gc (void) |
static void | be_ut_tx_buf_fill_random (char *data, m0_bcount_t size) |
static void | be_ut_tx_payload_test_nr (struct m0_be_ut_backend *ut_be, struct be_ut_tx_payload_test *test, size_t nr) |
void | m0_be_ut_tx_payload (void) |
static void | be_ut_tx_bulk_test_init (struct be_ut_tx_bulk_be_ctx **be_ctx_out, struct be_ut_tx_bulk_be_cfg *be_cfg, void(*test_prepare)(struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg, void *ptr), void *ptr) |
static void | be_ut_tx_bulk_test_fini (struct be_ut_tx_bulk_be_ctx *be_ctx) |
static void | be_ut_tx_bulk_test_run (struct be_ut_tx_bulk_be_ctx *be_ctx, struct m0_be_tx_bulk_cfg *tb_cfg, void(*test_work_put)(struct m0_be_tx_bulk *tb, bool success, void *ptr), void *ptr, bool success) |
static void | be_ut_tx_bulk_usecase_work_put (struct m0_be_tx_bulk *tb, bool success, void *ptr) |
static void | be_ut_tx_bulk_usecase_do (struct m0_be_tx_bulk *tb, struct m0_be_tx *tx, struct m0_be_op *op, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_usecase_done (struct m0_be_tx_bulk *tb, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_usecase_test_prepare (struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg, void *ptr) |
void | m0_be_ut_tx_bulk_usecase (void) |
static void | be_ut_tx_bulk_state_calc (struct be_ut_tx_bulk_state *tbs, bool calc_cred, struct m0_be_tx_credit *cred, m0_bcount_t *cred_payload) |
static void | be_ut_tx_bulk_state_work_put (struct m0_be_tx_bulk *tb, bool success, void *ptr) |
static void | be_ut_tx_bulk_state_do (struct m0_be_tx_bulk *tb, struct m0_be_tx *tx, struct m0_be_op *op, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_state_done (struct m0_be_tx_bulk *tb, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_state_test_prepare (struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg, void *ptr) |
static void | be_ut_tx_bulk_state_test_run (struct be_ut_tx_bulk_state *tbs, struct be_ut_tx_bulk_be_cfg *be_cfg, bool success) |
void | m0_be_ut_tx_bulk_empty (void) |
void | m0_be_ut_tx_bulk_error_reg (void) |
void | m0_be_ut_tx_bulk_error_payload (void) |
void | m0_be_ut_tx_bulk_large_tx (void) |
void | m0_be_ut_tx_bulk_large_payload (void) |
void | m0_be_ut_tx_bulk_large_all (void) |
void | m0_be_ut_tx_bulk_small_tx (void) |
void | m0_be_ut_tx_bulk_medium_tx (void) |
void | m0_be_ut_tx_bulk_medium_tx_multi (void) |
void | m0_be_ut_tx_bulk_medium_cred (void) |
void | m0_be_ut_tx_bulk_large_cred (void) |
static void | be_ut_tx_bulk_parallel_test_prepare (struct m0_be_ut_backend *ut_be, struct m0_be_ut_seg *ut_seg, void *ptr) |
static void | be_ut_tx_bulk_parallel_work_put (struct m0_be_tx_bulk *tb, bool success, void *ptr) |
static void | be_ut_tx_bulk_parallel_do (struct m0_be_tx_bulk *tb, struct m0_be_tx *tx, struct m0_be_op *op, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_parallel_done (struct m0_be_tx_bulk *tb, void *datum, void *user, uint64_t worker_index, uint64_t partition) |
static void | be_ut_tx_bulk_parallel_thread (void *_param) |
void | m0_be_ut_tx_bulk_parallel_1_15 (void) |
This file contains BE details visible to the user.
Definitions
Interfaces available for BE user
BE domain initialisation
Mkfs mode:
Normal (non-mkfs) mode:
In either case after successful initialisation BE domain is ready to work.
Interface
** There are 3 top-level objects in this file:
** There are 8 functions for each top-level object:
** Encoding
** Decoding
** Encoding with preallocation
Interface is designed to provide encode() and mutator functions to be free of allocations/deallocations.
** General
** Decoding Memory is allocated using m0_alloc() wherever it is needed. There is no optimisation like preallocation.
** Encoding
*** Fixed size structures m0_be_fmt_log_header and m0_be_fmt_cblock have fixed size, so their init() (fini()) functions don't have m0_alloc() (m0_free()) calls.
*** Variable size structures m0_be_fmt_group may have different encoded size depending on number of elements (tx, regions etc.). Memory for maximum number of elements is allocated in init() function.
Design highlights:
m0_be_log_discard is an abstraction to keep seg I/O accounting and to control BE log records discard. m0_be_log_discard_item represents group's m0_be_log_record + seg I/O for the group.
Legend
Highlights
Future directions
Highlights
Future directions
use m0_be_op::bo_rc instead of t_rc, e_rc.
Fair bounded FIFO MPMC queue.
Highlights
Design decisions
Internal queues diagram
* m0_be_queue_put() * | * v * +---+---+---+---+ +---+---+---+---+---+---+ * head | | | | | bq_q | | | | | | | bq_q_unused * +---+---+---+---+ +---+---+---+---+---+---+ * | * v * m0_be_queue_get() * *
* m0_be_queue_put() * | * v * +---+ +---+ * | |<<| | * +---+---+---+---+---+---+---+---+---+---+ +---+ +---+ * | | | | | | | | | | | bq_q | |<<| | * +---+---+---+---+---+---+---+---+---+---+ +---+ +---+ * | ^ ^ * v this one | * m0_be_queue_get() is still | * in bq_q | * | * bq_op_put list * items point to the * items that are in * the put wait list *
Further directions
Transaction engine.
Main abstractions provided by this module are:
- transaction m0_be_tx: is a group of updates to BE segment memory, atomic w.r.t. BE failures. A transaction can update memory within multiple segments in the same m0_be_domain. A BE user creates a transaction and then updates segment memory. After each update, the updated memory is "captured" in the transaction by calling m0_be_tx_capture(); - transaction credit m0_be_tx_credit: an object describing an update to segment memory that a transaction could make. Before a memory update can be captured in a transaction, the transaction should be "prepared" (m0_be_tx_prep()) for all forthcoming captures. This preparation reserves internal transaction resources (log space and memory) to avoid dead-locks; - transaction engine m0_be_tx_engine: is a part of BE domain that contains all transaction related state.
Overview of operation.
When a memory region is captured in a transaction, the contents of this region, i.e., new values placed in the memory by the user, are copied in a transaction-private memory buffer. Eventually the transaction is closed, i.e., the user indicates that no more updates will be captured in the transaction. Closed transactions are collected in "transaction groups" (m0_be_tx_group), which are units of IO. When a group is formed it is written to the log. When log IO for the group completes, transactions from the group are written "in-place", that is, their captured updates are written to the corresponding places in the segment storage. Some time after a transaction is written in-place, it is discarded and the space it uses in the log is reclaimed.
Notes:
- transaction engine implements redo-only WAL (write-ahead logging). There is no way to abort a transaction; - serializibility and concurrency concerns are delegated to a user. Specifically, the user must call m0_be_tx_capture() while the lock, protecting the memory being captured is held. In the current implementation this lock must be held at least until the transaction is closed, in the future this requirement will be weakened; - currently, the transaction engine writes modified memory in place, as described in the "Overview of operation" section. In the future, the transaction engine would leave this task to the (currently non-existing) segment page daemon; - transaction close call (m0_be_tx_close()) does not guarantee transaction persistence. Transaction will become persistent later. The user can set a call-back m0_be_tx::t_persistent() that is called when the transaction becomes persistent; - transactions become persistent in the same order as they close.
tx_bulk is an abstraction that allows user to execute uniform transactions as fast as possible.
Future directions
** Initialisation phase
** Common begin of the loop
** Normal operation (middle of the loop)
** Recovery operation (middle of the loop)
** Common end of the loop
** Finalisation phase
This file contains implementation details of BE features.
Table of contents
Legend: (-) - not implemented; (+) - implemented.
m0_be_fl maintains persistent lists of all free allocator chunks.
There is 3 operations with free lists:
Algorithm.
Time and I/O complexity.
Locks m0_be_fl doesn't have any locks. User has to provide concurrency protection.
Limitations.
Known issues.
Future improvement directions.
TODO remove lg_records list because it is not needed anymore.
Future directions
Known issues
there is no way to run m0_be_ut_backend_init() as if mkfs was already done. The function always does mkfs if it can't start BE without mkfs.
Worker SM
* m0_be_tx_bulk_run() * | - m0_be_op_active(tb->btb_op) * v * \>------------------+ * | +<---------------------------------------------<\ * v v ^ * /<------- be_tx_bulk_queue_get_cb() | * v | - asynchronously get an item | * | | with M0_BE_QUEUE_GET() | * | v | * | /<-- be_tx_bulk_queue_get_done_cb() | * | v | - m0_sm_ast_post() to get out of the locks | * | | v | * | | be_tx_bulk_init_cb() | * | | | - get more items with M0_BE_QUEUE_PEEK() and | * | | | M0_BE_QUEUE_GET() without blocking | * | | | - m0_be_tx_init() | * | | | - m0_be_tx_prep() | * | | | - m0_be_tx_open() | * | | v | * | | be_tx_bulk_close_cb() | * | | | - tbc_do() for the items | * | | | - m0_be_tx_close() | * | | | | * | | v | * | | be_tx_bulk_gc_cb() | * | | v - tbc_done() for the items ^ * | | \>------------------------------------------------>/ * | | * v v * be_tx_bulk_finish_cb() * - m0_be_op_done(tb->btb_op) * *
Tests to add:
Further directions
#define ARRAY_ALLOC_NZ | ( | arr, | |
nr | |||
) | ((arr) = m0_alloc_nz((nr) * sizeof ((arr)[0]))) |
Definition at line 205 of file tx_regmap.c.
#define BE_DOMAIN_LEVEL | ( | level | ) |
#define BE_IOCRED_F |
#define BE_IOCRED_P | ( | iocred | ) | (iocred)->bic_reg_nr, (iocred)->bic_reg_size, (iocred)->bic_part_nr |
#define BE_QUEUE_ITEM2BUF | ( | bq, | |
bqi | |||
) | M0_BUF_INIT((bq)->bq_cfg.bqc_item_length, &(bqi)->bqi_data) |
#define BE_TX_LOCKED_AT_STATE | ( | tx, | |
states | |||
) |
#define BE_UT_QUEUE_TEST | ( | q_size_max, | |
producers, | |||
consumers, | |||
items_nr | |||
) |
#define BEQ_F |
#define BEQ_P | ( | bq | ) |
#define BETXCR_F "(%lu,%lu)" |
Format for the printf() family functions.
Definition at line 102 of file tx_credit.h.
#define BETXCR_P | ( | c | ) |
Example:
Definition at line 113 of file tx_credit.h.
#define BFLH_F |
#define BFLH_P | ( | log_hdr | ) |
#define BFLRH_F |
#define BFLRH_P | ( | h | ) |
#define BL_F |
#define BL_P | ( | log | ) | (log)->lg_current, (log)->lg_discarded, (log)->lg_free |
#define BLR_F |
#define BLR_P | ( | record | ) |
#define BTBI_F |
#define BTBI_P | ( | btbi | ) |
#define CFG | ( | tx_nr_max, | |
reg_nr_max, | |||
payload_sz_max, | |||
ra_sz_max | |||
) |
#define gft_fmt_group_choose | ( | gft | ) |
Definition at line 46 of file tx_group_format.c.
Allocate array of structures.
It is a wrapper around m0_be_alloc().
#define M0_BE_ALLOC_BUF_SYNC | ( | buf, | |
seg, | |||
tx | |||
) | M0_BE_OP_SYNC(__op, M0_BE_ALLOC_BUF((buf), (seg), (tx), &__op)) |
Allocate structure.
It is a wrapper around m0_be_alloc().
#define M0_BE_ALLOC_PTR_SYNC | ( | ptr, | |
seg, | |||
tx | |||
) | M0_BE_OP_SYNC(__op, M0_BE_ALLOC_PTR((ptr), (seg), (tx), &__op)) |
#define M0_BE_FMT_DECLARE | ( | name | ) |
#define M0_BE_FMT_DECODE_CFG_DEFAULT |
#define M0_BE_FMT_DECODE_CFG_DEFAULT_WITH_TRACE |
#define M0_BE_FMT_DEFINE_INIT_SIMPLE | ( | name | ) |
#define M0_BE_FREE_PTR | ( | ptr, | |
seg, | |||
tx, | |||
op | |||
) | m0_be_free(m0_be_seg_allocator(seg), (tx), (op), (ptr)) |
#define M0_BE_FREE_PTR_SYNC | ( | ptr, | |
seg, | |||
tx | |||
) | M0_BE_OP_SYNC(__op, M0_BE_FREE_PTR((ptr), (seg), (tx), &__op)) |
#define M0_BE_IO_CREDIT | ( | reg_nr, | |
reg_size, | |||
part_nr | |||
) |
#define M0_BE_LIST_DECLARE | ( | name, | |
scope, | |||
amb_type | |||
) |
#define M0_BE_LIST_DEFINE | ( | name, | |
scope, | |||
amb_type | |||
) |
#define M0_BE_LIST_DESCR | ( | name, | |
amb_type, | |||
link_field, | |||
magic_field, | |||
link_magic, | |||
head_magic | |||
) |
Initialisator for BE list descriptor.
#define M0_BE_LIST_DESCR_DEFINE | ( | name, | |
hname, | |||
scope, | |||
amb_type, | |||
link_field, | |||
magic_field, | |||
link_magic, | |||
head_magic | |||
) |
Definition of BE list descriptor.
#define M0_BE_OP_SYNC | ( | op_obj, | |
action | |||
) |
Performs the action, waiting for its completion.
Example:
#define M0_BE_OP_SYNC_RC | ( | op_obj, | |
action | |||
) |
#define M0_BE_OP_SYNC_RET | ( | op_obj, | |
action, | |||
member | |||
) |
Performs the action, waits for its completion, and returns result of operation.
Example:
Similar to M0_BE_OP_SYNC_RET, but works with a caller-supplied operation structure.
Similar to M0_BE_OP_SYNC, but works with a caller-supplied operation structure.
#define M0_BE_POOL_DESCR | ( | hname, | |
amb_type, | |||
pool_field, | |||
pool_magic_field, | |||
pool_magic | |||
) |
#define M0_BE_POOL_DESCR_DEFINE | ( | name, | |
hname, | |||
scope, | |||
amb_type, | |||
pool_field, | |||
pool_magic_field, | |||
pool_magic | |||
) |
#define M0_BE_QUEUE_GET | ( | bq, | |
op, | |||
ptr, | |||
successful | |||
) | m0_be_queue_get(bq, op, &M0_BUF_INIT_PTR(ptr), successful) |
#define M0_BE_QUEUE_PEEK | ( | bq, | |
ptr | |||
) | m0_be_queue_peek(bq, &M0_BUF_INIT_PTR(ptr)) |
#define M0_BE_QUEUE_PUT | ( | bq, | |
op, | |||
ptr | |||
) | m0_be_queue_put(bq, op, &M0_BUF_INIT_PTR(ptr)) |
#define M0_BE_REG_AREA_FORALL | ( | ra, | |
rd | |||
) |
Definition at line 299 of file tx_regmap.h.
#define M0_BE_REG_D | ( | reg, | |
buf | |||
) |
Definition at line 67 of file tx_regmap.h.
#define M0_BE_REG_D_CREDIT | ( | rd | ) | M0_BE_TX_CREDIT(1, (rd)->rd_reg.br_size) |
Definition at line 69 of file tx_regmap.h.
#define M0_BE_SEG_GEOM0 |
#define M0_BE_SEG_PG_PIN_CNT_MASK (~M0_BE_SEG_PG_PRESENT) |
#define M0_BE_TX_CREDIT | ( | nr, | |
size | |||
) | (struct m0_be_tx_credit){ .tc_reg_nr = (nr), .tc_reg_size = (size) } |
Definition at line 94 of file tx_credit.h.
#define M0_BE_TX_CREDIT_BUF | ( | buf | ) | M0_BE_TX_CREDIT(1, (buf)->b_nob) |
Definition at line 99 of file tx_credit.h.
#define M0_BE_TX_CREDIT_PTR | ( | ptr | ) | M0_BE_TX_CREDIT(1, sizeof *(ptr)) |
Definition at line 98 of file tx_credit.h.
#define M0_BE_TX_CREDIT_TYPE | ( | type | ) | M0_BE_TX_CREDIT(1, sizeof(type)) |
Definition at line 97 of file tx_credit.h.
#define M0_BE_TX_GROUP_TX_ENDFOR m0_tl_endfor |
Definition at line 265 of file tx_group.h.
Definition at line 262 of file tx_group.h.
#define M0_DEBUG_BE_CREDITS (1) |
Credit represents resources that a transaction could consume:
- for each region captured by an active transaction, contents of captured region must be stored somewhere (to be written to the log later). That requires memory, which must be pre-allocated before transaction captures anything to avoid dead-locks; - similarly, for each captured region, a fixed size region descriptor (m0_be_reg_d) should be stored. The memory for the descriptor must be pre-allocated; - finally, before transaction captures anything, transaction engine must assure that there is enough free space in the log to write transaction's updates. The space required is proportional to total number of regions captured by the transaction and to total size of these regions.
Hence, the user should inform the engine about amount and size of regions that the transaction would modify. This is achieved by calling m0_be_tx_prep() (possibly multiple times), while the transaction is in PREPARE state. The calls to m0_be_tx_prep() must be conservative: it is fine to prepare for more updates than the transaction will actually make (the latter quantity is usually impossible to know beforehand anyway), but the transaction must never capture more than it prepared.
Definition at line 67 of file tx_credit.h.
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
Definition at line 30 of file log_discard.c.
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
Definition at line 30 of file io_sched.c.
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT |
Definition at line 34 of file io_sched.c.
#define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_BE |
Definition at line 35 of file log_discard.c.
#define REGD_EXT | ( | rd | ) |
Definition at line 45 of file tx_regmap.c.
#define TX | ( | p_addr, | |
p_nob, | |||
id | |||
) |
#define TX_PAYLOAD_TEST | ( | credit, | |
fill, | |||
capture, | |||
offset | |||
) |
typedef void(* m0_be_group_format_reg_area_rebuild_t) (struct m0_be_reg_area *ra, struct m0_be_reg_area *ra_new, void *param) |
Definition at line 84 of file tx_group_format.h.
typedef void(* m0_be_log_got_space_cb_t) (struct m0_be_log *log) |
typedef void(* m0_be_log_record_cb_t) (struct m0_be_log_record *record) |
anonymous enum |
Enumerator | |
---|---|
M0_BE_ALLOC_SHIFT_MIN | Allocated memory will be aligned using at least this shift.
|
anonymous enum |
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
KV_NR |
Definition at line 39 of file btree_internal.h.
anonymous enum |
Levels of m0_be_domain module.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
M0_BE_LOG_STORE_WRITE_SIZE_MAX |
Definition at line 47 of file log_store.c.
anonymous enum |
Log store provides an interface to an infinite persistent storage. It also has an interface for redundant buffer I/O. Although it is impossible to have a trully unlimited storage, it is possible to have some abstractions over finite storage that allows I/O within some I/O window.
Definitions
Highlights
Log store hides such knowledge as number of stobs, fragmentation, redundant buffers and their positions.
* * |<------------------------------ fsh_size ------------------------------>| * | | * +-----------+--------------------------------+---------------------------+ * | Log store | Redundant buffers | Circular buffer with data | * | header | (contain copies of log header) | | * +-----------+--------------------------------+---------------------------+ * |<------- fsh_rbuf_size -------->|<----- fsh_cbuf_size ----->| * | | * fsh_rbuf_offset fsh_cbuf_offset * *
Interface:
Limitations
Future directions
Definition at line 106 of file log_store.h.
anonymous enum |
Enumerator | |
---|---|
M0_BE_SEG_HEADER_OFFSET | |
M0_BE_SEG_READ_SIZE_MAX | Maximum size for segment I/O while reading in m0_be_seg_open(). |
M0_BE_SEG_CORE_DUMP_LIMIT | Core dump only first given MBs of the segment. |
M0_BE_SEG_FAKE_ID | Fake segment id, used before m0_be_seg_create_multiple is used everywhere around the code |
M0_BE_SEG_PAGE_SIZE | Segments' addr, size, offset has to be aligned by this boundary |
anonymous enum |
Enumerator | |
---|---|
M0_BE_SEG_HDR_GEOM_ITMES_MAX | |
M0_BE_SEG_HDR_VERSION_LEN_MAX |
Definition at line 41 of file seg_internal.h.
anonymous enum |
Enumerator | |
---|---|
MAX_GEN | |
MAX_SCAN_QUEUED | |
MAX_QUEUED | |
MAX_REC_SIZE | |
MAX_GEN_DIFF_SEC | The value in MAX_GEN_DIFF_SEC is arrived on the basis of max time difference between mkfs run on local and remote node and the assumption that clock time delta between nodes is negligible. |
MAX_KEY_LEN | |
MAX_VALUE_LEN | |
DEFAULT_BE_SEG_LOAD_ADDR | |
DEFAULT_BE_MAX_TX_REG_SZ | The value of 44MB for DEFAULT_BE_MAX_TX_REG_SZ was picked from the routine m0_be_ut_backend_cfg_default() |
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
BE_TX_BULK_WORKER_MAX | Maximum number of be_tx_bulk_worker-s in m0_be_tx_bulk. This value can be tuned to increase performance. |
anonymous enum |
Enumerator | |
---|---|
GFT_GROUP_IO | |
GFT_GROUP_CB_IO |
Definition at line 50 of file tx_group_format.c.
anonymous enum |
Definition at line 88 of file tx_group_format.h.
anonymous enum |
anonymous enum |
Enumerator | |
---|---|
BE_UT_IO_SCHED_THREAD_NR | |
BE_UT_IO_SCHED_IO_NR | |
BE_UT_IO_SCHED_ADD_NR | |
BE_UT_IO_SCHED_IO_OFFSET_MAX | |
BE_UT_IO_SCHED_EXT_SIZE_MAX |
Definition at line 52 of file io_sched.c.
anonymous enum |
Enumerator | |
---|---|
BE_UT_LOG_DISCARD_USECASE_ITEMS_MAX | |
BE_UT_LOG_DISCARD_USECASE_ITEMS_THRESHOLD |
Definition at line 50 of file log_discard.c.
anonymous enum |
Enumerator | |
---|---|
BE_UT_LOG_DISCARD_GP_ITEM_MAX | |
BE_UT_LOG_DISCARD_GP_CONSUMERS | |
BE_UT_LOG_DISCARD_GP_PRODUCERS | |
BE_UT_LOG_DISCARD_GP_OPERATION_NR | |
BE_UT_LOG_DISCARD_GP_OPERATION_STEP |
Definition at line 111 of file log_discard.c.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
enum action_opcode |
Enumerator | |
---|---|
LDI_INIT | |
LDI_STARTING | |
LDI_FINISHED | |
LDI_SYNCED | |
LDI_DISCARDED |
Definition at line 48 of file log_discard.c.
enum be_ut_io_sched_io_op |
Enumerator | |
---|---|
BE_UT_IO_SCHED_IO_START | |
BE_UT_IO_SCHED_IO_FINISH |
Definition at line 60 of file io_sched.c.
Enumerator | |
---|---|
BE_UT_LOG_DISCARD_GP_PRODUCER | |
BE_UT_LOG_DISCARD_GP_CONSUMER |
Definition at line 119 of file log_discard.c.
enum be_ut_op_mt_cmd |
enum be_ut_op_mt_dep_type |
enum be_ut_queue_test |
enum betool_st_event |
enum btree_save_optype |
enum m0_avi_be_labels |
Zones within BE segment allocator space.
Each zone occupies a fixed fraction of total segment space, which is specified when the allocator is initialised. Space can be requested from particular zones using zones bit mask.
Zones in enumeration are sorted by priority in ascending order. For example, if zones M0_BAP_NORMAL and M0_BAP_REPAIR are specified in allocation request, then space in M0_BAP_NORMAL will be allocated only if there is not enough space in M0_BAP_REPAIR.
The memory is allocated exactly in one zone and can't be distributed among several zones even if several zones are specified in an allocation request.
Zones don't have predefined memory boundaries and can be viewed as "labels" for allocated memory chunks. Particular memory chunk can reside in different zones during system life cycle.
enum m0_be_allocator_op |
Allocator operation.
Enumerator | |
---|---|
M0_BAO_CREATE | Allocator credit for m0_be_allocator_create() |
M0_BAO_DESTROY | Allocator credit for m0_be_allocator_destroy() |
M0_BAO_ALLOC | Allocator credit for m0_be_alloc() |
M0_BAO_ALLOC_ALIGNED | Allocator credit for m0_be_alloc_aligned() |
M0_BAO_FREE | Allocator credit for m0_be_free() |
M0_BAO_FREE_ALIGNED | Allocator credit for m0_be_free_aligned() |
Enumerator | |
---|---|
M0_BE_BNODE_FORMAT_VERSION_1 | |
M0_BE_BNODE_FORMAT_VERSION | Current version, should point to the latest version present |
Definition at line 63 of file btree_internal.h.
enum m0_be_btree_op |
Type of persistent operation over the tree.
These values are also re-used to define transaction credit types.
Enumerator | |
---|---|
M0_BBO_CREATE | Used for m0_be_btree_create() |
M0_BBO_DESTROY | |
M0_BBO_INSERT | .. m0_be_btree_{,inplace_}insert() |
M0_BBO_DELETE | .. m0_be_btree_{,inplace_}delete() |
M0_BBO_UPDATE | .. m0_be_btree_{,inplace_}update() |
M0_BBO_LOOKUP | |
M0_BBO_MAXKEY | |
M0_BBO_MINKEY | |
M0_BBO_CURSOR_GET | |
M0_BBO_CURSOR_NEXT | |
M0_BBO_CURSOR_PREV |
enum m0_be_btree_type |
Stored in m0_be_btree_backlink::bl_type
enum m0_be_credit_users |
Enumerator | |
---|---|
M0_BE_CU_BTREE_INSERT | |
M0_BE_CU_BTREE_DELETE | |
M0_BE_CU_BTREE_UPDATE | |
M0_BE_CU_EMAP_SPLIT | |
M0_BE_CU_EMAP_PASTE | |
M0_BE_CU_NR |
Definition at line 70 of file tx_credit.h.
enum m0_be_fl_op |
m0_be_fl operation.
Enumerator | |
---|---|
M0_BFL_CREATE | |
M0_BFL_DESTROY | |
M0_BFL_ADD | |
M0_BFL_DEL |
enum m0_be_list_op |
List operations that modify memory.
Enumerator | |
---|---|
M0_BLO_CREATE | |
M0_BLO_DESTROY | |
M0_BLO_ADD | m0_be_list_add(), m0_be_list_add_after(), m0_be_list_add_before(), m0_be_list_add_tail() |
M0_BLO_DEL | |
M0_BLO_TLINK_CREATE | |
M0_BLO_TLINK_DESTROY | |
M0_BLO_NR |
Enumerator | |
---|---|
M0_BE_LOG_STORE_IO_READ | |
M0_BE_LOG_STORE_IO_WRITE |
Definition at line 125 of file log_store.h.
enum m0_be_op_state |
Enumerator | |
---|---|
M0_BOS_INVALID | |
M0_BOS_INIT | |
M0_BOS_ACTIVE | |
M0_BOS_DONE | |
M0_BOS_GC | It's not a state. It's used to set garbage collector callbak.
|
enum m0_be_op_type |
enum m0_be_pd_io_state |
enum m0_be_reg_area_type |
reg_area type.
Enumerator | |
---|---|
M0_BE_REG_AREA_DATA_COPY | m0_be_reg_area copies entire regions passed to m0_be_reg_area_capture() to it's internal memory buffer (m0_be_reg_area::bra_area). m0_be_reg_area overwrites previously written regions data if new region intersects with the reg_area. m0_be_reg_area saves pointer to the copy of the region data to m0_be_reg_d::rd_buf. |
M0_BE_REG_AREA_DATA_NOCOPY | The same as M0_BE_REG_AREA_DATA_COPY except it is assumed that m0_be_reg_d already has the copy of the data in m0_be_reg_d::rd_buf, so m0_be_reg_area doesn't copy data from m0_be_reg_d::rd_reg to m0_be_reg_d::rd_buf. |
Definition at line 208 of file tx_regmap.h.
Enumerator | |
---|---|
M0_BE_SEG_HDR_FORMAT_VERSION_1 | |
M0_BE_SEG_HDR_FORMAT_VERSION | Current version, should point to the latest version present |
Definition at line 60 of file seg_internal.h.
enum m0_be_seg_states |
enum m0_be_tx_group_state |
Enumerator | |
---|---|
M0_BGS_READY | |
M0_BGS_OPEN | |
M0_BGS_FROZEN | |
M0_BGS_CLOSED | |
M0_BGS_NR |
Definition at line 47 of file tx_group.h.
enum m0_be_tx_state |
Transaction state machine.
* * | m0_be_tx_init() * | * V * PREPARE * | * m0_be_tx_open() | no free memory or engine thinks that * | the transaction can't be opened * V V * OPENING---------->FAILED * | * | log space reserved for the transaction * | * V * ACTIVE * | * m0_be_tx_close() | * | * V * CLOSED * | * | added to group * | * V * GROUPED * | * | log io complete * | * V * LOGGED * | * | in-place io complete * | * V * PLACED * | * | number of m0_be_tx_get() == number of m0_be_tx_put() * | for the transaction * V * DONE * *
A transaction goes through the states sequentially. The table below corresponds to sequence of transactions in the system history. An individual transaction, as it gets older, moves through this table bottom-up.
* * transaction log record * state state * | | | * | | | * | DONE | record discarded | * | (updates in place) | | * | | | * +--------------------+---------------------+----> start * | | | * | PLACED | persistent | * | (updates in place | | * | and in log) | | * | | | * +--------------------+---------------------+----> placed * | | | * | ``LOGGED'' | persistent | * | (updates in log) | | * | | | * +--------------------+---------------------+----> logged * | | | * | ``SUBMITTED'' | in flight | * | (updates in flight | | * | to log) | | * | | | * +--------------------+---------------------+----> submitted * | | | * | GROUPED | in memory, | * | (grouped) | log location | * | | assigned | * | | | * +--------------------+---------------------+----> grouped * | | | * | CLOSED | in memory, | * | (ungrouped) | log location | * | | not assigned | * | | | * +--------------------+---------------------+----> inmem * | | | * | ACTIVE | in memory, | * | (capturing | log space | * | updates) | reserved | * | | | * +--------------------+---------------------+----> prepared * | | | * | OPENING | no records | * | (waiting for log | | * | space | | * | | | * +--------------------+---------------------+ * | | | * | PREPARE | no records | * | (accumulating | | * | credits) | | * +--------------------+---------------------+ * *
Enumerator | |
---|---|
M0_BTS_FAILED | Transaction failed. It cannot be used further and should be finalised (m0_be_tx_fini()). Currently, the only way a transaction can reach this state is by failing to allocate internal memory in m0_be_tx_open() call or by growing too large (larger than the total log space) in prepare state. |
M0_BTS_PREPARE | State in which transaction is being prepared to opening; initial state after m0_be_tx_init(). In this state, m0_be_tx_prep() calls should be made to reserve internal resources for the future captures. It is allowed to prepare for more than will be actually captured: typically it is impossible to precisely estimate updates that will be done as part of transaction, so a user should conservatively prepare for the worst-case. |
M0_BTS_OPENING | In this state transaction waits for internal resource to be allocated. Specifically, the transaction is in this state until there is enough free space in the log to store transaction updates. |
M0_BTS_GROUPING | XXX Transaction is a member of transaction group. |
M0_BTS_ACTIVE | In this state transaction is used to capture updates. |
M0_BTS_CLOSED | Transaction is closed. |
M0_BTS_LOGGED | |
M0_BTS_PLACED | All transaction in-place updates completed. |
M0_BTS_DONE | Transaction reached M0_BTS_PLACED state and the number of m0_be_tx_get() is equal to the number of m0_be_tx_put() for the transaction. |
M0_BTS_NR |
enum position_t |
enum tx_group_fom_state |
Phases of tx_group fom.
* * INIT ----> FAILED ----------. * | | * v v * ,---> OPEN ----> STOPPING ----> FINISH * | | * | v * | LOGGING ----> RECONSTRUCT * | | | * | | v * | | TX_OPEN * | | | * | | v * | | TX_CLOSE * | | | * | v v * | PLACING <------ REAPPLY * | | * | v * | PLACED * | | * | v * | STABILIZING * | | * | v * | STABLE ----- TX_GC_WAIT * | | | * | v | * `--- RESET <---------/ * *
Definition at line 82 of file tx_group_fom.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Delete a key from btree.
This routine will delete the entry specified by .
tree | pointer to btree. |
tx | pointer to BE transaction. |
node | pointer to root node on btree. |
key | pointer to key which would needs to be deleted. |
Definition at line 911 of file btree.c.
|
static |
Delete a key from node.
This routine will delete a key from node in btree.
tree | pointer to btree. |
tx | pointer to BE transaction. |
node_pos | pointer to node position from which key would to be deleted. |
Definition at line 839 of file btree.c.
|
static |
|
static |
Get a node containing the given key.
This routine will return node position containing specified .
it | pointer to btree cursor used to traverse btree. |
key | pointer to key which is used to search node. |
slant | bool to decide searching needs to be on leaf node. if true, search leaf node, else search in non-leaf node |
Definition at line 1102 of file btree.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Inserts entry into the non-full .
btree | the btree where the kv is to be inserted |
tx | the pointer to tx |
node | the non-full node where the kv is to be inserted |
kv | the key value to be inserted |
Definition at line 529 of file btree.c.
|
static |
|
static |
|
static |
|
static |
Merge siblings.
This routine will merge siblings in btree.
tx | pointer to BE transaction. |
tree | pointer to btree. |
parent | pointer to parent node. |
idx | Index of the child array of parent node. |
Definition at line 680 of file btree.c.
|
static |
Move parent key to child.
This routine will move keys from parent to left or right child node.
tree | pointer to btree. |
tx | pointer to BE transaction. |
parent | pointer to parent node. |
idx | Index of the child array of parent node. |
pos | position to move keys to LEFT or RIGHT child. |
Definition at line 795 of file btree.c.
|
static |
|
static |
|
static |
This function is used to allocate memory for the btree node
btree | the btree node to which the node is to be allocated |
tx | the pointer to tx |
Definition at line 414 of file btree.c.
|
static |
|
static |
|
static |
|
static |
Splits the child node at and updates the .
btree | the btree to which the node is to be allocated |
tx | the pointer to tx |
parent | the parent node |
index | the index of the node to be split |
Definition at line 462 of file btree.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
M0_INTERNAL void be_domain_log_cleanup | ( | const char * | stob_domain_location, |
struct m0_be_log_cfg * | log_cfg, | ||
bool | create | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 259 of file tx_group_format.c.
|
static |
Definition at line 267 of file tx_group_format.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 125 of file io_sched.c.
|
static |
Definition at line 145 of file io_sched.c.
|
static |
|
static |
Definition at line 93 of file io_sched.c.
|
static |
Definition at line 118 of file io_sched.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 250 of file log_discard.c.
|
static |
Definition at line 189 of file log_discard.c.
|
static |
Definition at line 178 of file log_discard.c.
|
static |
Definition at line 173 of file log_discard.c.
|
static |
Definition at line 226 of file log_discard.c.
|
static |
|
static |
Definition at line 239 of file log_discard.c.
|
static |
Definition at line 163 of file log_discard.c.
|
static |
Definition at line 287 of file log_discard.c.
|
static |
Definition at line 348 of file log_discard.c.
|
static |
Definition at line 339 of file log_discard.c.
|
static |
Definition at line 354 of file log_discard.c.
|
static |
Definition at line 333 of file log_discard.c.
|
static |
Definition at line 312 of file log_discard.c.
|
static |
Definition at line 168 of file log_discard.c.
|
static |
Definition at line 384 of file log_discard.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 51 of file log_store.c.
|
static |
Definition at line 64 of file log_store.c.
|
static |
Definition at line 107 of file log_store.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 549 of file log_store.c.
|
static |
Definition at line 556 of file log_store.c.
|
static |
|
static |
Definition at line 133 of file log_store.c.
|
static |
Definition at line 225 of file log_store.c.
|
static |
Definition at line 203 of file log_store.c.
|
static |
Definition at line 194 of file log_store.c.
|
static |
Definition at line 140 of file log_store.c.
|
static |
Definition at line 209 of file log_store.c.
|
static |
Definition at line 146 of file log_store.c.
|
static |
|
static |
Definition at line 78 of file log_store.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Time complexity is O(1)
Definition at line 247 of file tx_regmap.c.
|
static |
|
static |
Time complexity is O(log(m0_be_rdt_size(rdt) + 1))
Definition at line 268 of file tx_regmap.c.
|
static |
|
static |
Definition at line 671 of file tx_regmap.c.
|
static |
|
static |
Definition at line 650 of file tx_regmap.c.
|
static |
|
static |
|
static |
Definition at line 712 of file tx_regmap.c.
|
static |
Definition at line 676 of file tx_regmap.c.
|
static |
Definition at line 865 of file tx_regmap.c.
|
static |
Definition at line 720 of file tx_regmap.c.
|
static |
Definition at line 68 of file tx_regmap.c.
|
static |
Definition at line 163 of file tx_regmap.c.
|
static |
|
static |
|
static |
Return address of the first byte inside the region.
Definition at line 81 of file tx_regmap.c.
|
static |
Return address of the byte before be_reg_d_fb(rd).
Definition at line 87 of file tx_regmap.c.
|
static |
Definition at line 74 of file tx_regmap.c.
|
static |
Return address of the last byte inside the region.
Definition at line 93 of file tx_regmap.c.
|
static |
Return address of the byte after be_reg_d_lb(rd).
Definition at line 99 of file tx_regmap.c.
|
static |
|
static |
Definition at line 109 of file tx_regmap.c.
|
static |
Definition at line 406 of file tx_regmap.c.
|
static |
Definition at line 412 of file tx_regmap.c.
|
static |
Definition at line 433 of file tx_regmap.c.
|
static |
Definition at line 84 of file seg_dict.c.
|
static |
|
static |
Definition at line 208 of file seg_dict.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 129 of file tx_group.c.
|
static |
Definition at line 375 of file tx_group_fom.c.
|
static |
Definition at line 282 of file tx_group_fom.c.
|
static |
Definition at line 299 of file tx_group_fom.c.
|
static |
|
static |
Definition at line 320 of file tx_group_fom.c.
|
static |
Definition at line 533 of file tx_group_format.c.
|
static |
Definition at line 541 of file tx_group_format.c.
|
static |
Definition at line 525 of file tx_group_format.c.
|
static |
|
static |
Definition at line 481 of file tx_group.c.
|
static |
Highlighs:
Definition at line 541 of file tx_group.c.
|
static |
Definition at line 525 of file tx_group.c.
|
static |
Definition at line 513 of file tx_group.c.
|
static |
Definition at line 83 of file tx_group.c.
|
static |
Definition at line 277 of file tx_group.c.
|
static |
Definition at line 268 of file tx_group.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 161 of file io_sched.c.
|
static |
Definition at line 114 of file io_sched.c.
|
static |
Definition at line 127 of file io_sched.c.
|
static |
Definition at line 174 of file io_sched.c.
|
static |
Definition at line 151 of file io_sched.c.
|
static |
Definition at line 259 of file io_sched.c.
|
static |
|
static |
Definition at line 155 of file log_discard.c.
|
static |
|
static |
Definition at line 168 of file log_discard.c.
|
static |
|
static |
|
static |
|
static |
Definition at line 64 of file log_discard.c.
|
static |
Definition at line 55 of file log_discard.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
The test launches be_ut_queue_cfg::butc_producers + be_ut_queue_cfg::butc_consumers threads for producers and consumers respectively. Each producer/consumer thread does M0_BE_QUEUE_PUT()/M0_BE_QUEUE_GET() in a loop, and it also tries to M0_BE_QUEUE_PEEK() before each put()/get().
Definition at line 235 of file queue.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Tests m0_be_tx_force().
nr | Number of transactions to use. |
Definition at line 383 of file tx.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Btree backlink invariant implementation:
h | link back to the btree. |
seg | backend segment. |
parent | cookie of btree. |
Definition at line 240 of file btree.c.
|
static |
|
static |
|
static |
|
static |
|
static |
void btree_dbg_print | ( | struct m0_be_btree * | tree | ) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Btree node invariant implementation:
Definition at line 262 of file btree.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Inserts or updates value by key
tree | The btree |
tx | The transaction |
op | The operation |
key | Key of the node to be searched |
value | Value to be copied |
optype | Save operation type: insert, update or overwrite |
zonemask | Bitmask of allowed allocation zones for memory allocation |
Definition at line 1365 of file btree.c.
|
static |
Truncate btree: truncate the tree till the limit provided in argument.
That function can be called multiple times, having maximum number of records to be deleted limited to not exceed transaction capacity. After first call tree can't be used for operations other than truncate or destroy.
btee | btree to truncate |
tx | transaction |
limit | maximum number of records to delete |
Definition at line 1202 of file btree.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Below clean up used as m0_be_ut_backend_fini() fails because of unlocked thread's sm group. Simplify this task and call the exit function for builder thread.
Definition at line 1906 of file beck.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Reads and stores cob namespace tree key value pair.
[in] | s | scanner. |
[in] | kv | key value pair read by scanner. |
[out] | key | stores cob namespace key. |
[out] | val | stores cob namespace record. |
Read cob nskey.
Read cob nsvalue.
Definition at line 2916 of file beck.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
M0_INTERNAL void m0_backend_fini | ( | void | ) |
M0_INTERNAL int m0_backend_init | ( | void | ) |
M0_BASSERT | ( | ) |
M0_BASSERT | ( | sizeof(bool) | = =1 | ) |
M0_BASSERT | ( | sizeof(struct be_alloc_chunk) %(1UL<< M0_BE_ALLOC_SHIFT_MIN) | = =0 | ) |
M0_BASSERT | ( | ARRAY_SIZE(betool_st_event_descr) | = =BETOOL_ST_TIME_NR | ) |
M0_BASSERT | ( | sizeof(((struct m0_be_fmt_group *) NULL) ->fg_cfg) | = =sizeof(struct m0_be_fmt_group_cfg *) | ) |
M0_BASSERT | ( | ARRAY_SIZE(rt) | = =M0_FORMAT_TYPE_NR+1 | ) |
M0_BASSERT | ( | BE_UT_TX_CAPTURING_RANGE >= | sizeofuint64_t | ) |
int m0_be_0type_add | ( | struct m0_be_0type * | zt, |
struct m0_be_domain * | dom, | ||
struct m0_be_tx * | tx, | ||
const char * | suffix, | ||
const struct m0_buf * | data | ||
) |
void m0_be_0type_add_credit | ( | struct m0_be_domain * | dom, |
const struct m0_be_0type * | zt, | ||
const char * | suffix, | ||
const struct m0_buf * | data, | ||
struct m0_be_tx_credit * | credit | ||
) |
Calculates BE-credit for m0_be_0type_add().
Definition at line 139 of file seg0.c.
int m0_be_0type_del | ( | struct m0_be_0type * | zt, |
struct m0_be_domain * | dom, | ||
struct m0_be_tx * | tx, | ||
const char * | suffix | ||
) |
void m0_be_0type_del_credit | ( | struct m0_be_domain * | dom, |
const struct m0_be_0type * | zt, | ||
const char * | suffix, | ||
struct m0_be_tx_credit * | credit | ||
) |
Calculates BE-credit for m0_be_0type_del().
Definition at line 156 of file seg0.c.
void m0_be_0type_register | ( | struct m0_be_domain * | dom, |
struct m0_be_0type * | zt | ||
) |
void m0_be_0type_unregister | ( | struct m0_be_domain * | dom, |
struct m0_be_0type * | zt | ||
) |
M0_INTERNAL void m0_be_alloc | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
void ** | ptr, | ||
m0_bcount_t | size | ||
) |
Allocate memory.
The memory allocated is guaranteed to be suitably aligned for any kind of variable. See m0_be_alloc_aligned() for parameters description.
Definition at line 1091 of file alloc.c.
M0_INTERNAL void m0_be_alloc_aligned | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
void ** | ptr, | ||
m0_bcount_t | size, | ||
unsigned | shift, | ||
uint64_t | zonemask | ||
) |
Allocate memory.
a | Allocator |
tx | Allocation will be done in this transaction |
op | See m0_be_op. |
ptr | Pointer to allocated memory will be stored to *ptr. *ptr shouldn't be used before completion of the operation. Can be NULL. |
size | Memory size |
shift | Memory will be aligned on (shift^2)-byte boundary. It can be less than M0_BE_ALLOC_SHIFT_MIN - in this case allocation will be done as if it is equal to M0_BE_ALLOC_SHIFT_MIN. |
zonemask | Bit mask of the zones where memory should be allocated. The first zone from the bit mask with sufficient space will be chosen for allocation, see m0_be_alloc_zone_type. |
The memory should be freed using m0_be_free_aligned().
Definition at line 1020 of file alloc.c.
M0_INTERNAL void m0_be_alloc_stats | ( | struct m0_be_allocator * | a, |
struct m0_be_allocator_stats * | out | ||
) |
Return allocator statistics.
Definition at line 1159 of file alloc.c.
M0_INTERNAL void m0_be_alloc_stats_capture | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_alloc_stats_credit | ( | struct m0_be_allocator * | a, |
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL bool m0_be_allocator__invariant | ( | struct m0_be_allocator * | a | ) |
M0_INTERNAL int m0_be_allocator_create | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx, | ||
uint32_t * | zone_percent, | ||
uint32_t | zones_nr | ||
) |
M0_INTERNAL void m0_be_allocator_credit | ( | struct m0_be_allocator * | a, |
enum m0_be_allocator_op | optype, | ||
m0_bcount_t | size, | ||
unsigned | shift, | ||
struct m0_be_tx_credit * | accum | ||
) |
Accumulate credits for optype in accum.
a | Allocator |
optype | Allocator operation type |
size | Size of allocation. Makes sense only for M0_IN(optype, (M0_BAO_ALLOC_ALIGNED, M0_BAO_ALLOC)). It is ignored for other optypes. |
shift | Memory alignment shift. Makes sense only for optype == M0_BAO_ALLOC_ALIGNED. It is ignored for other optypes. |
accum | Accumulator for credits. |
Definition at line 900 of file alloc.c.
M0_INTERNAL void m0_be_allocator_destroy | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_allocator_fini | ( | struct m0_be_allocator * | a | ) |
M0_INTERNAL int m0_be_allocator_init | ( | struct m0_be_allocator * | a, |
struct m0_be_seg * | seg | ||
) |
Initialize allocator structure.
Definition at line 719 of file alloc.c.
M0_INTERNAL void m0_be_btree_clear_credit | ( | struct m0_be_btree * | tree, |
struct m0_be_tx_credit * | fixed_part, | ||
struct m0_be_tx_credit * | single_record, | ||
m0_bcount_t * | records_nr | ||
) |
Calculates the credit needed to destroy index tree.
Separate credits by components to handle big btree clear not fitting into single transaction. The total number of credits to destroy index tree is fixed_part + single_record * records_nr.
tree | btree to proceed |
fixed_part | fixed credits part which definitely must be reserved |
single_record | credits to delete single index record |
records_nr | number of records in that index |
Definition at line 1862 of file btree.c.
M0_INTERNAL void m0_be_btree_create | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_fid * | btree_fid | ||
) |
Creates btree on segment.
The operation is asynchronous. Use m0_be_op_wait() or m0_be_op_tick_ret() to wait for its completion.
Example:
btree_fid | It should be unique within a BE segment for a btree type. For example, btree fid is constructed from m0_be_btree_type and domain id. &M0_FID_TINIT('b', M0_BBT_xxx, dom_id) |
Definition at line 1512 of file btree.c.
M0_INTERNAL void m0_be_btree_create_credit | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL void m0_be_btree_cursor_fini | ( | struct m0_be_btree_cursor * | it | ) |
M0_INTERNAL int m0_be_btree_cursor_first_sync | ( | struct m0_be_btree_cursor * | it | ) |
M0_INTERNAL void m0_be_btree_cursor_get | ( | struct m0_be_btree_cursor * | it, |
const struct m0_buf * | key, | ||
bool | slant | ||
) |
Fills cursor internal buffers with current key and value obtained from the tree. Operation may cause IO depending on cursor::bc_op state
Note: interface is asynchronous and relies on cursor::bc_op::bo_sm. When it transits into M0_BOS_DONE, the operation is believed to be finished.
Note: allowed sequence of cursor calls is: m0_be_btree_cursor_init() ( m0_be_btree_cursor_get() ( m0_be_btree_cursor_next() | m0_be_btree_cursor_prev() | m0_be_btree_cursor_get() | m0_be_btree_cursor_kv_get() )* m0_be_btree_cursor_put() )* m0_be_btree_cursor_fini()
slant[in] | if slant == true then cursor will return a minimum key not less than given, otherwise it'll be set on exact key if it's possible. |
Definition at line 2295 of file btree.c.
M0_INTERNAL int m0_be_btree_cursor_get_sync | ( | struct m0_be_btree_cursor * | it, |
const struct m0_buf * | key, | ||
bool | slant | ||
) |
Synchronous version of m0_be_btree_cursor_get().
Definition at line 2331 of file btree.c.
M0_INTERNAL void m0_be_btree_cursor_init | ( | struct m0_be_btree_cursor * | it, |
struct m0_be_btree * | tree | ||
) |
M0_INTERNAL void m0_be_btree_cursor_kv_get | ( | struct m0_be_btree_cursor * | it, |
struct m0_buf * | key, | ||
struct m0_buf * | val | ||
) |
Sets key and value buffers to point on internal structures of cursor representing current key and value, cursor is placed on.
Any of and pointers can be NULL, but not both.
Note: interface is synchronous.
Definition at line 2485 of file btree.c.
M0_INTERNAL int m0_be_btree_cursor_last_sync | ( | struct m0_be_btree_cursor * | it | ) |
M0_INTERNAL void m0_be_btree_cursor_next | ( | struct m0_be_btree_cursor * | it | ) |
Fills cursor internal buffers with key and value obtained from the next position in tree. The operation is unprotected from concurrent btree updates and user should protect it with external lock. Operation may cause IO depending on cursor::bc_op state.
Note:
Definition at line 2358 of file btree.c.
M0_INTERNAL int m0_be_btree_cursor_next_sync | ( | struct m0_be_btree_cursor * | it | ) |
Synchronous version of m0_be_btree_cursor_next().
Definition at line 2464 of file btree.c.
M0_INTERNAL void m0_be_btree_cursor_prev | ( | struct m0_be_btree_cursor * | it | ) |
Fills cursor internal buffers with prev key and value obtained from the tree. Operation may cause IO depending on cursor::bc_op state
Note:
Definition at line 2411 of file btree.c.
M0_INTERNAL int m0_be_btree_cursor_prev_sync | ( | struct m0_be_btree_cursor * | it | ) |
Synchronous version of m0_be_btree_cursor_prev().
Definition at line 2472 of file btree.c.
M0_INTERNAL void m0_be_btree_cursor_put | ( | struct m0_be_btree_cursor * | it | ) |
M0_INTERNAL void m0_be_btree_delete | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key | ||
) |
Deletes the entry by the given from btree. Operation is asynchronous.
-ENOENT is set to ->bo_u.u_btree.t_rc if not found.
Definition at line 1958 of file btree.c.
M0_INTERNAL void m0_be_btree_delete_credit | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
m0_bcount_t | ksize, | ||
m0_bcount_t | vsize, | ||
struct m0_be_tx_credit * | accum | ||
) |
Calculates how many internal resources of tx_engine, described by m0_be_tx_credit, is needed to perform the delete operation over the . Function updates structure which is an input for m0_be_tx_prep().
nr | Number of operations. |
ksize | Key data size. |
vsize | Value data size. |
Definition at line 1740 of file btree.c.
M0_INTERNAL void m0_be_btree_destroy | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op | ||
) |
M0_INTERNAL void m0_be_btree_destroy_credit | ( | struct m0_be_btree * | tree, |
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL void m0_be_btree_fini | ( | struct m0_be_btree * | tree | ) |
Finalises in-memory structures of btree.
Does not touch segment on disk.
Definition at line 1503 of file btree.c.
M0_INTERNAL void m0_be_btree_init | ( | struct m0_be_btree * | tree, |
struct m0_be_seg * | seg, | ||
const struct m0_be_btree_kv_ops * | ops | ||
) |
M0_INTERNAL void m0_be_btree_insert | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
const struct m0_buf * | value | ||
) |
Inserts and into btree. Operation is asynchronous.
Note0: interface is asynchronous and relies on op::bo_sm. Operation is considered to be finished after op::bo_sm transits to M0_BOS_DONE - after that point other operations will see the effect of this one.
Definition at line 1932 of file btree.c.
M0_INTERNAL void m0_be_btree_insert_credit | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
m0_bcount_t | ksize, | ||
m0_bcount_t | vsize, | ||
struct m0_be_tx_credit * | accum | ||
) |
Calculates how many internal resources of tx_engine, described by m0_be_tx_credit, is needed to perform the insert operation over the . Function updates structure which is an input for m0_be_tx_prep().
nr | Number of operations. |
ksize | Key data size. |
vsize | Value data size. |
Definition at line 1720 of file btree.c.
M0_INTERNAL void m0_be_btree_insert_credit2 | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
m0_bcount_t | ksize, | ||
m0_bcount_t | vsize, | ||
struct m0_be_tx_credit * | accum | ||
) |
The same as m0_be_btree_insert_credit() but uses the current btree height for credit calculation making it more accurate. It should be used with caution since it may hide the problems with credits until btree gets filled up. For example, it may be possible that the same operation which successfully works on less filled btree won't work when btree is more filled up because the number of required credits exceed the maximum size of possible credits in the transaction.
Definition at line 1730 of file btree.c.
M0_INTERNAL void m0_be_btree_insert_inplace | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
struct m0_be_btree_anchor * | anchor, | ||
uint64_t | zonemask | ||
) |
M0_INTERNAL bool m0_be_btree_is_empty | ( | struct m0_be_btree * | tree | ) |
M0_INTERNAL void m0_be_btree_lookup | ( | struct m0_be_btree * | tree, |
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
struct m0_buf * | dest_value | ||
) |
Looks up for a by the given in btree. The result is copied into provided buffer.
-ENOENT is set to ->bo_u.u_btree.t_rc if not found.
Definition at line 2033 of file btree.c.
M0_INTERNAL void m0_be_btree_lookup_inplace | ( | struct m0_be_btree * | tree, |
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
struct m0_be_btree_anchor * | anchor | ||
) |
Looks up a value stored in the by the given .
-ENOENT is set to ->bo_u.u_btree.t_rc if not found.
Definition at line 2152 of file btree.c.
M0_INTERNAL void m0_be_btree_lookup_slant | ( | struct m0_be_btree * | tree, |
struct m0_be_op * | op, | ||
struct m0_buf * | key, | ||
struct m0_buf * | value | ||
) |
Looks up for a record with the closest key >= given . The result is copied into provided and buffers.
-ENOENT is set to ->bo_u.u_btree.t_rc if not found.
Definition at line 2041 of file btree.c.
M0_INTERNAL void m0_be_btree_maxkey | ( | struct m0_be_btree * | tree, |
struct m0_be_op * | op, | ||
struct m0_buf * | out | ||
) |
Looks up for a maximum key value in the given .
Definition at line 2049 of file btree.c.
M0_INTERNAL void m0_be_btree_minkey | ( | struct m0_be_btree * | tree, |
struct m0_be_op * | op, | ||
struct m0_buf * | out | ||
) |
Looks up for a minimum key value in the given .
Definition at line 2070 of file btree.c.
M0_INTERNAL void m0_be_btree_release | ( | struct m0_be_tx * | tx, |
struct m0_be_btree_anchor * | anchor | ||
) |
Completes m0_be_btree_*_inplace() operation by capturing all affected regions with m0_be_tx_capture() (if needed) and unlocking the tree.
Definition at line 2180 of file btree.c.
M0_INTERNAL void m0_be_btree_save | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
const struct m0_buf * | val, | ||
bool | overwrite | ||
) |
This function:
It's a shortcut for m0_be_btree_lookup() with successive m0_be_btree_insert() if key is not found or m0_be_btree_update() if key exists and overwrite flag is set. This function looks up the key only once compared to double lookup made by m0_btree_lookup() + m0_be_btree_insert()/update().
Credits for this operation should be calculated by m0_be_btree_insert_credit() or m0_be_btree_insert_credit2(), because in the worst case insertion is required.
Definition at line 1912 of file btree.c.
M0_INTERNAL void m0_be_btree_save_inplace | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
struct m0_be_btree_anchor * | anchor, | ||
bool | overwrite, | ||
uint64_t | zonemask | ||
) |
This function:
Definition at line 2136 of file btree.c.
M0_INTERNAL void m0_be_btree_truncate | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
m0_bcount_t | limit | ||
) |
Truncate btree: delete all records, keep empty root.
That routine may be called more than once to fit into transaction. Btree between calls is not in usable state. Typically new transaction must be started for each call. It is ok to continue tree truncate after system restart. 'Limit' is a maximum number of records to be deleted.
Definition at line 1564 of file btree.c.
M0_INTERNAL void m0_be_btree_update | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
const struct m0_buf * | value | ||
) |
Updates the at the in btree. Operation is asynchronous.
-ENOENT is set to ->bo_u.u_btree.t_rc if not found.
Definition at line 1941 of file btree.c.
M0_INTERNAL void m0_be_btree_update_credit | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
m0_bcount_t | vsize, | ||
struct m0_be_tx_credit * | accum | ||
) |
Calculates how many internal resources of tx_engine, described by m0_be_tx_credit, is needed to perform the update operation over the . Function updates structure which is an input for m0_be_tx_prep(). Should be used for data which has fixed length when existing value area is re-used for a new value and no alloc/free operations are needed.
nr | Number of operations. |
vsize | Value data size. |
Definition at line 1750 of file btree.c.
M0_INTERNAL void m0_be_btree_update_credit2 | ( | const struct m0_be_btree * | tree, |
m0_bcount_t | nr, | ||
m0_bcount_t | ksize, | ||
m0_bcount_t | vsize, | ||
struct m0_be_tx_credit * | accum | ||
) |
The same as m0_be_btree_update_credit() but should be used for data which has variable length and alloc/free operations may be needed.
nr | Number of operations. |
ksize | Key data size. |
vsize | Value data size. |
Definition at line 1772 of file btree.c.
M0_INTERNAL void m0_be_btree_update_inplace | ( | struct m0_be_btree * | tree, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
const struct m0_buf * | key, | ||
struct m0_be_btree_anchor * | anchor | ||
) |
M0_INTERNAL void m0_be_domain__0type_register | ( | struct m0_be_domain * | dom, |
struct m0_be_0type * | type | ||
) |
M0_INTERNAL void m0_be_domain__0type_unregister | ( | struct m0_be_domain * | dom, |
struct m0_be_0type * | type | ||
) |
M0_INTERNAL void m0_be_domain__group_limits | ( | struct m0_be_domain * | dom, |
uint32_t * | group_nr, | ||
uint32_t * | tx_per_group | ||
) |
M0_INTERNAL void m0_be_domain_cleanup_by_location | ( | const char * | stob_domain_location | ) |
M0_INTERNAL struct m0_be_engine * m0_be_domain_engine | ( | struct m0_be_domain * | dom | ) |
M0_INTERNAL bool m0_be_domain_is_locked | ( | const struct m0_be_domain * | dom | ) |
M0_INTERNAL bool m0_be_domain_is_stob_log | ( | struct m0_be_domain * | dom, |
const struct m0_stob_id * | stob_id | ||
) |
M0_INTERNAL bool m0_be_domain_is_stob_seg | ( | struct m0_be_domain * | dom, |
const struct m0_stob_id * | stob_id | ||
) |
M0_INTERNAL struct m0_be_log * m0_be_domain_log | ( | struct m0_be_domain * | dom | ) |
M0_INTERNAL void m0_be_domain_module_setup | ( | struct m0_be_domain * | dom, |
const struct m0_be_domain_cfg * | cfg | ||
) |
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg | ( | const struct m0_be_domain * | dom, |
const void * | addr | ||
) |
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg0_get | ( | struct m0_be_domain * | dom | ) |
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg_by_addr | ( | struct m0_be_domain * | dom, |
void * | addr | ||
) |
Returns m0_be_seg the void * pointer is a part of. Returns NULL if there is no such segment.
Note: please don't cache m0_be_seg if it doesn't significantly improve the general performance significanly.
Definition at line 999 of file domain.c.
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg_by_id | ( | const struct m0_be_domain * | dom, |
uint64_t | id | ||
) |
M0_INTERNAL int m0_be_domain_seg_create | ( | struct m0_be_domain * | dom, |
struct m0_be_tx * | tx, | ||
const struct m0_be_0type_seg_cfg * | seg_cfg, | ||
struct m0_be_seg ** | out | ||
) |
M0_INTERNAL void m0_be_domain_seg_create_credit | ( | struct m0_be_domain * | dom, |
const struct m0_be_0type_seg_cfg * | seg_cfg, | ||
struct m0_be_tx_credit * | cred | ||
) |
M0_INTERNAL int m0_be_domain_seg_destroy | ( | struct m0_be_domain * | dom, |
struct m0_be_tx * | tx, | ||
struct m0_be_seg * | seg | ||
) |
Destroy functions for the segment dictionary and for the segment allocator are not called.
Current code doesn't do all necessary cleaning to be sure that nothing is allocated and there is no entry in segment dictionary before segment is destroyed.
However, it may be a problem with seg0 entries if objects they are describing were on destroyed segment. It may even lead to ABA problem. There is no such mechanism (yet) to keep track of these "lost" entries, so they are responsibility of a developer.
Definition at line 621 of file domain.c.
M0_INTERNAL void m0_be_domain_seg_destroy_credit | ( | struct m0_be_domain * | dom, |
struct m0_be_seg * | seg, | ||
struct m0_be_tx_credit * | cred | ||
) |
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg_first | ( | const struct m0_be_domain * | dom | ) |
M0_INTERNAL bool m0_be_domain_seg_is_valid | ( | struct m0_be_domain * | dom, |
struct m0_be_seg * | seg | ||
) |
The primary use for this function is to use it with conjunction with m0_be_domain_seg_by_addr(). The typical use case is to cache the segment and then check on each access if it's still valid. The pointer can't be just dereferenced directly because the segment can be destroyed at any moment and current interface doesn't provide a way to track this event.
Definition at line 1015 of file domain.c.
M0_INTERNAL struct m0_be_tx * m0_be_domain_tx_find | ( | struct m0_be_domain * | dom, |
uint64_t | id | ||
) |
M0_INTERNAL void m0_be_domain_tx_size_max | ( | struct m0_be_domain * | dom, |
struct m0_be_tx_credit * | cred, | ||
m0_bcount_t * | payload_size | ||
) |
M0_INTERNAL int m0_be_engine__exclusive_open_invariant | ( | struct m0_be_engine * | en, |
struct m0_be_tx * | excl | ||
) |
M0_INTERNAL void m0_be_engine__group_limits | ( | struct m0_be_engine * | en, |
uint32_t * | group_nr, | ||
uint32_t * | tx_per_group | ||
) |
M0_INTERNAL bool m0_be_engine__invariant | ( | struct m0_be_engine * | en | ) |
M0_INTERNAL struct m0_be_tx * m0_be_engine__tx_find | ( | struct m0_be_engine * | en, |
uint64_t | id | ||
) |
M0_INTERNAL void m0_be_engine__tx_fini | ( | struct m0_be_engine * | en, |
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_engine__tx_force | ( | struct m0_be_engine * | en, |
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_engine__tx_group_discard | ( | struct m0_be_engine * | en, |
struct m0_be_tx_group * | gr | ||
) |
M0_INTERNAL void m0_be_engine__tx_group_ready | ( | struct m0_be_engine * | en, |
struct m0_be_tx_group * | gr | ||
) |
M0_INTERNAL void m0_be_engine__tx_init | ( | struct m0_be_engine * | en, |
struct m0_be_tx * | tx, | ||
enum m0_be_tx_state | state | ||
) |
M0_INTERNAL void m0_be_engine__tx_state_set | ( | struct m0_be_engine * | en, |
struct m0_be_tx * | tx, | ||
enum m0_be_tx_state | state | ||
) |
M0_INTERNAL void m0_be_engine_fini | ( | struct m0_be_engine * | en | ) |
M0_INTERNAL void m0_be_engine_full_log_cb | ( | struct m0_be_log * | log | ) |
M0_INTERNAL void m0_be_engine_got_log_space_cb | ( | struct m0_be_log * | log | ) |
M0_INTERNAL int m0_be_engine_init | ( | struct m0_be_engine * | en, |
struct m0_be_domain * | dom, | ||
struct m0_be_engine_cfg * | en_cfg | ||
) |
M0_INTERNAL int m0_be_engine_start | ( | struct m0_be_engine * | en | ) |
M0_INTERNAL void m0_be_engine_stop | ( | struct m0_be_engine * | en | ) |
M0_INTERNAL void m0_be_engine_tx_size_max | ( | struct m0_be_engine * | en, |
struct m0_be_tx_credit * | cred, | ||
m0_bcount_t * | payload_size | ||
) |
M0_INTERNAL bool m0_be_fl__invariant | ( | struct m0_be_fl * | fl | ) |
M0_INTERNAL void m0_be_fl_add | ( | struct m0_be_fl * | fl, |
struct m0_be_tx * | tx, | ||
struct be_alloc_chunk * | chunk | ||
) |
M0_INTERNAL void m0_be_fl_credit | ( | struct m0_be_fl * | fl, |
enum m0_be_fl_op | fl_op, | ||
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL void m0_be_fl_del | ( | struct m0_be_fl * | fl, |
struct m0_be_tx * | tx, | ||
struct be_alloc_chunk * | chunk | ||
) |
M0_INTERNAL struct be_alloc_chunk * m0_be_fl_pick | ( | struct m0_be_fl * | fl, |
m0_bcount_t | size | ||
) |
M0_BE_FMT_DECLARE | ( | group | ) |
M0_BE_FMT_DECLARE | ( | log_store_header | ) |
M0_BE_FMT_DECLARE | ( | log_record_footer | ) |
M0_BE_FMT_DECLARE | ( | log_header | ) |
M0_BE_FMT_DECLARE | ( | cblock | ) |
M0_BE_FMT_DECLARE | ( | log_record_header | ) |
M0_BE_FMT_DEFINE_INIT_SIMPLE | ( | log_record_footer | ) |
M0_BE_FMT_DEFINE_INIT_SIMPLE | ( | log_store_header | ) |
M0_BE_FMT_DEFINE_INIT_SIMPLE | ( | cblock | ) |
M0_BE_FMT_DEFINE_INIT_SIMPLE | ( | log_header | ) |
M0_BE_FMT_DEFINE_XCODE | ( | log_record_header | ) |
M0_BE_FMT_DEFINE_XCODE | ( | log_record_footer | ) |
M0_BE_FMT_DEFINE_XCODE | ( | log_store_header | ) |
M0_BE_FMT_DEFINE_XCODE | ( | cblock | ) |
M0_BE_FMT_DEFINE_XCODE | ( | log_header | ) |
|
static |
M0_INTERNAL int m0_be_fmt_group_decode | ( | struct m0_be_fmt_group ** | fg, |
struct m0_bufvec_cursor * | cur, | ||
const struct m0_be_fmt_decode_cfg * | cfg | ||
) |
M0_INTERNAL void m0_be_fmt_group_decoded_free | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL int m0_be_fmt_group_encode | ( | struct m0_be_fmt_group * | fg, |
struct m0_bufvec_cursor * | cur | ||
) |
M0_INTERNAL void m0_be_fmt_group_fini | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL struct m0_be_fmt_group_info * m0_be_fmt_group_info_get | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL int m0_be_fmt_group_init | ( | struct m0_be_fmt_group * | fg, |
const struct m0_be_fmt_group_cfg * | cfg | ||
) |
M0_INTERNAL void m0_be_fmt_group_reg_add | ( | struct m0_be_fmt_group * | fg, |
const struct m0_be_fmt_reg * | freg | ||
) |
M0_INTERNAL void m0_be_fmt_group_reg_by_id | ( | const struct m0_be_fmt_group * | fg, |
uint32_t | index, | ||
struct m0_be_fmt_reg * | freg | ||
) |
M0_INTERNAL uint32_t m0_be_fmt_group_reg_nr | ( | const struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL void m0_be_fmt_group_reset | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL bool m0_be_fmt_group_sanity_check | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL m0_bcount_t m0_be_fmt_group_size | ( | struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL m0_bcount_t m0_be_fmt_group_size_max | ( | const struct m0_be_fmt_group_cfg * | cfg | ) |
M0_INTERNAL void m0_be_fmt_group_tx_add | ( | struct m0_be_fmt_group * | fg, |
const struct m0_be_fmt_tx * | ftx | ||
) |
M0_INTERNAL void m0_be_fmt_group_tx_by_id | ( | const struct m0_be_fmt_group * | fg, |
uint32_t | index, | ||
struct m0_be_fmt_tx * | ftx | ||
) |
M0_INTERNAL uint32_t m0_be_fmt_group_tx_nr | ( | const struct m0_be_fmt_group * | fg | ) |
M0_INTERNAL bool m0_be_fmt_log_record_header__invariant | ( | struct m0_be_fmt_log_record_header * | header, |
struct m0_be_log * | log | ||
) |
M0_INTERNAL void m0_be_fmt_log_record_header_fini | ( | struct m0_be_fmt_log_record_header * | obj | ) |
M0_INTERNAL int m0_be_fmt_log_record_header_init | ( | struct m0_be_fmt_log_record_header * | obj, |
const struct m0_be_fmt_log_record_header_cfg * | cfg | ||
) |
M0_INTERNAL void m0_be_fmt_log_record_header_io_size_add | ( | struct m0_be_fmt_log_record_header * | obj, |
m0_bcount_t | size | ||
) |
M0_INTERNAL void m0_be_fmt_log_record_header_reset | ( | struct m0_be_fmt_log_record_header * | obj | ) |
M0_INTERNAL m0_bcount_t m0_be_fmt_log_record_header_size_max | ( | const struct m0_be_fmt_log_record_header_cfg * | cfg | ) |
M0_INTERNAL int m0_be_fmt_type_trace | ( | const struct m0_xcode_cursor * | it | ) |
M0_INTERNAL void m0_be_fmt_type_trace_end | ( | const struct m0_xcode_cursor * | it | ) |
M0_INTERNAL void m0_be_free | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
void * | ptr | ||
) |
Free memory allocated with m0_be_alloc().
Definition at line 1151 of file alloc.c.
M0_INTERNAL void m0_be_free_aligned | ( | struct m0_be_allocator * | a, |
struct m0_be_tx * | tx, | ||
struct m0_be_op * | op, | ||
void * | ptr | ||
) |
Free memory allocated with m0_be_alloc_aligned().
a | Allocator |
tx | Free operation will be done in this transaction |
op | See m0_be_op. |
ptr | Pointer to memory to release. May be NULL - in this case call to this function is no-op. If ptr is not NULL, then it should be exactly the pointer returned from m0_be_alloc() for allocator a. Double m0_be_free() is not allowed for the same pointer from one call to m0_be_alloc(). |
Definition at line 1101 of file alloc.c.
M0_INTERNAL bool m0_be_group_format__invariant | ( | struct m0_be_group_format * | go | ) |
Definition at line 297 of file tx_group_format.c.
M0_INTERNAL int m0_be_group_format_allocate | ( | struct m0_be_group_format * | gft | ) |
Definition at line 302 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_deallocate | ( | struct m0_be_group_format * | gft | ) |
Definition at line 307 of file tx_group_format.c.
M0_INTERNAL int m0_be_group_format_decode | ( | struct m0_be_group_format * | gft | ) |
Definition at line 345 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_discard | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_item * | ldi | ||
) |
Definition at line 550 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_encode | ( | struct m0_be_group_format * | gft | ) |
Definition at line 327 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_fini | ( | struct m0_be_group_format * | gft | ) |
Definition at line 292 of file tx_group_format.c.
M0_INTERNAL struct m0_be_fmt_group_info * m0_be_group_format_group_info | ( | struct m0_be_group_format * | gft | ) |
Definition at line 431 of file tx_group_format.c.
M0_INTERNAL int m0_be_group_format_init | ( | struct m0_be_group_format * | gft, |
struct m0_be_group_format_cfg * | gft_cfg, | ||
struct m0_be_tx_group * | group, | ||
struct m0_be_log * | log | ||
) |
Definition at line 283 of file tx_group_format.c.
M0_INTERNAL m0_bindex_t m0_be_group_format_log_discarded | ( | const struct m0_be_group_format * | gft | ) |
Returns BE log discarded pointer at m0_be_group_format_log_use() time.
Definition at line 461 of file tx_group_format.c.
M0_INTERNAL m0_bindex_t m0_be_group_format_log_position | ( | const struct m0_be_group_format * | gft | ) |
Returns absolutute position of this group in BE log
Definition at line 455 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_log_read | ( | struct m0_be_group_format * | gft, |
struct m0_be_op * | op | ||
) |
Definition at line 504 of file tx_group_format.c.
M0_INTERNAL m0_bcount_t m0_be_group_format_log_reserved_size | ( | struct m0_be_log * | log, |
struct m0_be_tx_credit * | cred, | ||
m0_bcount_t | cred_payload | ||
) |
Definition at line 437 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_log_use | ( | struct m0_be_group_format * | gft, |
m0_bcount_t | size_reserved | ||
) |
Definition at line 467 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_log_write | ( | struct m0_be_group_format * | gft, |
struct m0_be_op * | op | ||
) |
Definition at line 497 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_module_setup | ( | struct m0_be_group_format * | gft, |
struct m0_be_group_format_cfg * | gft_cfg | ||
) |
Definition at line 249 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_prepare | ( | struct m0_be_group_format * | gft, |
struct m0_be_op * | op | ||
) |
Definition at line 312 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_recovery_prepare | ( | struct m0_be_group_format * | gft, |
struct m0_be_log * | log | ||
) |
Definition at line 487 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_reg_get | ( | const struct m0_be_group_format * | gft, |
uint32_t | index, | ||
struct m0_be_reg_d * | rd | ||
) |
Definition at line 391 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_reg_log_add | ( | struct m0_be_group_format * | gft, |
const struct m0_be_reg_d * | rd | ||
) |
Definition at line 366 of file tx_group_format.c.
M0_INTERNAL uint32_t m0_be_group_format_reg_nr | ( | const struct m0_be_group_format * | gft | ) |
Definition at line 385 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_reg_seg_add | ( | struct m0_be_group_format * | gft, |
const struct m0_be_reg_d * | rd | ||
) |
Definition at line 376 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_reset | ( | struct m0_be_group_format * | gft | ) |
Definition at line 163 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_seg_io_credit | ( | struct m0_be_group_format_cfg * | gft_cfg, |
struct m0_be_io_credit * | io_cred | ||
) |
M0_INTERNAL void m0_be_group_format_seg_place | ( | struct m0_be_group_format * | gft, |
struct m0_be_op * | op | ||
) |
Definition at line 566 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_seg_place_prepare | ( | struct m0_be_group_format * | gft | ) |
Definition at line 511 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_tx_add | ( | struct m0_be_group_format * | gft, |
struct m0_be_fmt_tx * | ftx | ||
) |
Definition at line 408 of file tx_group_format.c.
M0_INTERNAL void m0_be_group_format_tx_get | ( | const struct m0_be_group_format * | gft, |
uint32_t | index, | ||
struct m0_be_fmt_tx * | ftx | ||
) |
Definition at line 421 of file tx_group_format.c.
M0_INTERNAL uint32_t m0_be_group_format_tx_nr | ( | const struct m0_be_group_format * | gft | ) |
Definition at line 415 of file tx_group_format.c.
M0_INTERNAL bool m0_be_io__invariant | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_add | ( | struct m0_be_io * | bio, |
struct m0_stob * | stob, | ||
void * | ptr_user, | ||
m0_bindex_t | offset_stob, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL void m0_be_io_add_nostob | ( | struct m0_be_io * | bio, |
void * | ptr_user, | ||
m0_bindex_t | offset_stob, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL int m0_be_io_allocate | ( | struct m0_be_io * | bio, |
struct m0_be_io_credit * | iocred | ||
) |
M0_INTERNAL void m0_be_io_configure | ( | struct m0_be_io * | bio, |
enum m0_stob_io_opcode | opcode | ||
) |
M0_INTERNAL void m0_be_io_credit_add | ( | struct m0_be_io_credit * | iocred0, |
const struct m0_be_io_credit * | iocred1 | ||
) |
M0_INTERNAL bool m0_be_io_credit_le | ( | const struct m0_be_io_credit * | iocred0, |
const struct m0_be_io_credit * | iocred1 | ||
) |
M0_INTERNAL void m0_be_io_deallocate | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_fini | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL int m0_be_io_init | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL bool m0_be_io_is_empty | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL enum m0_stob_io_opcode m0_be_io_opcode | ( | struct m0_be_io * | io | ) |
M0_INTERNAL void m0_be_io_reset | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_sched_add | ( | struct m0_be_io_sched * | sched, |
struct m0_be_io * | io, | ||
struct m0_ext * | ext, | ||
struct m0_be_op * | op | ||
) |
Definition at line 176 of file io_sched.c.
M0_INTERNAL void m0_be_io_sched_fini | ( | struct m0_be_io_sched * | sched | ) |
Definition at line 64 of file io_sched.c.
M0_INTERNAL int m0_be_io_sched_init | ( | struct m0_be_io_sched * | sched, |
struct m0_be_io_sched_cfg * | cfg | ||
) |
Definition at line 51 of file io_sched.c.
M0_INTERNAL bool m0_be_io_sched_is_locked | ( | struct m0_be_io_sched * | sched | ) |
Definition at line 80 of file io_sched.c.
M0_INTERNAL void m0_be_io_sched_lock | ( | struct m0_be_io_sched * | sched | ) |
Definition at line 70 of file io_sched.c.
M0_INTERNAL void m0_be_io_sched_unlock | ( | struct m0_be_io_sched * | sched | ) |
Definition at line 75 of file io_sched.c.
M0_INTERNAL int m0_be_io_single | ( | struct m0_stob * | stob, |
enum m0_stob_io_opcode | opcode, | ||
void * | ptr_user, | ||
m0_bindex_t | offset_stob, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL m0_bcount_t m0_be_io_size | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_sort | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_stob_assign | ( | struct m0_be_io * | bio, |
struct m0_stob * | stob, | ||
m0_bindex_t | offset, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL void m0_be_io_stob_move | ( | struct m0_be_io * | bio, |
struct m0_stob * | stob, | ||
m0_bindex_t | offset, | ||
m0_bindex_t | win_start, | ||
m0_bcount_t | win_size | ||
) |
M0_INTERNAL void m0_be_io_sync_enable | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL bool m0_be_io_sync_is_enabled | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void * m0_be_io_user_data | ( | struct m0_be_io * | bio | ) |
M0_INTERNAL void m0_be_io_user_data_set | ( | struct m0_be_io * | bio, |
void * | data | ||
) |
M0_INTERNAL void m0_be_io_vec_pack | ( | struct m0_be_io * | bio | ) |
Packs I/O vectors.
The bio must be filled through m0_be_io_add_nostob() and all parts must be assigned with stobs.
Definition at line 470 of file io.c.
M0_INTERNAL void m0_be_list_add | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx, | ||
void * | obj | ||
) |
M0_INTERNAL void m0_be_list_add_after | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx, | ||
void * | obj, | ||
void * | obj_new | ||
) |
M0_INTERNAL void m0_be_list_add_before | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx, | ||
void * | obj, | ||
void * | obj_new | ||
) |
M0_INTERNAL void m0_be_list_add_tail | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx, | ||
void * | obj | ||
) |
M0_INTERNAL void m0_be_list_create | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_list_credit | ( | enum m0_be_list_op | optype, |
m0_bcount_t | nr, | ||
struct m0_be_tx_credit * | accum | ||
) |
M0_BE_LIST_DEFINE | ( | be_seg_dict | , |
static | , | ||
struct be_seg_dict_keyval | |||
) |
M0_BE_LIST_DEFINE | ( | fl | , |
static | , | ||
struct be_alloc_chunk | |||
) |
M0_INTERNAL void m0_be_list_del | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx, | ||
void * | obj | ||
) |
M0_BE_LIST_DESCR_DEFINE | ( | be_seg_dict | , |
"be_seg_dict" | , | ||
static | , | ||
struct be_seg_dict_keyval | , | ||
dkv_link | , | ||
dkv_magic | , | ||
M0_BE_SEG_DICT_MAGIC | , | ||
M0_BE_SEG_DICT_HEAD_MAGIC | |||
) |
M0_BE_LIST_DESCR_DEFINE | ( | fl | , |
"m0_be_fl" | , | ||
static | , | ||
struct be_alloc_chunk | , | ||
bac_linkage_free | , | ||
bac_magic_free | , | ||
M0_BE_ALLOC_FREE_LINK_MAGIC | , | ||
M0_BE_ALLOC_FREE_MAGIC | |||
) |
M0_INTERNAL void m0_be_list_destroy | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void * m0_be_list_head | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr | ||
) |
M0_INTERNAL bool m0_be_list_is_empty | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr | ||
) |
M0_INTERNAL void * m0_be_list_next | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
const void * | obj | ||
) |
M0_INTERNAL void * m0_be_list_prev | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr, | ||
const void * | obj | ||
) |
M0_INTERNAL void * m0_be_list_tail | ( | struct m0_be_list * | blist, |
const struct m0_be_list_descr * | descr | ||
) |
M0_INTERNAL bool m0_be_log__invariant | ( | struct m0_be_log * | log | ) |
M0_INTERNAL uint32_t m0_be_log_bshift | ( | struct m0_be_log * | log | ) |
M0_INTERNAL void m0_be_log_close | ( | struct m0_be_log * | log | ) |
M0_INTERNAL bool m0_be_log_contains_stob | ( | struct m0_be_log * | log, |
const struct m0_stob_id * | stob_id | ||
) |
M0_INTERNAL int m0_be_log_create | ( | struct m0_be_log * | log, |
struct m0_be_log_cfg * | log_cfg | ||
) |
M0_INTERNAL void m0_be_log_destroy | ( | struct m0_be_log * | log | ) |
M0_INTERNAL void m0_be_log_discard_fini | ( | struct m0_be_log_discard * | ld | ) |
Definition at line 135 of file log_discard.c.
M0_INTERNAL void m0_be_log_discard_flush | ( | struct m0_be_log_discard * | ld, |
struct m0_be_op * | op | ||
) |
Definition at line 374 of file log_discard.c.
M0_INTERNAL int m0_be_log_discard_init | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_cfg * | ld_cfg | ||
) |
Definition at line 85 of file log_discard.c.
M0_INTERNAL struct m0_ext * m0_be_log_discard_item_ext | ( | struct m0_be_log_discard_item * | ldi | ) |
M0_INTERNAL void m0_be_log_discard_item_ext_set | ( | struct m0_be_log_discard_item * | ldi, |
struct m0_ext * | ext | ||
) |
M0_INTERNAL void m0_be_log_discard_item_finished | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_item * | ldi | ||
) |
Definition at line 417 of file log_discard.c.
M0_INTERNAL void m0_be_log_discard_item_get | ( | struct m0_be_log_discard * | ld, |
struct m0_be_op * | op, | ||
struct m0_be_log_discard_item ** | ldi | ||
) |
M0_INTERNAL void m0_be_log_discard_item_put | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_item * | ldi | ||
) |
Definition at line 451 of file log_discard.c.
M0_INTERNAL void m0_be_log_discard_item_starting | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_item * | ldi | ||
) |
Definition at line 400 of file log_discard.c.
M0_INTERNAL void * m0_be_log_discard_item_user_data | ( | struct m0_be_log_discard_item * | ldi | ) |
M0_INTERNAL void m0_be_log_discard_item_user_data_set | ( | struct m0_be_log_discard_item * | ldi, |
void * | data | ||
) |
M0_INTERNAL void m0_be_log_discard_sync | ( | struct m0_be_log_discard * | ld | ) |
Definition at line 367 of file log_discard.c.
M0_INTERNAL bool m0_be_log_header__is_eq | ( | struct m0_be_fmt_log_header * | hdr1, |
struct m0_be_fmt_log_header * | hdr2 | ||
) |
M0_INTERNAL bool m0_be_log_header__repair | ( | struct m0_be_fmt_log_header ** | hdrs, |
int | nr, | ||
struct m0_be_fmt_log_header * | out | ||
) |
M0_INTERNAL void m0_be_log_header__set | ( | struct m0_be_fmt_log_header * | hdr, |
m0_bindex_t | discarded, | ||
m0_bindex_t | lsn, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL int m0_be_log_header_read | ( | struct m0_be_log * | log, |
struct m0_be_fmt_log_header * | log_hdr | ||
) |
M0_INTERNAL int m0_be_log_io_allocate | ( | struct m0_be_log_io * | lio, |
struct m0_be_io_credit * | iocred, | ||
uint32_t | log_bshift | ||
) |
Definition at line 114 of file log_sched.c.
M0_INTERNAL struct m0_be_io * m0_be_log_io_be_io | ( | struct m0_be_log_io * | lio | ) |
M0_INTERNAL struct m0_bufvec * m0_be_log_io_bufvec | ( | struct m0_be_log_io * | lio | ) |
M0_INTERNAL void m0_be_log_io_deallocate | ( | struct m0_be_log_io * | lio | ) |
Definition at line 150 of file log_sched.c.
M0_INTERNAL void m0_be_log_io_fini | ( | struct m0_be_log_io * | lio | ) |
M0_INTERNAL int m0_be_log_io_init | ( | struct m0_be_log_io * | lio | ) |
M0_INTERNAL bool m0_be_log_io_is_empty | ( | struct m0_be_log_io * | lio | ) |
Definition at line 180 of file log_sched.c.
M0_INTERNAL void m0_be_log_io_reset | ( | struct m0_be_log_io * | lio | ) |
Definition at line 106 of file log_sched.c.
M0_INTERNAL void * m0_be_log_io_user_data | ( | struct m0_be_log_io * | lio | ) |
Definition at line 175 of file log_sched.c.
M0_INTERNAL void m0_be_log_io_user_data_set | ( | struct m0_be_log_io * | lio, |
void * | data | ||
) |
Definition at line 169 of file log_sched.c.
M0_INTERNAL void m0_be_log_module_setup | ( | struct m0_be_log * | log, |
struct m0_be_log_cfg * | lg_cfg, | ||
bool | create_mode | ||
) |
M0_INTERNAL int m0_be_log_open | ( | struct m0_be_log * | log, |
struct m0_be_log_cfg * | log_cfg | ||
) |
M0_INTERNAL int m0_be_log_record_allocate | ( | struct m0_be_log_record * | record | ) |
Allocates buffers for log i/o that were created through m0_be_log_record_io_create().
Definition at line 615 of file log.c.
M0_INTERNAL void m0_be_log_record_assign | ( | struct m0_be_log_record * | record, |
struct m0_be_log_record_iter * | iter, | ||
bool | need_discard | ||
) |
Assigns log record iterator to log record. Copies information from iter to record for further reading of the record's buffers.
record | Initialised and allocated log record. After execution represents log record which is specified by iter. Record's buffers have uninitialised content. |
need_discard | Specifies if the record will be discarded. Record should be discarded only if user reads it for re-applying. |
Definition at line 467 of file log.c.
M0_INTERNAL void m0_be_log_record_deallocate | ( | struct m0_be_log_record * | record | ) |
M0_INTERNAL void m0_be_log_record_discard | ( | struct m0_be_log * | log, |
m0_bcount_t | size | ||
) |
M0_INTERNAL m0_bindex_t m0_be_log_record_discarded | ( | const struct m0_be_log_record * | record | ) |
M0_INTERNAL void m0_be_log_record_ext | ( | struct m0_be_log_record * | record, |
struct m0_ext * | ext | ||
) |
M0_INTERNAL void m0_be_log_record_fini | ( | struct m0_be_log_record * | record | ) |
M0_INTERNAL void m0_be_log_record_init | ( | struct m0_be_log_record * | record, |
struct m0_be_log * | log | ||
) |
M0_INTERNAL int m0_be_log_record_initial | ( | struct m0_be_log * | log, |
struct m0_be_log_record_iter * | curr | ||
) |
M0_INTERNAL struct m0_bufvec * m0_be_log_record_io_bufvec | ( | struct m0_be_log_record * | record, |
int | index | ||
) |
M0_INTERNAL int m0_be_log_record_io_create | ( | struct m0_be_log_record * | record, |
m0_bcount_t | size_max | ||
) |
M0_INTERNAL void m0_be_log_record_io_launch | ( | struct m0_be_log_record * | record, |
struct m0_be_op * | op | ||
) |
M0_INTERNAL void m0_be_log_record_io_prepare | ( | struct m0_be_log_record * | record, |
enum m0_stob_io_opcode | opcode, | ||
m0_bcount_t | size_reserved | ||
) |
M0_INTERNAL void m0_be_log_record_io_size_set | ( | struct m0_be_log_record * | record, |
int | index, | ||
m0_bcount_t | size | ||
) |
M0_INTERNAL void m0_be_log_record_iter_copy | ( | struct m0_be_log_record_iter * | dest, |
struct m0_be_log_record_iter * | src | ||
) |
M0_INTERNAL void m0_be_log_record_iter_fini | ( | struct m0_be_log_record_iter * | iter | ) |
M0_INTERNAL int m0_be_log_record_iter_init | ( | struct m0_be_log_record_iter * | iter | ) |
M0_INTERNAL int m0_be_log_record_next | ( | struct m0_be_log * | log, |
const struct m0_be_log_record_iter * | curr, | ||
struct m0_be_log_record_iter * | next | ||
) |
M0_INTERNAL m0_bindex_t m0_be_log_record_position | ( | const struct m0_be_log_record * | record | ) |
M0_INTERNAL int m0_be_log_record_prev | ( | struct m0_be_log * | log, |
const struct m0_be_log_record_iter * | curr, | ||
struct m0_be_log_record_iter * | prev | ||
) |
M0_INTERNAL void m0_be_log_record_reset | ( | struct m0_be_log_record * | record | ) |
M0_INTERNAL void m0_be_log_record_skip_discard | ( | struct m0_be_log_record * | record | ) |
M0_INTERNAL m0_bindex_t m0_be_log_recovery_discarded | ( | struct m0_be_log * | log | ) |
M0_INTERNAL bool m0_be_log_recovery_record_available | ( | struct m0_be_log * | log | ) |
M0_INTERNAL void m0_be_log_recovery_record_get | ( | struct m0_be_log * | log, |
struct m0_be_log_record_iter * | iter | ||
) |
M0_INTERNAL int m0_be_log_reserve | ( | struct m0_be_log * | log, |
m0_bcount_t | size | ||
) |
M0_INTERNAL m0_bcount_t m0_be_log_reserved_size | ( | struct m0_be_log * | log, |
m0_bcount_t * | lio_size, | ||
int | lio_nr | ||
) |
M0_INTERNAL void m0_be_log_sched_add | ( | struct m0_be_log_sched * | sched, |
struct m0_be_log_io * | lio, | ||
struct m0_be_op * | op | ||
) |
Definition at line 67 of file log_sched.c.
M0_INTERNAL void m0_be_log_sched_fini | ( | struct m0_be_log_sched * | sched | ) |
Definition at line 47 of file log_sched.c.
M0_INTERNAL int m0_be_log_sched_init | ( | struct m0_be_log_sched * | sched, |
struct m0_be_log_sched_cfg * | cfg | ||
) |
Definition at line 38 of file log_sched.c.
M0_INTERNAL bool m0_be_log_sched_is_locked | ( | struct m0_be_log_sched * | sched | ) |
Definition at line 62 of file log_sched.c.
M0_INTERNAL void m0_be_log_sched_lock | ( | struct m0_be_log_sched * | sched | ) |
Definition at line 52 of file log_sched.c.
M0_INTERNAL void m0_be_log_sched_unlock | ( | struct m0_be_log_sched * | sched | ) |
Definition at line 57 of file log_sched.c.
M0_INTERNAL bool m0_be_log_store__invariant | ( | struct m0_be_log_store * | ls | ) |
Definition at line 73 of file log_store.c.
M0_INTERNAL uint32_t m0_be_log_store_bshift | ( | struct m0_be_log_store * | ls | ) |
Definition at line 591 of file log_store.c.
M0_INTERNAL m0_bcount_t m0_be_log_store_buf_size | ( | struct m0_be_log_store * | ls | ) |
M0_INTERNAL void m0_be_log_store_close | ( | struct m0_be_log_store * | ls | ) |
Definition at line 586 of file log_store.c.
M0_INTERNAL bool m0_be_log_store_contains_stob | ( | struct m0_be_log_store * | ls, |
const struct m0_stob_id * | stob_id | ||
) |
Definition at line 768 of file log_store.c.
M0_INTERNAL int m0_be_log_store_create | ( | struct m0_be_log_store * | ls, |
struct m0_be_log_store_cfg * | ls_cfg | ||
) |
Definition at line 575 of file log_store.c.
M0_INTERNAL void m0_be_log_store_destroy | ( | struct m0_be_log_store * | ls | ) |
Definition at line 581 of file log_store.c.
M0_INTERNAL void m0_be_log_store_io_credit | ( | struct m0_be_log_store * | ls, |
struct m0_be_io_credit * | accum | ||
) |
Definition at line 601 of file log_store.c.
M0_INTERNAL void m0_be_log_store_io_discard | ( | struct m0_be_log_store * | ls, |
m0_bindex_t | offset, | ||
struct m0_be_op * | op | ||
) |
Discards information about range [0, offset).
Definition at line 619 of file log_store.c.
M0_INTERNAL void m0_be_log_store_io_translate | ( | struct m0_be_log_store * | ls, |
m0_bindex_t | position, | ||
struct m0_be_io * | bio | ||
) |
Re-calculates stob indexes for BE I/O operation. Logically, this function adds position value to the stob indexes and translates them into proper pysical offsets. This operation may add new I/O vector to the bio or even new stob. Therefore, user must allocate additional space in m0_be_io structure.
position | logical offset |
Definition at line 637 of file log_store.c.
M0_INTERNAL int m0_be_log_store_io_window | ( | struct m0_be_log_store * | ls, |
m0_bindex_t | offset, | ||
m0_bcount_t * | length | ||
) |
Get I/O window for the given offset.
Definition at line 607 of file log_store.c.
M0_INTERNAL void m0_be_log_store_module_setup | ( | struct m0_be_log_store * | ls, |
struct m0_be_log_store_cfg * | ls_cfg, | ||
bool | create_mode | ||
) |
Definition at line 534 of file log_store.c.
M0_INTERNAL int m0_be_log_store_open | ( | struct m0_be_log_store * | ls, |
struct m0_be_log_store_cfg * | ls_cfg | ||
) |
Definition at line 569 of file log_store.c.
M0_INTERNAL bool m0_be_log_store_overwrites | ( | struct m0_be_log_store * | ls, |
m0_bindex_t | index, | ||
m0_bcount_t | size, | ||
m0_bindex_t | position | ||
) |
Definition at line 752 of file log_store.c.
M0_INTERNAL struct m0_be_log_io * m0_be_log_store_rbuf_io_first | ( | struct m0_be_log_store * | ls, |
enum m0_be_log_store_io_type | io_type, | ||
struct m0_be_op ** | op, | ||
unsigned * | iter | ||
) |
Definition at line 692 of file log_store.c.
M0_INTERNAL struct m0_be_log_io * m0_be_log_store_rbuf_io_next | ( | struct m0_be_log_store * | ls, |
enum m0_be_log_store_io_type | io_type, | ||
struct m0_be_op ** | op, | ||
unsigned * | iter | ||
) |
Definition at line 702 of file log_store.c.
M0_INTERNAL void m0_be_log_store_rbuf_io_reset | ( | struct m0_be_log_store * | ls, |
enum m0_be_log_store_io_type | io_type | ||
) |
Definition at line 718 of file log_store.c.
M0_INTERNAL struct m0_buf * m0_be_log_store_rbuf_read_buf_first | ( | struct m0_be_log_store * | ls, |
unsigned * | iter | ||
) |
M0_INTERNAL struct m0_buf * m0_be_log_store_rbuf_read_buf_next | ( | struct m0_be_log_store * | ls, |
unsigned * | iter | ||
) |
M0_INTERNAL struct m0_buf * m0_be_log_store_rbuf_write_buf | ( | struct m0_be_log_store * | ls | ) |
m0_be_log_store can provide interface to:
In this case m0_be_log_store can use any kind of data as a redundant buffer, not just m0_be_log_header.
Definition at line 654 of file log_store.c.
M0_INTERNAL void m0_be_log_unreserve | ( | struct m0_be_log * | log, |
m0_bcount_t | size | ||
) |
Unreserves space that was previously reserved with m0_be_log_reserve(). Used if tx failed, but log space is already reserved.
Definition at line 868 of file log.c.
M0_INTERNAL void m0_be_op_active | ( | struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_callback_set | ( | struct m0_be_op * | op, |
m0_be_op_cb_t | cb, | ||
void * | param, | ||
enum m0_be_op_state | state | ||
) |
M0_INTERNAL void m0_be_op_done | ( | struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_fini | ( | struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_init | ( | struct m0_be_op * | op | ) |
M0_INTERNAL bool m0_be_op_is_done | ( | struct m0_be_op * | op | ) |
M0_INTERNAL bool m0_be_op_is_locked | ( | const struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_lock | ( | struct m0_be_op * | op | ) |
M0_INTERNAL int m0_be_op_rc | ( | struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_rc_set | ( | struct m0_be_op * | op, |
int | rc | ||
) |
M0_INTERNAL void m0_be_op_reset | ( | struct m0_be_op * | op | ) |
Moves the fom to the "next_state" and arranges for state transitions to continue when "op" completes. Returns value suitable to be returned from m0_fom_ops::fo_tick() implementation.
Definition at line 267 of file op.c.
M0_INTERNAL void m0_be_op_unlock | ( | struct m0_be_op * | op | ) |
M0_INTERNAL void m0_be_op_wait | ( | struct m0_be_op * | op | ) |
Waits for the operation to complete.
Definition at line 286 of file op.c.
M0_INTERNAL void m0_be_pd_fini | ( | struct m0_be_pd * | pd | ) |
M0_INTERNAL int m0_be_pd_init | ( | struct m0_be_pd * | pd, |
struct m0_be_pd_cfg * | pd_cfg | ||
) |
M0_INTERNAL void m0_be_pd_io_add | ( | struct m0_be_pd * | pd, |
struct m0_be_pd_io * | pdio, | ||
struct m0_ext * | ext, | ||
struct m0_be_op * | op | ||
) |
M0_INTERNAL struct m0_be_io * m0_be_pd_io_be_io | ( | struct m0_be_pd_io * | pdio | ) |
M0_INTERNAL void m0_be_pd_io_get | ( | struct m0_be_pd * | pd, |
struct m0_be_pd_io ** | pdio, | ||
struct m0_be_op * | op | ||
) |
M0_INTERNAL void m0_be_pd_io_put | ( | struct m0_be_pd * | pd, |
struct m0_be_pd_io * | pdio | ||
) |
M0_INTERNAL void m0_be_pd_sync | ( | struct m0_be_pd * | pd, |
m0_bindex_t | pos, | ||
struct m0_stob ** | stobs, | ||
int | nr, | ||
struct m0_be_op * | op | ||
) |
M0_INTERNAL void m0_be_pool_add | ( | const struct m0_be_pool_descr * | d, |
struct m0_be_pool * | pool, | ||
void * | obj | ||
) |
M0_BE_POOL_DEFINE | ( | pdio | , |
static | , | ||
struct m0_be_pd_io | |||
) |
M0_BE_POOL_DEFINE | ( | ld | , |
static | , | ||
struct m0_be_log_discard_item | |||
) |
M0_INTERNAL void * m0_be_pool_del | ( | const struct m0_be_pool_descr * | d, |
struct m0_be_pool * | pool | ||
) |
M0_BE_POOL_DESCR_DEFINE | ( | pdio | , |
"pd_io pool" | , | ||
static | , | ||
struct m0_be_pd_io | , | ||
bpi_pool_item | , | ||
bpi_pool_magic | , | ||
M0_BE_PD_IO_MAGIC | |||
) |
M0_BE_POOL_DESCR_DEFINE | ( | ld | , |
"m0_be_log_discard::lds_item_pool" | , | ||
static | , | ||
struct m0_be_log_discard_item | , | ||
ldi_pool_item | , | ||
ldi_pool_magic | , | ||
M0_BE_LOG_DISCARD_POOL_MAGIC | |||
) |
M0_INTERNAL void m0_be_pool_fini | ( | struct m0_be_pool * | pool | ) |
M0_INTERNAL void m0_be_pool_get | ( | const struct m0_be_pool_descr * | d, |
struct m0_be_pool * | pool, | ||
void ** | obj, | ||
struct m0_be_op * | op | ||
) |
M0_INTERNAL int m0_be_pool_init | ( | struct m0_be_pool * | pool, |
struct m0_be_pool_cfg * | cfg | ||
) |
M0_INTERNAL void m0_be_pool_put | ( | const struct m0_be_pool_descr * | d, |
struct m0_be_pool * | pool, | ||
void * | obj | ||
) |
M0_INTERNAL void m0_be_queue_end | ( | struct m0_be_queue * | bq | ) |
M0_INTERNAL void m0_be_queue_fini | ( | struct m0_be_queue * | bq | ) |
M0_INTERNAL void m0_be_queue_get | ( | struct m0_be_queue * | bq, |
struct m0_be_op * | op, | ||
struct m0_buf * | data, | ||
bool * | successful | ||
) |
M0_INTERNAL int m0_be_queue_init | ( | struct m0_be_queue * | bq, |
struct m0_be_queue_cfg * | cfg | ||
) |
M0_INTERNAL void m0_be_queue_lock | ( | struct m0_be_queue * | bq | ) |
M0_INTERNAL bool m0_be_queue_peek | ( | struct m0_be_queue * | bq, |
struct m0_buf * | data | ||
) |
M0_INTERNAL void m0_be_queue_put | ( | struct m0_be_queue * | bq, |
struct m0_be_op * | op, | ||
const struct m0_buf * | data | ||
) |
M0_INTERNAL void m0_be_queue_unlock | ( | struct m0_be_queue * | bq | ) |
M0_INTERNAL bool m0_be_rdt__invariant | ( | const struct m0_be_reg_d_tree * | rdt | ) |
Definition at line 224 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_rdt_del | ( | struct m0_be_reg_d_tree * | rdt, |
const struct m0_be_reg_d * | rd | ||
) |
Delete a region from the tree.
rdt | m0_be_reg_d tree |
rd | region to delete |
Definition at line 347 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_rdt_find | ( | const struct m0_be_reg_d_tree * | rdt, |
void * | addr | ||
) |
Find region by address.
Definition at line 299 of file tx_regmap.c.
M0_INTERNAL void m0_be_rdt_fini | ( | struct m0_be_reg_d_tree * | rdt | ) |
Finalize m0_be_reg_d tree. Free all memory allocated
Definition at line 218 of file tx_regmap.c.
M0_INTERNAL int m0_be_rdt_init | ( | struct m0_be_reg_d_tree * | rdt, |
size_t | size_max | ||
) |
Initialize m0_be_reg_d tree.
Region is from the tree iff it is returned by m0_be_rdt_find(), m0_be_rdt_next(), m0_be_rdt_del().
Definition at line 207 of file tx_regmap.c.
M0_INTERNAL void m0_be_rdt_ins | ( | struct m0_be_reg_d_tree * | rdt, |
const struct m0_be_reg_d * | rd | ||
) |
Insert a region in the tree.
Definition at line 328 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_rdt_next | ( | const struct m0_be_reg_d_tree * | rdt, |
struct m0_be_reg_d * | prev | ||
) |
Find next region after the given region.
rdt | m0_be_reg_d tree |
prev | region to find after. Should be a region from the tree. |
Definition at line 314 of file tx_regmap.c.
M0_INTERNAL void m0_be_rdt_reset | ( | struct m0_be_reg_d_tree * | rdt | ) |
Definition at line 367 of file tx_regmap.c.
M0_INTERNAL size_t m0_be_rdt_size | ( | const struct m0_be_reg_d_tree * | rdt | ) |
Return current size of the tree, in number of m0_be_reg_d
Definition at line 241 of file tx_regmap.c.
M0_INTERNAL void m0_be_recovery_fini | ( | struct m0_be_recovery * | rvr | ) |
Definition at line 158 of file recovery.c.
M0_INTERNAL void m0_be_recovery_init | ( | struct m0_be_recovery * | rvr, |
struct m0_be_recovery_cfg * | cfg | ||
) |
Definition at line 150 of file recovery.c.
M0_INTERNAL bool m0_be_recovery_log_record_available | ( | struct m0_be_recovery * | rvr | ) |
Returns true if there is a log record which needs to be re-applied.
Definition at line 310 of file recovery.c.
M0_INTERNAL void m0_be_recovery_log_record_get | ( | struct m0_be_recovery * | rvr, |
struct m0_be_log_record_iter * | iter | ||
) |
Picks the next log record from the list of log-only records. Must not be called if m0_be_recovery_log_record_available() returns false.
iter | Log record iterator where header of the log record is stored. |
Definition at line 322 of file recovery.c.
M0_INTERNAL int m0_be_recovery_run | ( | struct m0_be_recovery * | rvr | ) |
Scans log for all log records that need to be re-applied and stores them in the list of log-only records.
Definition at line 184 of file recovery.c.
M0_INTERNAL bool m0_be_reg__invariant | ( | const struct m0_be_reg * | reg | ) |
M0_INTERNAL int m0_be_reg__read | ( | struct m0_be_reg * | reg | ) |
M0_INTERNAL int m0_be_reg__write | ( | struct m0_be_reg * | reg | ) |
M0_INTERNAL bool m0_be_reg_area__invariant | ( | const struct m0_be_reg_area * | ra | ) |
Definition at line 609 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_capture | ( | struct m0_be_reg_area * | ra, |
struct m0_be_reg_d * | rd | ||
) |
Definition at line 751 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_captured | ( | struct m0_be_reg_area * | ra, |
struct m0_be_tx_credit * | captured | ||
) |
Definition at line 637 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_fini | ( | struct m0_be_reg_area * | ra | ) |
Definition at line 602 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_reg_area_first | ( | struct m0_be_reg_area * | ra | ) |
Definition at line 814 of file tx_regmap.c.
M0_INTERNAL int m0_be_reg_area_init | ( | struct m0_be_reg_area * | ra, |
const struct m0_be_tx_credit * | prepared, | ||
enum m0_be_reg_area_type | type | ||
) |
Initialises reg_area of the given kind.
ra | reg_area |
prepared | maximum size for reg_area. |
type | type of m0_be_reg_area. |
Maximum size has the following meaning:
Definition at line 559 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_merge_in | ( | struct m0_be_reg_area * | ra, |
struct m0_be_reg_area * | src | ||
) |
Definition at line 787 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_merger_add | ( | struct m0_be_reg_area_merger * | brm, |
struct m0_be_reg_area * | ra | ||
) |
M0_INTERNAL void m0_be_reg_area_merger_fini | ( | struct m0_be_reg_area_merger * | brm | ) |
Definition at line 846 of file tx_regmap.c.
M0_INTERNAL int m0_be_reg_area_merger_init | ( | struct m0_be_reg_area_merger * | brm, |
int | reg_area_nr_max | ||
) |
Definition at line 826 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_merger_merge_to | ( | struct m0_be_reg_area_merger * | brm, |
struct m0_be_reg_area * | ra | ||
) |
Definition at line 894 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_merger_reset | ( | struct m0_be_reg_area_merger * | brm | ) |
M0_INTERNAL struct m0_be_reg_d * m0_be_reg_area_next | ( | struct m0_be_reg_area * | ra, |
struct m0_be_reg_d * | prev | ||
) |
Definition at line 820 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_optimize | ( | struct m0_be_reg_area * | ra | ) |
M0_INTERNAL void m0_be_reg_area_prepared | ( | struct m0_be_reg_area * | ra, |
struct m0_be_tx_credit * | prepared | ||
) |
Definition at line 629 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_reset | ( | struct m0_be_reg_area * | ra | ) |
Definition at line 797 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_uncapture | ( | struct m0_be_reg_area * | ra, |
const struct m0_be_reg_d * | rd | ||
) |
Definition at line 775 of file tx_regmap.c.
M0_INTERNAL void m0_be_reg_area_used | ( | struct m0_be_reg_area * | ra, |
struct m0_be_tx_credit * | used | ||
) |
Definition at line 616 of file tx_regmap.c.
M0_INTERNAL bool m0_be_reg_d__invariant | ( | const struct m0_be_reg_d * | rd | ) |
m0_be_reg__invariant() can't be used here because it checks m0_be_reg segment, and UT can test m0_be_reg_d-related structures without m0_be_seg initialization.
Definition at line 50 of file tx_regmap.c.
M0_INTERNAL bool m0_be_reg_d_is_in | ( | const struct m0_be_reg_d * | rd, |
void * | ptr | ||
) |
Definition at line 62 of file tx_regmap.c.
M0_INTERNAL unsigned long m0_be_reg_gen_idx | ( | const struct m0_be_reg * | reg | ) |
Returns generation index for a region.
It is guaranteed that subsequent call to this function with the same region or region that intersects with the current region gives value greater than previous.
Definition at line 469 of file seg.c.
M0_INTERNAL m0_bindex_t m0_be_reg_offset | ( | const struct m0_be_reg * | reg | ) |
M0_INTERNAL bool m0_be_regmap__invariant | ( | const struct m0_be_regmap * | rm | ) |
Definition at line 401 of file tx_regmap.c.
M0_INTERNAL void m0_be_regmap_add | ( | struct m0_be_regmap * | rm, |
struct m0_be_reg_d * | rd | ||
) |
Definition at line 458 of file tx_regmap.c.
M0_INTERNAL void m0_be_regmap_del | ( | struct m0_be_regmap * | rm, |
const struct m0_be_reg_d * | rd | ||
) |
Definition at line 493 of file tx_regmap.c.
M0_INTERNAL void m0_be_regmap_fini | ( | struct m0_be_regmap * | rm | ) |
Definition at line 395 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_regmap_first | ( | struct m0_be_regmap * | rm | ) |
Definition at line 527 of file tx_regmap.c.
M0_INTERNAL int m0_be_regmap_init | ( | struct m0_be_regmap * | rm, |
const struct m0_be_regmap_ops * | ops, | ||
void * | ops_data, | ||
size_t | size_max, | ||
bool | split_on_absorb | ||
) |
Definition at line 378 of file tx_regmap.c.
M0_INTERNAL struct m0_be_reg_d * m0_be_regmap_next | ( | struct m0_be_regmap * | rm, |
struct m0_be_reg_d * | prev | ||
) |
Definition at line 532 of file tx_regmap.c.
M0_INTERNAL void m0_be_regmap_reset | ( | struct m0_be_regmap * | rm | ) |
Definition at line 544 of file tx_regmap.c.
M0_INTERNAL size_t m0_be_regmap_size | ( | const struct m0_be_regmap * | rm | ) |
Definition at line 538 of file tx_regmap.c.
M0_INTERNAL bool m0_be_seg__invariant | ( | const struct m0_be_seg * | seg | ) |
M0_INTERNAL int m0_be_seg__read | ( | struct m0_be_reg * | reg, |
void * | dst | ||
) |
M0_INTERNAL int m0_be_seg__write | ( | struct m0_be_reg * | reg, |
void * | src | ||
) |
M0_INTERNAL struct m0_be_allocator* m0_be_seg_allocator | ( | struct m0_be_seg * | seg | ) |
M0_INTERNAL void m0_be_seg_close | ( | struct m0_be_seg * | seg | ) |
M0_INTERNAL bool m0_be_seg_contains | ( | const struct m0_be_seg * | seg, |
const void * | addr | ||
) |
M0_INTERNAL bool m0_be_seg_contains_stob | ( | struct m0_be_seg * | seg, |
const struct m0_stob_id * | stob_id | ||
) |
M0_INTERNAL int m0_be_seg_create | ( | struct m0_be_seg * | seg, |
m0_bcount_t | size, | ||
void * | addr | ||
) |
M0_INTERNAL int m0_be_seg_create_multiple | ( | struct m0_stob * | stob, |
const struct m0_be_seg_geom * | geom | ||
) |
M0_INTERNAL int m0_be_seg_destroy | ( | struct m0_be_seg * | seg | ) |
M0_INTERNAL int m0_be_seg_dict_begin | ( | struct m0_be_seg * | seg, |
const char * | start_key, | ||
const char ** | this_key, | ||
void ** | this_rec | ||
) |
Definition at line 236 of file seg_dict.c.
Definition at line 342 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_dict_create_credit | ( | struct m0_be_seg * | seg, |
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL int m0_be_seg_dict_delete | ( | struct m0_be_seg * | seg, |
struct m0_be_tx * | tx, | ||
const char * | name | ||
) |
Definition at line 316 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_dict_delete_credit | ( | struct m0_be_seg * | seg, |
const char * | name, | ||
struct m0_be_tx_credit * | accum | ||
) |
M0_INTERNAL void m0_be_seg_dict_destroy_credit | ( | struct m0_be_seg * | seg, |
struct m0_be_tx_credit * | accum | ||
) |
Definition at line 150 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_dict_fini | ( | struct m0_be_seg * | seg | ) |
Definition at line 170 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_dict_init | ( | struct m0_be_seg * | seg | ) |
Definition at line 160 of file seg_dict.c.
M0_INTERNAL int m0_be_seg_dict_insert | ( | struct m0_be_seg * | seg, |
struct m0_be_tx * | tx, | ||
const char * | name, | ||
void * | value | ||
) |
Definition at line 255 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_dict_insert_credit | ( | struct m0_be_seg * | seg, |
const char * | name, | ||
struct m0_be_tx_credit * | accum | ||
) |
Definition at line 114 of file seg_dict.c.
M0_INTERNAL int m0_be_seg_dict_lookup | ( | struct m0_be_seg * | seg, |
const char * | name, | ||
void ** | out | ||
) |
Definition at line 180 of file seg_dict.c.
M0_INTERNAL int m0_be_seg_dict_next | ( | struct m0_be_seg * | seg, |
const char * | prefix, | ||
const char * | start_key, | ||
const char ** | this_key, | ||
void ** | this_rec | ||
) |
Definition at line 245 of file seg_dict.c.
M0_INTERNAL void m0_be_seg_fini | ( | struct m0_be_seg * | seg | ) |
M0_INTERNAL bool m0_be_seg_geom_eq | ( | const struct m0_be_seg_geom * | left, |
const struct m0_be_seg_geom * | right | ||
) |
M0_INTERNAL void m0_be_seg_init | ( | struct m0_be_seg * | seg, |
struct m0_stob * | stob, | ||
struct m0_be_domain * | dom, | ||
uint64_t | seg_id | ||
) |
M0_INTERNAL m0_bindex_t m0_be_seg_offset | ( | const struct m0_be_seg * | seg, |
const void * | addr | ||
) |
M0_INTERNAL int m0_be_seg_open | ( | struct m0_be_seg * | seg | ) |
M0_INTERNAL m0_bcount_t m0_be_seg_reserved | ( | const struct m0_be_seg * | seg | ) |
M0_INTERNAL int m0_be_segobj_opt_begin | ( | struct m0_be_seg * | dict, |
const struct m0_be_0type * | objtype, | ||
struct m0_buf * | opt, | ||
char ** | suffix | ||
) |
|
static |
M0_INTERNAL int m0_be_segobj_opt_next | ( | struct m0_be_seg * | dict, |
const struct m0_be_0type * | objtype, | ||
struct m0_buf * | opt, | ||
char ** | suffix | ||
) |
M0_INTERNAL bool m0_be_should_break | ( | struct m0_be_engine * | eng, |
const struct m0_be_tx_credit * | accum, | ||
const struct m0_be_tx_credit * | delta | ||
) |
M0_INTERNAL bool m0_be_should_break_half | ( | struct m0_be_engine * | eng, |
const struct m0_be_tx_credit * | accum, | ||
const struct m0_be_tx_credit * | delta | ||
) |
M0_INTERNAL void m0_be_tlink_create | ( | void * | obj, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_tlink_destroy | ( | void * | obj, |
const struct m0_be_list_descr * | descr, | ||
struct m0_be_tx * | tx | ||
) |
M0_INTERNAL void m0_be_tx__group_assign | ( | struct m0_be_tx * | tx, |
struct m0_be_tx_group * | gr | ||
) |
M0_INTERNAL bool m0_be_tx__invariant | ( | const struct m0_be_tx * | tx | ) |
M0_INTERNAL bool m0_be_tx__is_exclusive | ( | const struct m0_be_tx * | tx | ) |
M0_INTERNAL bool m0_be_tx__is_fast | ( | struct m0_be_tx * | tx | ) |
Used by engine to check whether tx_group should be closed immediately.
Definition at line 625 of file tx.c.
M0_INTERNAL bool m0_be_tx__is_recovering | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL void m0_be_tx__recovering_set | ( | struct m0_be_tx * | tx | ) |
Mark tx as a tx that is recovering from log.
Such transaction has the following properties:
Definition at line 654 of file tx.c.
M0_INTERNAL struct m0_be_reg_area * m0_be_tx__reg_area | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL void m0_be_tx__state_post | ( | struct m0_be_tx * | tx, |
enum m0_be_tx_state | state | ||
) |
M0_INTERNAL void m0_be_tx_bulk_end | ( | struct m0_be_tx_bulk * | tb | ) |
M0_INTERNAL void m0_be_tx_bulk_fini | ( | struct m0_be_tx_bulk * | tb | ) |
M0_INTERNAL int m0_be_tx_bulk_init | ( | struct m0_be_tx_bulk * | tb, |
struct m0_be_tx_bulk_cfg * | tb_cfg | ||
) |
M0_INTERNAL bool m0_be_tx_bulk_put | ( | struct m0_be_tx_bulk * | tb, |
struct m0_be_op * | op, | ||
struct m0_be_tx_credit * | credit, | ||
m0_bcount_t | payload_credit, | ||
uint64_t | partition, | ||
void * | user | ||
) |
M0_INTERNAL void m0_be_tx_bulk_run | ( | struct m0_be_tx_bulk * | tb, |
struct m0_be_op * | op | ||
) |
Runs the work. op is signalled after all work is done or some of m0_be_tx_open() failed.
Definition at line 565 of file tx_bulk.c.
M0_INTERNAL int m0_be_tx_bulk_status | ( | struct m0_be_tx_bulk * | tb | ) |
Gets m0_be_tx_bulk result. Can be called only after op from m0_be_tx_bulk_run is signalled.
Definition at line 630 of file tx_bulk.c.
M0_INTERNAL void m0_be_tx_close | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL void m0_be_tx_close_sync | ( | struct m0_be_tx * | tx | ) |
Calls m0_be_tx_close() and then waits until transaction reaches M0_BTS_DONE state.
Definition at line 604 of file tx.c.
M0_INTERNAL void m0_be_tx_credit_add | ( | struct m0_be_tx_credit * | c0, |
const struct m0_be_tx_credit * | c1 | ||
) |
M0_INTERNAL void m0_be_tx_credit_add_max | ( | struct m0_be_tx_credit * | c, |
const struct m0_be_tx_credit * | c0, | ||
const struct m0_be_tx_credit * | c1 | ||
) |
M0_INTERNAL bool m0_be_tx_credit_eq | ( | const struct m0_be_tx_credit * | c0, |
const struct m0_be_tx_credit * | c1 | ||
) |
M0_INTERNAL bool m0_be_tx_credit_le | ( | const struct m0_be_tx_credit * | c0, |
const struct m0_be_tx_credit * | c1 | ||
) |
M0_INTERNAL void m0_be_tx_credit_mac | ( | struct m0_be_tx_credit * | c, |
const struct m0_be_tx_credit * | c1, | ||
m0_bcount_t | k | ||
) |
c += c1 * k Multiply-accumulate operation.
Definition at line 88 of file tx_credit.c.
M0_INTERNAL void m0_be_tx_credit_max | ( | struct m0_be_tx_credit * | c, |
const struct m0_be_tx_credit * | c0, | ||
const struct m0_be_tx_credit * | c1 | ||
) |
c = smallest credit that meets the following requirement: m0_be_tx_credit_le(c0, c) && m0_be_tx_credit_le(c1, c)
Definition at line 112 of file tx_credit.c.
M0_INTERNAL void m0_be_tx_credit_mul | ( | struct m0_be_tx_credit * | c, |
m0_bcount_t | k | ||
) |
M0_INTERNAL void m0_be_tx_credit_mul_bp | ( | struct m0_be_tx_credit * | c, |
unsigned | bp | ||
) |
c *= bp / 10000.0
Definition at line 82 of file tx_credit.c.
M0_INTERNAL void m0_be_tx_credit_sub | ( | struct m0_be_tx_credit * | c0, |
const struct m0_be_tx_credit * | c1 | ||
) |
M0_INTERNAL void m0_be_tx_deconstruct | ( | struct m0_be_tx * | tx, |
struct m0_be_fmt_tx * | ftx | ||
) |
M0_INTERNAL void m0_be_tx_exclusive_open | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL int m0_be_tx_exclusive_open_sync | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL void m0_be_tx_fini | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL int m0_be_tx_fol_add | ( | struct m0_be_tx * | tx, |
struct m0_fol_rec * | rec | ||
) |
M0_INTERNAL void m0_be_tx_force | ( | struct m0_be_tx * | tx | ) |
Forces the tx's group to close immediately by explictly calling m0_be_tx_group_close(), which in turn triggers the logging of all the lingering transactions in this group.
Forces the tx to move forward to PLACED state, which will in turn force all the transactions in the same tx group to commit to disk as well.
Definition at line 638 of file tx.c.
M0_INTERNAL void m0_be_tx_gc_enable | ( | struct m0_be_tx * | tx, |
void(*)(struct m0_be_tx *, void *param) | gc_free, | ||
void * | param | ||
) |
Calls function after tx reaches M0_BTS_DONE state. Signals to just before call. Garbage collector may be enabled at any time before m0_be_tx_close().
Typical use case:
Definition at line 728 of file tx.c.
M0_INTERNAL void m0_be_tx_get | ( | struct m0_be_tx * | tx | ) |
Gets additional reference to the transaction.
Definition at line 373 of file tx.c.
M0_INTERNAL int m0_be_tx_group__allocate | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 403 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group__deallocate | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 408 of file tx_group.c.
M0_INTERNAL bool m0_be_tx_group__invariant | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 247 of file tx_group.c.
M0_INTERNAL struct m0_sm_group * m0_be_tx_group__sm_group | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 73 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group__tx_state_post | ( | struct m0_be_tx_group * | gr, |
enum m0_be_tx_state | state, | ||
bool | del_tx_from_group | ||
) |
m0_be_tx__state_post()s each transaction of the group. XXX RENAMEME
Definition at line 442 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_close | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 147 of file tx_group.c.
M0_INTERNAL int m0_be_tx_group_decode | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 476 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_discard | ( | struct m0_be_log_discard * | ld, |
struct m0_be_log_discard_item * | ldi | ||
) |
Definition at line 635 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_encode | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 430 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_fini | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 252 of file tx_group.c.
M0_INTERNAL struct m0_sm_group * m0_be_tx_group_fom__sm_group | ( | struct m0_be_tx_group_fom * | m | ) |
M0_INTERNAL void m0_be_tx_group_fom_fini | ( | struct m0_be_tx_group_fom * | m | ) |
Definition at line 359 of file tx_group_fom.c.
M0_INTERNAL void m0_be_tx_group_fom_handle | ( | struct m0_be_tx_group_fom * | m | ) |
Definition at line 407 of file tx_group_fom.c.
M0_INTERNAL void m0_be_tx_group_fom_init | ( | struct m0_be_tx_group_fom * | m, |
struct m0_be_tx_group * | gr, | ||
struct m0_reqh * | reqh | ||
) |
Definition at line 331 of file tx_group_fom.c.
M0_INTERNAL void m0_be_tx_group_fom_mod_fini | ( | void | ) |
M0_INTERNAL void m0_be_tx_group_fom_mod_init | ( | void | ) |
Definition at line 429 of file tx_group_fom.c.
M0_INTERNAL void m0_be_tx_group_fom_recovery_prepare | ( | struct m0_be_tx_group_fom * | m | ) |
M0_INTERNAL void m0_be_tx_group_fom_reset | ( | struct m0_be_tx_group_fom * | m | ) |
M0_INTERNAL void m0_be_tx_group_fom_stable | ( | struct m0_be_tx_group_fom * | gf | ) |
Definition at line 412 of file tx_group_fom.c.
M0_INTERNAL int m0_be_tx_group_fom_start | ( | struct m0_be_tx_group_fom * | gf | ) |
Definition at line 381 of file tx_group_fom.c.
M0_INTERNAL void m0_be_tx_group_fom_stop | ( | struct m0_be_tx_group_fom * | gf | ) |
Definition at line 399 of file tx_group_fom.c.
M0_INTERNAL int m0_be_tx_group_init | ( | struct m0_be_tx_group * | gr, |
struct m0_be_tx_group_cfg * | gr_cfg | ||
) |
Definition at line 201 of file tx_group.c.
M0_INTERNAL bool m0_be_tx_group_is_recovering | ( | struct m0_be_tx_group * | gr | ) |
M0_INTERNAL void m0_be_tx_group_log_read | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 470 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_log_write | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 435 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_open | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 388 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_prepare | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 195 of file tx_group.c.
M0_INTERNAL int m0_be_tx_group_reapply | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 620 of file tx_group.c.
M0_INTERNAL int m0_be_tx_group_reconstruct | ( | struct m0_be_tx_group * | gr, |
struct m0_sm_group * | sm_grp | ||
) |
Definition at line 577 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_reconstruct_tx_close | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op_gc | ||
) |
Definition at line 601 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_reconstruct_tx_open | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 585 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_recovery_prepare | ( | struct m0_be_tx_group * | gr, |
struct m0_be_log * | log | ||
) |
Definition at line 462 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_reset | ( | struct m0_be_tx_group * | gr | ) |
Makes the tx_group ready for reuse.
Definition at line 178 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_seg_io_credit | ( | struct m0_be_tx_group_cfg * | gr_cfg, |
struct m0_be_io_credit * | io_cred | ||
) |
Definition at line 642 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_seg_place | ( | struct m0_be_tx_group * | gr, |
struct m0_be_op * | op | ||
) |
Definition at line 424 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_seg_place_prepare | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 413 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_stable | ( | struct m0_be_tx_group * | gr | ) |
Notifies the group that all of its transactions have reached M0_BTS_DONE state.
Definition at line 65 of file tx_group.c.
M0_INTERNAL int m0_be_tx_group_start | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 393 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_stop | ( | struct m0_be_tx_group * | gr | ) |
Definition at line 398 of file tx_group.c.
M0_INTERNAL int m0_be_tx_group_tx_add | ( | struct m0_be_tx_group * | gr, |
struct m0_be_tx * | tx | ||
) |
Adds the transaction to m0_be_tx_group::tg_txs.
Definition at line 286 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_tx_closed | ( | struct m0_be_tx_group * | gr, |
struct m0_be_tx * | tx | ||
) |
Definition at line 325 of file tx_group.c.
M0_INTERNAL void m0_be_tx_group_tx_del | ( | struct m0_be_tx_group * | gr, |
struct m0_be_tx * | tx | ||
) |
Deletes the transaction from m0_be_tx_group::tg_txs.
Definition at line 375 of file tx_group.c.
M0_INTERNAL size_t m0_be_tx_group_tx_nr | ( | struct m0_be_tx_group * | gr | ) |
Number of transactions in the group.
Definition at line 383 of file tx_group.c.
M0_INTERNAL void m0_be_tx_init | ( | struct m0_be_tx * | tx, |
uint64_t | tid, | ||
struct m0_be_domain * | dom, | ||
struct m0_sm_group * | sm_group, | ||
m0_be_tx_cb_t | persistent, | ||
m0_be_tx_cb_t | discarded, | ||
void(*)(struct m0_be_tx *tx, void *payload) | filler, | ||
void * | datum | ||
) |
M0_INTERNAL void m0_be_tx_lsn_get | ( | struct m0_be_tx * | tx, |
m0_bindex_t * | lsn, | ||
m0_bindex_t * | lsn_discarded | ||
) |
M0_INTERNAL void m0_be_tx_lsn_set | ( | struct m0_be_tx * | tx, |
m0_bindex_t | lsn, | ||
m0_bindex_t | lsn_discarded | ||
) |
M0_INTERNAL void m0_be_tx_mod_fini | ( | void | ) |
M0_INTERNAL int m0_be_tx_mod_init | ( | void | ) |
M0_INTERNAL void m0_be_tx_open | ( | struct m0_be_tx * | tx | ) |
M0_INTERNAL int m0_be_tx_open_sync | ( | struct m0_be_tx * | tx | ) |
Calls m0_be_tx_open() and then waits until transaction reaches M0_BTS_ACTIVE or M0_BTS_FAILED state.
Definition at line 571 of file tx.c.
M0_INTERNAL void m0_be_tx_payload_prep | ( | struct m0_be_tx * | tx, |
m0_bcount_t | size | ||
) |
Accumulates transaction payload size.
This function adds size to the number of bytes which is allocated for the payload area.
Definition at line 271 of file tx.c.
M0_INTERNAL void m0_be_tx_prep | ( | struct m0_be_tx * | tx, |
const struct m0_be_tx_credit * | credit | ||
) |
M0_INTERNAL void m0_be_tx_put | ( | struct m0_be_tx * | tx | ) |
Puts reference to the transaction.
Transaction is not shifted to M0_BTS_DONE state until number of m0_be_tx_get() calls is equal to the number of m0_be_tx_put() calls for the transaction.
Definition at line 383 of file tx.c.
M0_INTERNAL void m0_be_tx_reconstruct | ( | struct m0_be_tx * | tx, |
const struct m0_be_fmt_tx * | ftx | ||
) |
M0_INTERNAL void m0_be_tx_service_fini | ( | struct m0_be_engine * | en | ) |
Definition at line 125 of file tx_service.c.
M0_INTERNAL int m0_be_tx_service_init | ( | struct m0_be_engine * | en, |
struct m0_reqh * | reqh | ||
) |
Definition at line 117 of file tx_service.c.
M0_INTERNAL bool m0_be_tx_should_break | ( | struct m0_be_tx * | tx, |
const struct m0_be_tx_credit * | c | ||
) |
M0_INTERNAL enum m0_be_tx_state m0_be_tx_state | ( | const struct m0_be_tx * | tx | ) |
M0_INTERNAL const char * m0_be_tx_state_name | ( | enum m0_be_tx_state | state | ) |
Waits until transacion reaches one of the given states.
Definition at line 394 of file tx.c.
M0_INTERNAL int m0_be_txs_register | ( | void | ) |
M0_INTERNAL void m0_be_txs_unregister | ( | void | ) |
void m0_be_ut_fmt_cblock | ( | void | ) |
void m0_be_ut_fmt_group | ( | void | ) |
void m0_be_ut_fmt_group_size_max | ( | void | ) |
void m0_be_ut_fmt_group_size_max_rnd | ( | void | ) |
void m0_be_ut_fmt_log_header | ( | void | ) |
void m0_be_ut_io_sched | ( | void | ) |
The test: 1) Creates BE_UT_IO_SCHED_THREAD_NR threads. 2) Each thread:
Definition at line 284 of file io_sched.c.
void m0_be_ut_log_discard_getput | ( | void | ) |
void m0_be_ut_log_discard_usecase | ( | void | ) |
void m0_be_ut_op_mt | ( | void | ) |
void m0_be_ut_op_set_tree | ( | void | ) |
void m0_be_ut_op_set_usecase | ( | void | ) |
void m0_be_ut_op_usecase | ( | void | ) |
void m0_be_ut_pd_usecase | ( | void | ) |
void m0_be_ut_queue_100_10_1 | ( | void | ) |
void m0_be_ut_queue_100_10_10 | ( | void | ) |
void m0_be_ut_queue_100_1_1 | ( | void | ) |
void m0_be_ut_queue_100_1_10 | ( | void | ) |
void m0_be_ut_queue_10_100_1 | ( | void | ) |
void m0_be_ut_queue_10_100_100 | ( | void | ) |
void m0_be_ut_queue_10_100_5 | ( | void | ) |
void m0_be_ut_queue_10_1_100 | ( | void | ) |
void m0_be_ut_queue_10_5_100 | ( | void | ) |
void m0_be_ut_queue_1_1_1 | ( | void | ) |
void m0_be_ut_queue_2_1_1 | ( | void | ) |
void m0_be_ut_queue_from_1_to_10 | ( | void | ) |
void m0_be_ut_tx_bulk_empty | ( | void | ) |
void m0_be_ut_tx_bulk_error_payload | ( | void | ) |
void m0_be_ut_tx_bulk_error_reg | ( | void | ) |
void m0_be_ut_tx_bulk_large_all | ( | void | ) |
void m0_be_ut_tx_bulk_large_cred | ( | void | ) |
void m0_be_ut_tx_bulk_large_payload | ( | void | ) |
void m0_be_ut_tx_bulk_large_tx | ( | void | ) |
void m0_be_ut_tx_bulk_medium_cred | ( | void | ) |
void m0_be_ut_tx_bulk_medium_tx | ( | void | ) |
void m0_be_ut_tx_bulk_medium_tx_multi | ( | void | ) |
void m0_be_ut_tx_bulk_parallel_1_15 | ( | void | ) |
void m0_be_ut_tx_bulk_small_tx | ( | void | ) |
void m0_be_ut_tx_bulk_usecase | ( | void | ) |
void m0_be_ut_tx_capturing | ( | void | ) |
void m0_be_ut_tx_concurrent | ( | void | ) |
void m0_be_ut_tx_concurrent_excl | ( | void | ) |
void m0_be_ut_tx_concurrent_helper | ( | bool | exclusive | ) |
void m0_be_ut_tx_empty | ( | void | ) |
void m0_be_ut_tx_fast | ( | void | ) |
void m0_be_ut_tx_force | ( | void | ) |
void m0_be_ut_tx_gc | ( | void | ) |
void m0_be_ut_tx_payload | ( | void | ) |
void m0_be_ut_tx_persistence | ( | void | ) |
void m0_be_ut_tx_several | ( | void | ) |
void m0_be_ut_tx_single | ( | void | ) |
void m0_be_ut_tx_states | ( | void | ) |
void m0_be_ut_tx_usecase_failure | ( | void | ) |
void m0_be_ut_tx_usecase_success | ( | void | ) |
void m0_betool_m0_fini | ( | void | ) |
void m0_betool_m0_init | ( | void | ) |
int m0_betool_st_mkfs | ( | void | ) |
int m0_betool_st_run | ( | void | ) |
M0_TL_DECLARE | ( | ad_domains | , |
M0_EXTERN | , | ||
struct ad_domain_map | |||
) |
M0_TL_DEFINE | ( | bos | , |
static | , | ||
struct m0_be_op | |||
) |
M0_TL_DEFINE | ( | sched_io | , |
static | , | ||
struct m0_be_io | |||
) |
M0_TL_DEFINE | ( | etx | , |
M0_INTERNAL | , | ||
struct m0_be_tx | |||
) |
M0_TL_DEFINE | ( | be_pool | , |
static | , | ||
struct m0_be_pool_item | |||
) |
M0_TL_DEFINE | ( | zt | , |
M0_EXTERN | , | ||
struct m0_be_0type | |||
) |
M0_TL_DEFINE | ( | egr | , |
static | , | ||
struct m0_be_tx_group | |||
) |
M0_TL_DEFINE | ( | be_pool_q | , |
static | , | ||
struct be_pool_queue_item | |||
) |
M0_TL_DEFINE | ( | rtxs | , |
static | , | ||
struct be_recovering_tx | |||
) |
M0_TL_DEFINE | ( | record | , |
static | , | ||
struct m0_be_log_record | |||
) |
M0_TL_DEFINE | ( | bqq | , |
static | , | ||
struct be_queue_item | |||
) |
M0_TL_DEFINE | ( | bqop | , |
static | , | ||
struct be_queue_wait_op | |||
) |
M0_TL_DEFINE | ( | ld_start | , |
static | , | ||
struct m0_be_log_discard_item | |||
) |
M0_TL_DESCR_DECLARE | ( | zt | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DECLARE | ( | ad_domains | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DECLARE | ( | grp | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DEFINE | ( | bos | , |
"m0_be_op::bo_children" | , | ||
static | , | ||
struct m0_be_op | , | ||
bo_set_link | , | ||
bo_set_link_magic | , | ||
M0_BE_OP_SET_LINK_MAGIC | , | ||
M0_BE_OP_SET_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | etx | , |
"m0_be_engine::eng_txs" | [], | ||
M0_INTERNAL | , | ||
struct m0_be_tx | , | ||
t_engine_linkage | , | ||
t_magic | , | ||
M0_BE_TX_MAGIC | , | ||
M0_BE_TX_ENGINE_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | sched_io | , |
"be log scheduler IOs" | , | ||
static | , | ||
struct m0_be_io | , | ||
bio_sched_link | , | ||
bio_sched_magic | , | ||
M0_BE_IO_SCHED_MAGIC | , | ||
M0_BE_IO_SCHED_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | be_pool | , |
"list of be_pool_items" | , | ||
static | , | ||
struct m0_be_pool_item | , | ||
bpli_link | , | ||
bpli_magic | , | ||
M0_BE_POOL_MAGIC | , | ||
M0_BE_POOL_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | egr | , |
"m0_be_engine::eng_groups" | [], | ||
static | , | ||
struct m0_be_tx_group | , | ||
tg_engine_linkage | , | ||
tg_magic | , | ||
M0_BE_TX_MAGIC | , | ||
M0_BE_TX_ENGINE_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | be_pool_q | , |
"list of be_pool_queue_items" | , | ||
static | , | ||
struct be_pool_queue_item | , | ||
bplq_link | , | ||
bplq_magic | , | ||
M0_BE_POOL_QUEUE_MAGIC | , | ||
M0_BE_POOL_QUEUE_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | rtxs | , |
"m0_be_tx_group::tg_txs_recovering" | , | ||
static | , | ||
struct be_recovering_tx | , | ||
rtx_link | , | ||
rtx_magic | , | ||
M0_BE_TX_MAGIC | , | ||
M0_BE_TX_GROUP_MAGIC | |||
) |
A list of transactions that are currently being recovered.
M0_TL_DESCR_DEFINE | ( | grp | , |
"m0_be_tx_group::tg_txs" | , | ||
M0_INTERNAL | , | ||
struct m0_be_tx | , | ||
t_group_linkage | , | ||
t_magic | , | ||
M0_BE_TX_MAGIC | , | ||
M0_BE_TX_GROUP_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | record | , |
"be log records" | , | ||
static | , | ||
struct m0_be_log_record | , | ||
lgr_linkage | , | ||
lgr_magic | , | ||
M0_BE_LOG_RECORD_MAGIC | , | ||
M0_BE_LOG_RECORD_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | bqq | , |
"m0_be_queue::bq_q*" | [], | ||
static | , | ||
struct be_queue_item | , | ||
bqi_link | , | ||
bqi_magic | , | ||
M0_BE_QUEUE_Q_MAGIC | , | ||
M0_BE_QUEUE_Q_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | bqop | , |
"m0_be_queue::bq_op_*" | [], | ||
static | , | ||
struct be_queue_wait_op | , | ||
bbo_link | , | ||
bbo_magic | , | ||
M0_BE_QUEUE_OP_MAGIC | , | ||
M0_BE_QUEUE_OP_HEAD_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | ld_start | , |
"m0_be_log_discard::lds_start_q" | , | ||
static | , | ||
struct m0_be_log_discard_item | , | ||
ldi_start_link | , | ||
ldi_magic | , | ||
M0_BE_LOG_DISCARD_MAGIC | , | ||
M0_BE_LOG_DISCARD_HEAD_MAGIC | |||
) |
M0_UT_THREADS_DEFINE | ( | be_ut_pd_usecase | , |
& | be_ut_pd_usecase_thread | ||
) |
M0_UT_THREADS_DEFINE | ( | be_ut_op_mt | , |
& | be_ut_op_mt_thread_func | ||
) |
M0_UT_THREADS_DEFINE | ( | be_ut_log_discard_gp_producers | , |
& | be_ut_log_discard_gp_thread | ||
) |
M0_UT_THREADS_DEFINE | ( | be_ut_log_discard_gp_consumers | , |
& | be_ut_log_discard_gp_thread | ||
) |
M0_UT_THREADS_DEFINE | ( | be_ut_io_sched | , |
& | be_ut_io_sched_thread | ||
) |
struct m0_be_tx_remid M0_XCA_DOMAIN | ( | be| | rpc | ) |
struct m0_be_allocator_call_stat M0_XCA_DOMAIN | ( | be | ) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Check generation identifier before format footer verification. Only process the records whose generation identifier matches or is within +/- MAX_GEN_DIFF_SEC seconds of segment's generation identifier.
Definition at line 1152 of file beck.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void track_ad_btrees | ( | struct stob_ad_0type_rec * | rec, |
bool | print_btree | ||
) |
void track_cob_btrees | ( | struct m0_cob_domain * | cdom, |
bool | print_btree | ||
) |
|
static |
|
static |
|
static |
|
static |
Definition at line 259 of file tx_group_fom.c.
|
static |
|
static |
Allocates and initialises transaction service.
Definition at line 79 of file tx_service.c.
|
static |
Finalises and deallocates transaction service.
Definition at line 98 of file tx_service.c.
|
static |
|
static |
|
static |
Definition at line 190 of file tx_group_format.c.
|
static |
Definition at line 452 of file log_store.c.
|
static |
Definition at line 554 of file tx_regmap.c.
|
static |
Definition at line 551 of file tx_regmap.c.
|
static |
Definition at line 552 of file tx_regmap.c.
|
static |
M0_BTS_NR items in array is enough, but sometimes gcc issues the following warning:
struct m0_sm_conf be_tx_sm_conf |
|
static |
|
static |
|
static |
|
static |
Definition at line 112 of file io_sched.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
These values provided the maximum builder performance after experiments on hardware.
|
static |
|
static |
|
static |
|
static |
const struct m0_be_tx_credit m0_be_tx_credit_invalid |
Invalid credit structure used to forcibly fail a transaction.
This is declared here rather than in credit.c so that this symbol exists in the kernel build.
Definition at line 41 of file tx_credit.c.
const struct m0_be_tx_credit m0_be_tx_credit_invalid |
Invalid credit structure used to forcibly fail a transaction.
This is declared here rather than in credit.c so that this symbol exists in the kernel build.
Definition at line 41 of file tx_credit.c.
struct m0_reqh_service_type m0_be_txs_stype |
Definition at line 52 of file tx_service.c.
struct m0_reqh_service_type m0_be_txs_stype |
Definition at line 52 of file tx_service.c.
M0_INTERNAL const struct m0_fid_type m0_btree_fid_type |
M0_EXTERN const struct m0_fid_type m0_btree_fid_type |
enum { ... } M0_XCA_DOMAIN |
enum { ... } M0_XCA_DOMAIN |
struct m0_be_allocator M0_XCA_DOMAIN |
struct m0_be_io_part M0_XCA_DOMAIN |
enum m0_be_seg_hdr_format_version M0_XCA_DOMAIN |
enum m0_be_bnode_format_version M0_XCA_DOMAIN |
enum { ... } M0_XCA_DOMAIN |
enum m0_be_btree_format_version M0_XCA_DOMAIN |
struct m0_fmt_xcode_ctx M0_XCA_DOMAIN |
enum m0_be_list_op M0_XCA_DOMAIN |
struct m0_be_domain_cfg M0_XCA_DOMAIN |
struct m0_be_reg M0_XCA_DOMAIN |
struct m0_be_fmt_decode_cfg M0_XCA_DOMAIN |
enum m0_avi_be_labels M0_XCA_ENUM |
enum m0_be_alloc_zone_type M0_XCA_ENUM |
enum m0_be_btree_type M0_XCA_ENUM |
|
static |
|
static |
|
static |
M0_INTERNAL struct m0_sm_conf op_states_conf |
M0_EXTERN struct m0_sm_conf op_states_conf |
|
static |
|
static |
|
static |
static void test |
Definition at line 45 of file thread_pool.c.
|
static |
Definition at line 143 of file tx_group_fom.c.
|
static |
Definition at line 264 of file tx_group_fom.c.
|
static |
Definition at line 115 of file tx_group_fom.c.
|
static |
Definition at line 270 of file tx_group_fom.c.
|
static |
Definition at line 272 of file tx_group_fom.c.
|
static |
Definition at line 72 of file tx_service.c.
|
static |
Definition at line 48 of file tx_service.c.