25 #ifndef __MOTR_CAS_CTG_STORE_H__ 26 #define __MOTR_CAS_CTG_STORE_H__ 32 #include "be/btree_xc.h" 241 #define CTG_OP_COMBINE(opc, ct) (((uint64_t)(opc)) | ((ct) << 16)) 801 const struct m0_fid *ctg_fid,
811 char *dump_in_hex_str);
struct m0_be_long_lock cc_lock
struct m0_format_header cs_header
M0_INTERNAL void m0_ctg_ctidx_insert_credits(struct m0_cas_id *cid, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_ctg_delete_credit(struct m0_cas_ctg *ctg, m0_bcount_t knob, m0_bcount_t vnob, struct m0_be_tx_credit *accum)
struct m0_be_mutex cs_ctg_init_mutex
M0_INTERNAL int m0_ctg_meta_insert(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
enum m0_cas_ctg_format_version M0_XCA_DOMAIN
M0_INTERNAL int m0_ctg_dead_index_insert(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, int next_phase)
int const char const void size_t int flags
M0_INTERNAL int m0_ctg_delete(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, int next_phase)
M0_INTERNAL int m0_ctg_lookup_delete(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, struct m0_buf *val, int flags, int next_phase)
M0_INTERNAL void m0_ctg_lookup_result(struct m0_ctg_op *ctg_op, struct m0_buf *buf)
M0_INTERNAL int m0_ctg_gc_wait(struct m0_ctg_op *ctg_op, int next_phase)
M0_INTERNAL struct m0_long_lock * m0_ctg_lock(struct m0_cas_ctg *ctg)
M0_INTERNAL void m0_ctg_store_fini(void)
M0_INTERNAL void m0_ctg_mem_place_get(struct m0_ctg_op *ctg_op, struct m0_buf *buf)
M0_INTERNAL int m0_ctg_meta_cursor_next(struct m0_ctg_op *ctg_op, int next_phase)
M0_INTERNAL void m0_ctg_fini(struct m0_fom *fom0, struct m0_cas_ctg *ctg)
M0_INTERNAL uint64_t m0_ctg_rec_nr(void)
struct m0_cas_ctg * cs_meta
M0_INTERNAL void m0_ctg_dead_clean_credit(struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_ctg_lookup(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, int next_phase)
M0_INTERNAL int m0_ctg_ctidx_lookup_sync(const struct m0_fid *fid, struct m0_dix_layout **layout)
M0_INTERNAL int m0_ctg_minkey(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, int next_phase)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_dead_index(void)
M0_INTERNAL int m0_ctg_cursor_get(struct m0_ctg_op *ctg_op, const struct m0_buf *key, int next_phase)
M0_INTERNAL void m0_ctg_insert_credit(struct m0_cas_ctg *ctg, m0_bcount_t knob, m0_bcount_t vnob, struct m0_be_tx_credit *accum)
struct m0_be_btree cc_tree
static const struct m0_fid * cas_fid(const struct m0_fom *fom)
M0_INTERNAL bool m0_ctg_cursor_is_initialised(struct m0_ctg_op *ctg_op)
m0_cas_ctg_format_version
M0_INTERNAL int m0_ctg_mem_free(struct m0_ctg_op *ctg_op, void *area, int next_phase)
M0_INTERNAL int m0_ctg_insert(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, const struct m0_buf *val, int next_phase)
struct m0_format_footer cs_footer
M0_INTERNAL int m0_ctg_cursor_next(struct m0_ctg_op *ctg_op, int next_phase)
M0_INTERNAL int m0_ctg_meta_lookup(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
M0_INTERNAL void m0_ctg_cursor_fini(struct m0_ctg_op *ctg_op)
m0_cas_state_format_version
M0_INTERNAL void m0_ctg_try_init(struct m0_cas_ctg *ctg)
struct m0_be_mutex cc_chan_guard
M0_INTERNAL const struct m0_be_btree_kv_ops * m0_ctg_btree_ops(void)
M0_INTERNAL void m0_ctg_cursor_put(struct m0_ctg_op *ctg_op)
M0_INTERNAL int m0_ctg_mem_place(struct m0_ctg_op *ctg_op, const struct m0_buf *buf, int next_phase)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_meta(void)
struct m0_be_chan cc_chan
M0_INTERNAL int m0_ctg_store_init(struct m0_be_domain *dom)
static struct m0_stob_domain * dom
M0_INTERNAL void m0_ctg_mark_deleted_credit(struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_ctg__meta_insert(struct m0_be_btree *meta, const struct m0_fid *fid, struct m0_cas_ctg *ctg, struct m0_be_tx *tx)
M0_INTERNAL void m0_ctg_create_credit(struct m0_be_tx_credit *accum)
struct m0_be_btree_anchor co_anchor
M0_INTERNAL uint64_t m0_ctg_rec_size(void)
M0_INTERNAL void m0_ctg_meta_cursor_init(struct m0_ctg_op *ctg_op)
M0_INTERNAL int m0_ctg_meta_find_ctg(struct m0_cas_ctg *meta, const struct m0_fid *ctg_fid, struct m0_cas_ctg **ctg)
M0_INTERNAL void m0_ctg_cursor_init(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg)
M0_INTERNAL void m0_ctg_op_get_ver(struct m0_ctg_op *ctg_op, struct m0_crv *out)
struct m0_be_btree_cursor co_cur
M0_INTERNAL int m0_ctg_create(struct m0_be_seg *seg, struct m0_be_tx *tx, struct m0_cas_ctg **out, const struct m0_fid *cas_fid)
M0_INTERNAL void m0_ctg_op_init(struct m0_ctg_op *ctg_op, struct m0_fom *fom, uint32_t flags)
struct m0_cas_ctg * co_ctg
M0_INTERNAL int m0_ctg_ctidx_delete_sync(const struct m0_cas_id *cid, struct m0_be_tx *tx)
M0_INTERNAL void m0_ctg_state_inc_update(struct m0_be_tx *tx, uint64_t size)
M0_INTERNAL void m0_ctg_cursor_kv_get(struct m0_ctg_op *ctg_op, struct m0_buf *key, struct m0_buf *val)
struct m0_format_footer cc_foot
M0_INTERNAL int m0_ctg_ctidx_insert_sync(const struct m0_cas_id *cid, struct m0_be_tx *tx)
M0_INTERNAL void m0_ctg_ctidx_delete_credits(struct m0_cas_id *cid, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_ctg_meta_delete(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
M0_INTERNAL int ctgdump(struct m0_motr *motr_ctx, char *fidstr, char *dump_in_hex_str)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_ctidx(void)
static struct m0_be_seg * seg
M0_INTERNAL void m0_ctg_op_fini(struct m0_ctg_op *ctg_op)
struct m0_mutex co_channel_lock
M0_INTERNAL int m0_ctg_drop(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, int next_phase)
struct m0_chan co_channel
struct m0_format_header cc_head
M0_INTERNAL int m0_ctg_meta_cursor_get(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
static struct m0_be_ut_backend be
M0_INTERNAL int m0_ctg_truncate(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, m0_bcount_t limit, int next_phase)
M0_INTERNAL int m0_ctg_op_rc(struct m0_ctg_op *ctg_op)
M0_INTERNAL struct m0_long_lock * m0_ctg_del_lock(void)
M0_INTERNAL void m0_ctg_drop_credit(struct m0_fom *fom, struct m0_be_tx_credit *accum, struct m0_cas_ctg *ctg, m0_bcount_t *limit)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_meta_lookup_result(struct m0_ctg_op *ctg_op)