23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_UT 47 #define DEVS_ID_SHIFT 100 112 .sd_name =
"init_wait",
118 .sd_name =
"ctidx-lock",
123 .sd_name =
"meta-lock",
132 .sd_name =
"in-progress",
137 .sd_name =
"tx-commit-wait",
199 &
fom->iu_fom.fo_loc->fl_group);
201 switch (
fom->iu_op) {
216 fom->iu_val.b_nob, accum);
220 fom->iu_val.b_nob, accum);
231 struct m0_be_tx *be_tx = &
fom->iu_fom.fo_tx.tx_betx;
234 switch (
fom->iu_op) {
282 switch (
fom->iu_op) {
327 &
fom->iu_del_lock_link,
332 &
fom->iu_del_lock_link,
358 &
fom->iu_del_lock_link);
363 &
fom->iu_del_lock_link);
428 fom.iu_cctg_fid = *cctg_fid;
438 fom.iu_cctg_fid = *cctg_fid;
449 fom.iu_cctg_fid = *cctg_fid;
459 fom->iu_cctg_fid = *cctg_fid;
469 fom->iu_cctg_fid = *cctg_fid;
526 pdev->pd_state = dev_state;
579 spare_usage_item->psu_device_state = 0;
634 .rhia_mdstore = (
void *)1,
686 pools_tlink_del_fini(&
pool);
688 pool_version_tlist_del(&
pv);
816 return be64toh(*(uint64_t *)
buf->b_addr);
853 m0_fi_disable(
"dix_cm_is_repair_coordinator",
"always_coordinator");
876 for (
i = 0;
i < CCTG_COUNT;
i++) {
881 for (j = 0; j < REC_COUNT; j++)
887 for (
i = 0;
i < CCTG_COUNT;
i++) {
888 for (j = 0; j < REC_COUNT; j++) {
890 "always_coordinator");
907 m0_fi_disable(
"dix_cm_is_repair_coordinator",
"always_coordinator");
1035 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1074 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1145 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1226 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1400 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1595 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
1965 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
2059 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
2289 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
2386 m0_fi_disable(
"dix_cm_is_repair_coordinator",
"always_coordinator");
2482 m0_fi_disable(
"dix_cm_is_repair_coordinator",
"always_coordinator");
2552 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
2722 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
2896 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
3112 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
3205 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
3379 m0_fi_disable(
"dix_cm_iter_next_key",
"print_parity_group");
3387 .ts_owners =
"Egor",
3395 {
"one-rec",
one_rec,
"Egor" },
3417 #undef M0_TRACE_SUBSYSTEM struct m0_semaphore * iu_sem
union m0_be_clink::@200 bc_u
struct m0_poolmach_state * pm_state
M0_INTERNAL void m0_long_lock_link_init(struct m0_long_lock_link *link, struct m0_fom *fom, struct m0_long_lock_addb2 *addb2)
static const struct m0_fom_type_ops iter_ut_fom_type_ops
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
M0_INTERNAL void m0_ctg_ctidx_insert_credits(struct m0_cas_id *cid, struct m0_be_tx_credit *accum)
M0_INTERNAL void m0_ctg_delete_credit(struct m0_cas_ctg *ctg, m0_bcount_t knob, m0_bcount_t vnob, struct m0_be_tx_credit *accum)
struct m0_be_domain * bs_domain
M0_INTERNAL int m0_reqh_service_start(struct m0_reqh_service *service)
M0_EXTERN struct m0_cm_type dix_rebalance_cmt
M0_INTERNAL int m0_ctg_meta_insert(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
static void iter_ut_reqh_init(void)
static void iter_ut_fom_op_sync(struct iter_ut_fom *fom)
M0_INTERNAL void m0_pool_fini(struct m0_pool *pool)
static void iter_ut_ctidx_delete_async(struct iter_ut_fom *fom, struct m0_fid *cctg_fid, struct m0_semaphore *sem)
static int iter_ut_fom_exec(struct iter_ut_fom *fom)
M0_INTERNAL void m0_reqh_service_stop(struct m0_reqh_service *service)
#define M0_FOM_LONG_LOCK_RETURN(rc)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
static void multi_rec(void)
M0_INTERNAL int m0_ctg_delete(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, int next_phase)
static void iter_ut_ctidx_insert(struct m0_fid *cctg_fid)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
static struct m0_be_ut_backend be
static struct m0_semaphore sem
struct m0_be_clink pst_conf_ready
#define M0_REQH_INIT(reqh,...)
const m0_time_t M0_TIME_NEVER
M0_INTERNAL void m0_dix_cm_iter_next(struct m0_dix_cm_iter *iter)
M0_INTERNAL struct m0_long_lock * m0_ctg_lock(struct m0_cas_ctg *ctg)
M0_INTERNAL void m0_ctg_store_fini(void)
struct m0_poolmach pv_mach
static void reb_coordinator(void)
M0_INTERNAL void m0_reqh_layouts_cleanup(struct m0_reqh *reqh)
M0_INTERNAL void m0_reqh_service_prepare_to_stop(struct m0_reqh_service *service)
static void iter_ut_fini(struct m0_reqh_service *svc)
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
int(* fto_create)(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
M0_INTERNAL void m0_dtx_opened(struct m0_dtx *tx)
M0_INTERNAL void m0_cas_id_fini(struct m0_cas_id *cid)
static void ctg_del_concur_rep1(void)
struct m0_dix_layout ci_layout
static struct m0_fom_type ut_fom_type_reb
static void device_repaired_set(uint64_t pool_device_id)
M0_INTERNAL struct m0_be_seg * m0_be_domain_seg0_get(struct m0_be_domain *dom)
struct m0_be_tx_credit iu_tx_cred
static void iter_ut_meta_delete_async(struct iter_ut_fom *fom, struct m0_fid *cctg_fid, struct m0_semaphore *sem)
M0_INTERNAL void m0_fom_wait_on(struct m0_fom *fom, struct m0_chan *chan, struct m0_fom_callback *cb)
M0_INTERNAL void m0_long_write_unlock(struct m0_long_lock *lock, struct m0_long_lock_link *link)
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)
static void cctg_not_found(void)
#define container_of(ptr, type, member)
static void outside_dev_reb(void)
static struct m0_be_seg * seg0
static void many_keys_reb(void)
struct m0_cas_ctg * iu_ctg
struct m0_ut_suite dix_cm_iter_ut
M0_INTERNAL void m0_ctg_insert_credit(struct m0_cas_ctg *ctg, m0_bcount_t knob, m0_bcount_t vnob, struct m0_be_tx_credit *accum)
static void device_rebalancing_set(uint64_t pool_device_id)
static struct m0_be_tx * m0_fom_tx(struct m0_fom *fom)
static struct m0_pools_common pc
static struct m0_pool_version pv
const struct m0_fom_type * fo_type
M0_INTERNAL int m0_pool_init(struct m0_pool *pool, const struct m0_fid *id, enum m0_pver_policy_code pver_policy)
enum iter_ut_fom_op iu_op
struct m0_pooldev * pst_devices_array
static void spare_slot_unused_set()
struct m0_reqh * bec_reqh
M0_INTERNAL int m0_ctg_insert(struct m0_ctg_op *ctg_op, struct m0_cas_ctg *ctg, const struct m0_buf *key, const struct m0_buf *val, int next_phase)
static int iter_ut_next_sync(struct m0_dix_cm_iter *iter, struct m0_buf *key, struct m0_buf *val, uint32_t *sdev_id)
M0_INTERNAL int m0_ctg_meta_lookup(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
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)
M0_INTERNAL bool m0_long_write_lock(struct m0_long_lock *lk, struct m0_long_lock_link *link, int next_phase)
static struct m0_fom_type ut_fom_type
static void filled_spare_fail(void)
static void iter_ut_init(struct m0_reqh_service **svc, struct m0_reqh_service_type *stype)
#define M0_FID_TINIT(type, container, key)
#define M0_AMB(obj, ptr, field)
static const struct socktype stype[]
struct m0_be_clink pst_conf_exp
M0_INTERNAL void m0_dtx_open(struct m0_dtx *tx)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_meta(void)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
static void m0_fi_enable(const char *func, const char *tag)
void m0_fom_fini(struct m0_fom *fom)
M0_EXTERN struct m0_dix_cm_type dix_rebalance_dcmt
struct m0_long_lock_link iu_lock_link
M0_INTERNAL void m0_dix_cm_iter_stop(struct m0_dix_cm_iter *iter)
M0_INTERNAL void m0_reqh_service_fini(struct m0_reqh_service *service)
M0_INTERNAL void m0_long_lock_link_fini(struct m0_long_lock_link *link)
M0_INTERNAL int m0_ctg_store_init(struct m0_be_domain *dom)
M0_INTERNAL int m0_pool_version_init(struct m0_pool_version *pv, const struct m0_fid *id, struct m0_pool *pool, uint32_t pool_width, uint32_t nr_nodes, uint32_t nr_data, uint32_t nr_failures, uint32_t nr_spare)
static void iter_ut_insert(struct m0_cas_ctg *cctg, uint64_t key, uint64_t val)
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 void m0_ctg_mark_deleted_credit(struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_dix_ldesc_init(struct m0_dix_ldesc *ld, struct m0_ext *range, m0_bcount_t range_nr, enum m0_dix_hash_fnc_type htype, struct m0_fid *pver)
static void iter_ut_fom_init(struct iter_ut_fom *fom)
static struct m0_fom_type ut_fom_type_rep
void m0_be_ut_backend_init(struct m0_be_ut_backend *ut_be)
static void user_concur_reb(void)
M0_INTERNAL int m0_buf_alloc(struct m0_buf *buf, size_t size)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static void iter_ut_fom_result(struct iter_ut_fom *fom)
M0_INTERNAL int m0_layout_init_by_pver(struct m0_layout_domain *dom, struct m0_pool_version *pv, int *count)
static uint64_t buf_value(const struct m0_buf *buf)
static void iter_ut_devs_setup()
M0_INTERNAL void m0_ctg_create_credit(struct m0_be_tx_credit *accum)
static void one_dev_fail(void)
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
static void iter_ut_reqh_fini()
M0_INTERNAL int m0_reqh_service_allocate(struct m0_reqh_service **out, const struct m0_reqh_service_type *stype, struct m0_reqh_context *rctx)
M0_EXTERN struct m0_dix_cm_type dix_repair_dcmt
struct m0_layout_domain rh_ldom
static void empty_cctg(void)
M0_INTERNAL void m0_buf_free(struct m0_buf *buf)
M0_INTERNAL void m0_reqh_service_init(struct m0_reqh_service *service, struct m0_reqh *reqh, const struct m0_fid *fid)
static struct m0_clink clink[RDWR_REQUEST_MAX]
M0_INTERNAL void m0_dtx_done(struct m0_dtx *tx)
union m0_dix_layout::@145 u
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)
struct m0_be_domain but_dom
M0_INTERNAL void m0_ctg_op_init(struct m0_ctg_op *ctg_op, struct m0_fom *fom, uint32_t flags)
M0_INTERNAL void m0_pool_version_fini(struct m0_pool_version *pv)
static struct m0_pool pool
M0_INTERNAL int m0_fom_timedwait(struct m0_fom *fom, uint64_t phases, m0_time_t deadline)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
static void iter_ut_pool_fini()
static void start_stop(void)
struct m0_be_domain_cfg but_dom_cfg
M0_INTERNAL int m0_ctg_ctidx_delete_sync(const struct m0_cas_id *cid, struct m0_be_tx *tx)
static struct m0_fid pv_fid
M0_INTERNAL void m0_reqh_start(struct m0_reqh *reqh)
static void reb_unused(void)
static void iter_ut_pool_init()
static void iter_ut_fom_fini(struct m0_fom *fom0)
M0_INTERNAL void m0_dix_fid_dix_make(struct m0_fid *dix_fid, uint32_t container, uint64_t key)
static const struct m0_sm_conf iter_ut_fom_conf
M0_INTERNAL void m0_layout_domain_cleanup(struct m0_layout_domain *dom)
M0_EXTERN struct m0_cm_type dix_repair_cmt
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
static uint64_t iter_ut_fom_locality(const struct m0_fom *fom)
static struct m0_dix_cm_iter * iter_ut_iter(struct m0_reqh_service *svc)
static void one_rec(void)
static int iter_ut_fom_tick(struct m0_fom *fom0)
static void many_keys_rep(void)
struct m0_reqh_service cm_service
static void rep_coordinator(void)
static void outside_dev_fail(void)
struct m0_long_lock_link iu_del_lock_link
static struct m0_net_test_service svc
M0_INTERNAL int m0_ctg_ctidx_insert_sync(const struct m0_cas_id *cid, struct m0_be_tx *tx)
M0_INTERNAL void m0_ctg_ctidx_delete_credits(struct m0_cas_id *cid, struct m0_be_tx_credit *accum)
M0_INTERNAL int m0_ctg_meta_delete(struct m0_ctg_op *ctg_op, const struct m0_fid *fid, int next_phase)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
uint32_t psu_device_index
void m0_be_ut_backend_fini(struct m0_be_ut_backend *ut_be)
static void empty_store(void)
M0_INTERNAL void m0_reqh_idle_wait_for(struct m0_reqh *reqh, struct m0_reqh_service *service)
struct m0_be_seg * rh_beseg
static int spare_usage_pos
static void m0_fi_enable_once(const char *func, const char *tag)
struct m0_reqh_service_type ct_stype
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
M0_INTERNAL struct m0_cas_ctg * m0_ctg_ctidx(void)
static void user_concur_rep(void)
void(* fo_fini)(struct m0_fom *fom)
static void device_state_set(uint64_t pool_device_id, int dev_state)
static struct m0_cas_ctg * iter_ut_meta_lookup(struct m0_fid *cctg_fid)
M0_INTERNAL void m0_ctg_op_fini(struct m0_ctg_op *ctg_op)
static void two_devs_fail(void)
static void iter_ut_meta_insert(struct m0_fid *cctg_fid)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
void m0_fom_phase_set(struct m0_fom *fom, int phase)
static void device_repairing_set(uint64_t pool_device_id)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
struct m0_ctg_op iu_ctg_op
static void iter_ut_delete(struct m0_cas_ctg *cctg, uint64_t key, uint64_t val)
static const struct m0_fom_ops iter_ut_fom_ops
static void ctg_del_concur_rep2(void)
struct m0_fid iu_cctg_fid
static struct m0_reqh reqh
struct m0_be_engine_cfg bc_engine
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_pool_spare_usage * pst_spare_usage_array
struct m0_chan di_completed
struct m0_fid g_process_fid
struct m0_fom_callback fo_cb
static struct m0_reqh_service * repair_svc
static void empty_spare_fail(void)
static void one_dev_reb(void)
M0_INTERNAL int m0_ctg_op_rc(struct m0_ctg_op *ctg_op)
struct m0_dix_cm_iter dcm_it
M0_INTERNAL struct m0_long_lock * m0_ctg_del_lock(void)
M0_INTERNAL struct m0_reqh * m0_fom_reqh(const struct m0_fom *fom)
static struct m0_sm_state_descr iter_ut_fom_phases[]
static struct m0_reqh_service * rebalance_svc
M0_INTERNAL struct m0_cas_ctg * m0_ctg_meta_lookup_result(struct m0_ctg_op *ctg_op)
#define M0_IMPOSSIBLE(fmt,...)