255 "cp_thread_%d",
i) == 0);
M0_INTERNAL void m0_sns_cm_cp_free(struct m0_cm_cp *cp)
static void cp_post(struct m0_sns_cm_cp *sns_cp, struct m0_cm_aggr_group *ag, struct m0_net_buffer *nb)
M0_INTERNAL int m0_sns_cm_cp_init(struct m0_cm_cp *cp)
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
M0_INTERNAL void m0_fid_gob_make(struct m0_fid *gob_fid, uint32_t container, uint64_t key)
M0_INTERNAL void m0_ut_rpc_mach_init_and_add(struct m0_ut_rpc_mach_ctx *ctx)
int(* rso_start)(struct m0_reqh_service *service)
struct m0_net_buffer_pool * nb_pool
const struct m0_cm_cp_ops m0_sns_cm_cp_dummy_ops
static struct m0_cm_aggr_group m_ag[THREADS_NR]
#define DUMMY_SERVER_ADDR
struct m0_stob_id sc_stob_id
static struct m0_semaphore sem
int m0_thread_join(struct m0_thread *q)
void cm_ut_service_alloc_init(struct m0_reqh *reqh)
struct m0_ut_rpc_mach_ctx cmut_rmach_ctx
M0_INTERNAL void m0_cm_type_deregister(struct m0_cm_type *cmtype)
static int cp_fom_tick(struct m0_fom *fom)
static struct m0_sns_cm_cp s_sns_cp
struct m0_ut_cm cm_ut[MAX_CM_NR]
static int cm_cp_fini(void)
struct m0_cob_domain_id rmc_cob_id
M0_INTERNAL void m0_sns_cm_cp_complete(struct m0_cm_cp *cp)
struct m0_net_buffer s_nb
M0_INTERNAL void m0_cm_cp_fom_init(struct m0_cm *cm, struct m0_cm_cp *cp, struct m0_fop *fop, struct m0_fop *r_fop)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
static void cp_op(const int tid)
static void test_cp_single_thread(void)
struct m0_cm_type cm_ut_cmt
struct m0_reqh_service * cm_ut_service
static int dummy_cp_write(struct m0_cm_cp *cp)
static int cm_cp_init(void)
static struct m0_net_buffer_pool nbp
void dummy_cp_fom_fini(struct m0_fom *fom)
enum m0_cm_cp_io_op c_io_op
static uint64_t cp_fom_locality(const struct m0_fom *fom)
static const struct socktype stype[]
static const struct m0_bob_type cp_bob
static void test_cp_multi_thread(void)
M0_INTERNAL int m0_sns_cm_cp_phase_next(struct m0_cm_cp *cp)
#define bob_of(ptr, type, field, bt)
M0_INTERNAL void m0_cm_cp_fini(struct m0_cm_cp *cp)
const struct m0_cm_cp_ops * c_ops
M0_INTERNAL void m0_cm_cp_buf_add(struct m0_cm_cp *cp, struct m0_net_buffer *nb)
M0_INTERNAL void m0_stob_id_make(uint64_t container, uint64_t key, const struct m0_fid *dom_id, struct m0_stob_id *stob_id)
static void ut_cp_service_stop(struct m0_reqh_service *service)
static const struct m0_reqh_service_type_ops ut_cp_service_type_ops
M0_INTERNAL bool m0_sns_cm_cp_invariant(const struct m0_cm_cp *cp)
int(* co_action[])(struct m0_cm_cp *cp)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static int ut_cp_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
static int dummy_cp_init(struct m0_cm_cp *cp)
struct m0_cm_aggr_group * c_ag
void cm_ut_service_cleanup()
static int dummy_cp_phase_next(struct m0_cm_cp *cp)
const struct m0_fom_ops * fo_ops
static void ut_cp_service_fini(struct m0_reqh_service *service)
M0_INTERNAL void m0_reqh_idle_wait(struct m0_reqh *reqh)
static int dummy_cp_write_pre(struct m0_cm_cp *cp)
static struct m0_cm_aggr_group s_ag
static int dummy_cp_read(struct m0_cm_cp *cp)
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
static struct m0_sns_cm_cp m_sns_cp[THREADS_NR]
const struct m0_reqh_service_type * rs_type
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_ut_rpc_mach_fini(struct m0_ut_rpc_mach_ctx *ctx)
struct m0_reqh_service_type ut_cp_service_type
int(* co_phase_next)(struct m0_cm_cp *cp)
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
M0_INTERNAL void m0_cm_cp_init(struct m0_cm_type *cmtype, const struct m0_fom_type_ops *ft_ops)
void(* fo_fini)(struct m0_fom *fom)
static int ut_cp_service_start(struct m0_reqh_service *service)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
static struct m0_fom_ops dummy_cp_fom_ops
M0_INTERNAL void m0_fid_convert_gob2cob(const struct m0_fid *gob_fid, struct m0_fid *cob_fid, uint32_t device_id)
static int dummy_cp_phase(struct m0_cm_cp *cp)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
M0_INTERNAL uint64_t cp_home_loc_helper(const struct m0_cm_cp *cp)
struct m0_ut_suite cm_cp_ut
static const struct m0_reqh_service_ops ut_cp_service_ops
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
static struct m0_net_buffer m_nb[THREADS_NR]
M0_INTERNAL int m0_sns_cm_cp_fini(struct m0_cm_cp *cp)
const struct m0_reqh_service_ops * rs_ops
#define M0_IMPOSSIBLE(fmt,...)
M0_INTERNAL int m0_cm_type_register(struct m0_cm_type *cmtype)