23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 29 #include "conf/onwire_xc.h" 147 return sizeof(
struct m0_fid);
171 const struct m0_fid *btree_fid)
217 alloc->a_used += nob;
248 *
dest =
cctx->c_xctx.xcx_it.xcu_stack[0].s_obj.xo_ptr;
268 for (
i = 0;
i <
conf->cx_nr; ++
i) {
307 for (
i = 0;
i <
conf->cx_nr; ++
i) {
334 const struct m0_fid *btree_fid)
348 for (
i = 0;
i <
conf->cx_nr &&
rc == 0; ++
i) {
429 obj_ctx =
val.b_addr;
454 if (
rc == 0 ||
rc == -ENOENT) {
505 ret->
cx_nr = nr_objs;
536 obj_ctx =
val.b_addr;
576 #undef M0_TRACE_SUBSYSTEM static const struct m0_be_btree_kv_ops confdb_ops
#define M0_BE_ALLOC_CREDIT_PTR(ptr, seg, accum)
#define M0_BE_ALLOC_PTR_SYNC(ptr, seg, tx)
#define M0_ALLOC_ARR(arr, nr)
struct m0_confx_obj * cx__objs
static struct m0_confx * confx_alloc(size_t nr_objs)
static void confx_to_xcode_obj(struct m0_confx_obj *xobj, struct m0_xcode_obj *out, bool allocated)
M0_INTERNAL int m0_be_seg_dict_insert(struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name, void *value)
struct m0_xcode_type _p_xt
static void confx_fill(struct m0_confx *dest, struct m0_be_btree *btree)
static int confdb_alloc(struct confx_allocator *alloc, struct m0_be_seg *seg, struct m0_be_tx *tx, int size)
struct confx_allocator oc_alloc
static void * _conf_xcode_alloc(struct m0_xcode_cursor *ctx M0_UNUSED, size_t nob)
#define M0_BE_OP_SYNC(op_obj, action)
struct m0_confx_obj * oc_obj
M0_INTERNAL void m0_xc_m0_confx_obj_struct_init(void)
static struct m0_rpc_client_ctx cctx
struct m0_xcode_field xct_child[0]
static m0_bcount_t confdb_vsize(const void *val)
M0_INTERNAL struct m0_xcode_type * m0_confx_obj_xc
#define M0_CONFX_AT(cx, idx)
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)
#define container_of(ptr, type, member)
static struct m0_atomic64 allocated
M0_INTERNAL void m0_be_btree_destroy_credit(struct m0_be_btree *tree, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_fid_cmp(const struct m0_fid *fid0, const struct m0_fid *fid1)
M0_INTERNAL void m0_confdb_destroy_credit(struct m0_be_seg *seg, struct m0_be_tx_credit *accum)
static void confdb_table_fini(struct m0_be_seg *seg)
M0_INTERNAL void m0_be_btree_cursor_fini(struct m0_be_btree_cursor *cursor)
M0_INTERNAL int m0_xcode_dup(struct m0_xcode_ctx *dest, struct m0_xcode_ctx *src)
M0_INTERNAL int m0_xcode_length(struct m0_xcode_ctx *ctx)
M0_INTERNAL int m0_be_btree_cursor_next_sync(struct m0_be_btree_cursor *cur)
static int btree(struct scanner *s, struct rectype *r, char *buf)
return M0_ERR(-EOPNOTSUPP)
#define M0_BE_OP_SYNC_RET(op_obj, action, member)
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)
static int confdb_table_init(struct m0_be_seg *seg, struct m0_be_btree **btree, struct m0_be_tx *tx, const struct m0_fid *btree_fid)
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_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 int m0_be_seg_dict_delete(struct m0_be_seg *seg, struct m0_be_tx *tx, const char *name)
static int confdb_objs_count(struct m0_be_btree *btree, size_t *result)
static int confx_allocator_init(struct confx_allocator *alloc, const struct m0_confx *conf, struct m0_be_seg *seg, struct m0_be_tx *tx)
M0_INTERNAL void m0_confdb_fini(struct m0_be_seg *seg)
M0_INTERNAL void m0_be_btree_destroy(struct m0_be_btree *tree, struct m0_be_tx *tx, struct m0_be_op *op)
static m0_bcount_t confdb_ksize(const void *key)
M0_INTERNAL int m0_confdb_read(struct m0_be_seg *seg, struct m0_confx **out)
M0_INTERNAL struct m0_be_allocator * m0_be_seg_allocator(struct m0_be_seg *seg)
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)
static struct ff2c_term * alloc(void)
void * m0_alloc(size_t size)
static struct m0_rpc_server_ctx sctx
M0_INTERNAL void m0_be_btree_fini(struct m0_be_btree *tree)
M0_INTERNAL int m0_be_btree_cursor_first_sync(struct m0_be_btree_cursor *cur)
static m0_bcount_t conf_sizeof(const struct m0_confx *conf)
#define M0_BE_FREE_PTR_SYNC(ptr, seg, tx)
M0_INTERNAL int m0_confdb_destroy(struct m0_be_seg *seg, struct m0_be_tx *tx)
M0_INTERNAL int m0_confdb_create(struct m0_be_seg *seg, struct m0_be_tx *tx, const struct m0_confx *conf, const struct m0_fid *btree_fid)
M0_INTERNAL size_t m0_confx_sizeof(void)
struct m0_xcode_field _p_field[M0_CONF_OBJ_TYPE_MAX]
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 void m0_xc_m0_confx_obj_struct_fini(void)
static void * confdb_obj_alloc(struct m0_xcode_cursor *ctx, size_t nob)
M0_INTERNAL void m0_be_seg_dict_delete_credit(struct m0_be_seg *seg, const char *name, struct m0_be_tx_credit *accum)
struct confx_allocator * c_alloc
struct m0_xcode_ctx c_xctx
static int confx_obj_measure(struct m0_confx_obj *xobj)
static int __confdb_free(struct m0_be_btree *btree, struct m0_be_seg *seg, struct m0_be_tx *tx)
#define M0_FI_ENABLED(tag)
#define M0_ALLOC_PTR(ptr)
static struct m0_be_seg * seg
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_cursor_init(struct m0_be_btree_cursor *cur, struct m0_be_btree *btree)
#define M0_XCODE_OBJ(type, ptr)
M0_INTERNAL int m0_confdb_create_credit(struct m0_be_seg *seg, const struct m0_confx *conf, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_xcode_ctx_init(struct m0_xcode_ctx *ctx, const struct m0_xcode_obj *obj)
static int confx_obj_dup(struct confx_allocator *alloc, struct m0_confx_obj **dest, struct m0_confx_obj *src)
static void xcode_ctx_init(struct m0_xcode_ctx *ctx, struct m0_confx_obj *xobj, bool allocated)
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 int m0_be_seg_dict_lookup(struct m0_be_seg *seg, const char *name, void **out)
#define M0_BUF_INIT(size, data)
static const char btree_name[]
struct m0_pdclust_src_addr src
#define M0_BE_FREE_CREDIT_PTR(ptr, seg, accum)
const struct m0_fid * m0_conf_objx_fid(const struct m0_confx_obj *obj)