35 const char lfname[] =
"cm_ut.errlog";
163 uint64_t cid =
ut_cm->ut_cm_id;
bool(* co_invariant)(const struct m0_cm_cp *cp)
static void cm_ut_service_fini(struct m0_reqh_service *service)
int(* rso_start)(struct m0_reqh_service *service)
static void cm_ut_stop(struct m0_cm *cm)
M0_INTERNAL void m0_reqh_service_stop(struct m0_reqh_service *service)
void cm_ut_service_alloc_init(struct m0_reqh *reqh)
static void cm_ag_ut_fini(struct m0_cm_aggr_group *ag)
struct m0_ut_rpc_mach_ctx cmut_rmach_ctx
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
static bool cm_cp_ut_invariant(const struct m0_cm_cp *cp)
void(* cago_fini)(struct m0_cm_aggr_group *ag)
static void cm_ut_ha_msg(struct m0_cm *cm, struct m0_ha_msg *msg, int rc)
struct m0_ut_cm cm_ut[MAX_CM_NR]
static int cm_ut_prepare(struct m0_cm *cm)
static const struct m0_reqh_service_type_ops cm_ut_service_type_ops
#define container_of(ptr, type, member)
M0_INTERNAL void m0_cm_fini(struct m0_cm *cm)
M0_INTERNAL void m0_cm_aggr_group_init(struct m0_cm_aggr_group *ag, struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, const struct m0_cm_aggr_group_ops *ag_ops)
struct m0_cm_type cm_ut_cmt
struct m0_reqh_service * cm_ut_service
static int cm_ut_ag_alloc(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out)
M0_INTERNAL int m0_cm_init(struct m0_cm *cm, struct m0_cm_type *cm_type, const struct m0_cm_ops *cm_ops)
struct m0_ut_cm * cm2utcm(struct m0_cm *cm)
struct m0_reqh_context rctx
static const struct socktype stype[]
static int cm_ut_data_next(struct m0_cm *cm, struct m0_cm_cp *cp)
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
struct m0_cm_aggr_group aggr_grps[MAX_CM_NR][MAX_CM_NR]
M0_INTERNAL void m0_reqh_service_fini(struct m0_reqh_service *service)
const struct m0_cm_cp_ops * c_ops
static int cm_ut_service_start(struct m0_reqh_service *service)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
static void cm_ut_fini(struct m0_cm *cm)
static const struct m0_reqh_service_ops cm_ut_service_ops
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
void cm_ut_service_cleanup()
static int cm_ut_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
M0_INTERNAL int m0_cm_setup(struct m0_cm *cm)
M0_INTERNAL struct m0_cm * m0_cmsvc2cm(struct m0_reqh_service *cmsvc)
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
struct m0_cm_ag_id ag_ids[MAX_CM_NR][MAX_CM_NR]
M0_CM_TYPE_DECLARE(cm_ut, M0_CM_UT_OPCODE, &cm_ut_service_type_ops, "cm_ut", 0)
uint64_t ag_id_cnt[MAX_CM_NR]
struct m0_reqh_service cm_service
static uint64_t cm_ag_ut_local_cp_nr(const struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
int(* cmo_setup)(struct m0_cm *cm)
struct m0_reqh_service_type ct_stype
static int cm_ut_ag_next(struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next)
static int cm_ut_setup(struct m0_cm *cm)
static void cm_ut_service_stop(struct m0_reqh_service *service)
static const struct m0_cm_cp_ops cm_cp_ut_ops
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
static struct m0_cm_cp * cm_ut_cp_alloc(struct m0_cm *cm)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
static const struct m0_cm_ops cm_ut_ops
static void cm_cp_ut_free(struct m0_cm_cp *cp)
const struct m0_reqh_service_ops * rs_ops
static int cm_ut_start(struct m0_cm *cm)
const struct m0_cm_aggr_group_ops cm_ag_ut_ops