23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_DIXCM 483 return M0_RC(-ENODATA);
505 rc = m0_conf_service_get(
confc, &svc_fid, &
svc);
544 struct m0_fid local_cctg_fid = {};
545 struct m0_fid remote_cctg_fid = {};
546 struct m0_fid dix_fid = {};
547 uint64_t processed_recs_nr;
548 uint32_t sdev_id = (uint32_t)-1;
558 return M0_RC(-ENODATA);
588 dix_cp =
M0_AMB(dix_cp, cp, dc_base);
626 return ctx->sc_type == M0_CST_CAS;
629 #undef M0_TRACE_SUBSYSTEM M0_INTERNAL struct m0_dix_cm * cm2dix(struct m0_cm *cm)
M0_INTERNAL void m0_cm_lock(struct m0_cm *cm)
M0_INTERNAL int m0_dix_cm_prepare(struct m0_cm *cm)
M0_EXTERN struct m0_cm_type dix_rebalance_cmt
M0_INTERNAL void m0_dix_cm_iter_cur_pos(struct m0_dix_cm_iter *iter, struct m0_fid *cctg_fid, uint64_t *cctg_proc_recs_nr)
M0_INTERNAL void m0_dix_fid_convert_cctg2dix(const struct m0_fid *cctg_fid, struct m0_fid *dix_fid)
M0_INTERNAL struct m0_rpc_machine * m0_cm_rpc_machine_find(struct m0_reqh *reqh)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_clink_del(struct m0_clink *link)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
struct m0_clink dcm_proxies_completed
M0_INTERNAL void m0_dix_cm_iter_next(struct m0_dix_cm_iter *iter)
M0_INTERNAL void m0_cm_type_deregister(struct m0_cm_type *cmtype)
#define M0_LOG(level,...)
static void dix_cm_tstats_calc(int loc_idx, void *loc_stats, void *total_stats)
M0_INTERNAL int m0_dix_cm_data_next(struct m0_cm *cm, struct m0_cm_cp *cp)
static int dix_cm_ag_setup(struct m0_cm *cm, struct m0_cm_cp *cp, struct m0_fid *cctg_fid, uint64_t recs_nr)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_dix_cm_fini(struct m0_cm *cm)
M0_INTERNAL int m0_dix_cm_iter_start(struct m0_dix_cm_iter *iter, struct m0_dix_cm_type *dcmt, struct m0_reqh *reqh, m0_bcount_t rpc_cutoff)
M0_INTERNAL void m0_chan_lock(struct m0_chan *ch)
#define container_of(ptr, type, member)
M0_INTERNAL int m0_dix_cm_setup(struct m0_cm *cm)
M0_INTERNAL void m0_cm_unlock(struct m0_cm *cm)
M0_INTERNAL void m0_cm_ag_cp_add(struct m0_cm_aggr_group *ag, struct m0_cm_cp *cp)
void m0_locality_data_free(int key)
static struct m0_cm_ag_id ag_id
M0_INTERNAL void m0_dix_cm_iter_type_register(struct m0_dix_cm_type *dcmt)
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
#define M0_AMB(obj, ptr, field)
M0_EXTERN struct m0_dix_cm_type dix_rebalance_dcmt
M0_INTERNAL int m0_dix_cm_ag_next(struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next)
static struct m0_confc * confc
m0_time_t m0_time_now(void)
M0_INTERNAL void m0_dix_cm_iter_stop(struct m0_dix_cm_iter *iter)
M0_INTERNAL void m0_dix_cm_type_deregister(void)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_aggr_group_locate(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming)
struct m0_cm_ag_id cm_last_out_hi
M0_EXTERN struct m0_dix_cm_type dix_repair_dcmt
static struct m0_cm_proxy * dix_cm_sdev2proxy(struct m0_dix_cm *dcm, uint32_t sdev_id)
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
struct m0_pool_device_to_service * pc_dev2svc
M0_INTERNAL int m0_dix_cm_iter_get(struct m0_dix_cm_iter *iter, struct m0_buf *key, struct m0_buf *val, uint32_t *sdev_id)
M0_INTERNAL int m0_dix_cm_start(struct m0_cm *cm)
M0_INTERNAL void m0_chan_unlock(struct m0_chan *ch)
struct m0_reqh_service_ctx * pds_ctx
static bool dix_cm_proxies_completed_cb(struct m0_clink *cl)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
struct m0_cm_proxy * c_cm_proxy
M0_INTERNAL void m0_cm_aggr_group_fini(struct m0_cm_aggr_group *ag)
M0_INTERNAL bool m0_dix_is_peer(struct m0_cm *cm, struct m0_reqh_service_ctx *ctx)
M0_EXTERN struct m0_cm_type dix_repair_cmt
struct m0_dix_cm_type * dcm_type
struct m0_reqh_service cm_service
M0_INTERNAL int m0_dix_cm_type_register(void)
uint64_t cm_proxy_active_nr
m0_time_t m0_time_sub(const m0_time_t t1, const m0_time_t t2)
static struct m0_net_test_service svc
M0_INTERNAL struct m0_cm_proxy * m0_cm_proxy_locate(struct m0_cm *cm, const char *addr)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
struct m0_pools_common * rh_pools
void m0_locality_data_iterate(int key, void(*func)(int idx, void *data, void *datum), void *datum)
M0_INTERNAL struct m0_reqh * m0_dix_cm2reqh(const struct m0_dix_cm *dcm)
struct m0_cm_cp_pump cm_cp_pump
int m0_locality_data_alloc(size_t nob, int(*ctor)(void *, void *), void(*dtor)(void *, void *), void *datum)
M0_INTERNAL int m0_dix_get_space_for(struct m0_cm *cm, const struct m0_cm_ag_id *id, size_t *count)
M0_INTERNAL int m0_cm_aggr_group_alloc(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out)
M0_INTERNAL bool m0_cm_is_locked(const struct m0_cm *cm)
M0_INTERNAL void m0_dix_cm_stop(struct m0_cm *cm)
M0_INTERNAL void m0_dix_fid_convert_dix2cctg(const struct m0_fid *dix_fid, struct m0_fid *cctg_fid, uint32_t device_id)
struct m0_chan di_completed
struct m0_fom_callback fo_cb
struct m0_dix_cm_iter dcm_it
M0_INTERNAL int m0_cm_type_register(struct m0_cm_type *cmtype)