58 .sd_name =
"start-follower",
62 .sd_name =
"check-result",
74 .sd_name =
"first-phase",
78 .sd_name =
"second-phase",
82 .sd_name =
"third-phase",
86 .sd_name =
"finish-phase",
159 (*svc)->rs_type =
stype;
172 .rst_typecode = M0_CST_DS1
214 grp = &
fom->msf_fom.fo_loc->fl_group;
224 struct m0_fom *follower_fom;
228 *
fom->msf_test_counter = 0;
253 (*
fom->msf_test_counter)++;
260 (*
fom->msf_test_counter)++;
264 (*
fom->msf_test_counter)++;
326 .rhia_dtm = (
void *)1,
327 .rhia_mdstore = (
void *)1,
379 struct m0_fom *leader_fom;
static struct m0_fom_type leader_fomt
static const struct m0_reqh_service_ops mssvc_ops
static void leader_follower_same_loc(void)
M0_INTERNAL void m0_fom_wakeup(struct m0_fom *fom)
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
static struct m0_fom_type follower_fomt
M0_INTERNAL void m0_reqh_services_terminate(struct m0_reqh *reqh)
static void reqh_start(void)
static void ms_fini(void)
M0_INTERNAL void m0_reqh_service_stop(struct m0_reqh_service *service)
static size_t locality(const struct m0_fom *fom)
static const struct m0_fom_ops follower_fom_ops
struct m0_ut_suite ms_fom_ut
#define M0_REQH_INIT(reqh,...)
static size_t ms_fom_home_locality(const struct m0_fom *fom)
static struct m0_sm_group * grp
static struct m0_reqh_service * mssvc
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static int mssvc_start(struct m0_reqh_service *svc)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
static void reqh_init(void)
static void ms_init(void)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_reqh_fini(struct m0_reqh *reqh)
static struct m0_sm_ast ast[NR]
static void leader_fom_create(struct m0_fom **out, struct m0_reqh *reqh)
void m0_fom_init(struct m0_fom *fom, const struct m0_fom_type *fom_type, const struct m0_fom_ops *ops, struct m0_fop *fop, struct m0_fop *reply, struct m0_reqh *reqh)
static struct m0_sm_conf follower_sm_conf
struct m0_sm_ast msf_wakeup
static void fake_wait(struct ms_fom *fom)
static int follower_fom_tick(struct m0_fom *fom)
static void leader_follower(void)
static void ms_fom_create(struct m0_fom **out, struct m0_reqh *reqh, bool follower)
#define M0_AMB(obj, ptr, field)
struct m0_fom_thralldom thrall
static const struct socktype stype[]
void m0_fom_fini(struct m0_fom *fom)
static const struct m0_reqh_service_type_ops mssvc_type_ops
static bool use_same_locality
M0_INTERNAL void m0_reqh_service_fini(struct m0_reqh_service *service)
M0_INTERNAL void m0_fom_enthrall(struct m0_fom *leader, struct m0_fom *serf, struct m0_fom_thralldom *thrall, void(*end)(struct m0_fom_thralldom *thrall, struct m0_fom *serf))
M0_INTERNAL void m0_fom_type_init(struct m0_fom_type *type, uint64_t id, const struct m0_fom_type_ops *ops, const struct m0_reqh_service_type *svc_type, const struct m0_sm_conf *sm)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static int mssvc_type_allocate(struct m0_reqh_service **svc, const struct m0_reqh_service_type *stype)
static int leader_fom_tick(struct m0_fom *fom)
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
const struct m0_fom_type_ops ms_fom_type_ops
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
static struct m0_sm_conf leader_sm_conf
static struct m0_semaphore sem
static void reqh_stop(void)
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
static void mssvc_fini(struct m0_reqh_service *svc)
M0_INTERNAL void m0_reqh_start(struct m0_reqh *reqh)
static struct m0_sm_state_descr leader_fom_phases[]
int(* rsto_service_allocate)(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
static void follower_fom_create(struct m0_fom **out, struct m0_reqh *reqh)
static struct m0_net_test_service svc
static void ms_fom_fini(struct m0_fom *fom)
static struct m0_reqh_service_type ut_ms_service_type
static struct m0_sm_state_descr follower_fom_phases[]
static void wakeup(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void m0_reqh_idle_wait_for(struct m0_reqh *reqh, struct m0_reqh_service *service)
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
static void mssvc_stop(struct m0_reqh_service *svc)
void(* fo_fini)(struct m0_fom *fom)
static void reqh_fini(void)
static const struct m0_fom_ops leader_fom_ops
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static void leader_follower_diff_loc(void)
int(* rso_start_async)(struct m0_reqh_service_start_async_ctx *asc)
struct m0_fid g_process_fid
static struct m0_reqh msreqh