79 .sd_name =
"Iterator run",
84 .sd_name =
"Iterator wait",
89 .sd_name =
"Iterator complete",
192 uint32_t nskey_bs_len;
203 nskey_bs_len = strlen(nskey_bs);
301 for (
i = 0;
i < nr_files; ++
i) {
304 for (j = 1; j <= nr_cobs; ++j) {
320 for (
i = 0;
i < nr_files; ++
i) {
322 for (j = 1; j <= nr_cobs; ++j)
386 static void iter_run(uint64_t pool_width, uint64_t nr_files, uint64_t
fd)
391 m0_fi_enable(
"m0_sns_cm_file_attr_and_layout",
"ut_attr_layout");
393 m0_fi_enable(
"iter_fid_attr_fetch_wait",
"ut_attr_fetch_wait");
394 m0_fi_enable(
"iter_fid_layout_fetch",
"ut_layout_fsize_fetch");
414 m0_fi_disable(
"m0_sns_cm_file_attr_and_layout",
"ut_attr_layout");
416 m0_fi_disable(
"iter_fid_attr_fetch_wait",
"ut_attr_fetch_wait");
417 m0_fi_disable(
"iter_fid_layout_fetch",
"ut_layout_fsize_fetch");
446 static void iter_stop(uint64_t pool_width, uint64_t nr_files, uint64_t
fd)
546 {
"iter-repair-large-file-with-large-unit-size",
void cs_fini(struct m0_motr *sctx)
uint64_t cm_aggr_grps_in_nr
static void iter_invalid_nr_cobs(void)
M0_INTERNAL void m0_cm_cp_buf_release(struct m0_cm_cp *cp)
M0_INTERNAL void m0_cm_cp_only_fini(struct m0_cm_cp *cp)
static struct m0_reqh * reqh
struct m0_be_domain * bs_domain
M0_INTERNAL void m0_cm_lock(struct m0_cm *cm)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL void m0_fid_gob_make(struct m0_fid *gob_fid, uint32_t container, uint64_t key)
struct m0_reqh * m0_cs_reqh_get(struct m0_motr *cctx)
struct m0_rm_resource_type rc_rt
struct m0_bitmap cm_proxy_update_map
struct m0_stob_id sc_stob_id
struct m0_fid si_domain_fid
M0_INTERNAL struct m0_sns_cm * cm2sns(struct m0_cm *cm)
const struct m0_cm_ops * cm_ops
M0_INTERNAL struct m0_pool_version * m0_pool_version_find(struct m0_pools_common *pc, const struct m0_fid *id)
static struct m0_sm_group * grp
static void iter_stop(uint64_t pool_width, uint64_t nr_files, uint64_t fd)
struct m0_cob_domain * co_dom
void(* cago_fini)(struct m0_cm_aggr_group *ag)
M0_INTERNAL int m0_cm_stop(struct m0_cm *cm)
M0_INTERNAL void m0_be_tx_fini(struct m0_be_tx *tx)
M0_INTERNAL void m0_dtx_init(struct m0_dtx *tx, struct m0_be_domain *be_domain, struct m0_sm_group *sm_group)
M0_INTERNAL void m0_ios_cdom_get(struct m0_reqh *reqh, struct m0_cob_domain **out)
static void cobs_delete(uint64_t nr_files, uint64_t nr_cobs)
M0_INTERNAL void cob_delete(struct m0_cob_domain *cdom, struct m0_be_domain *bedom, uint64_t cont, const struct m0_fid *gfid)
struct m0_layout * sf_layout
M0_INTERNAL void m0_cob_put(struct m0_cob *cob)
static struct m0_sns_cm * scm
M0_INTERNAL void m0_be_tx_prep(struct m0_be_tx *tx, const struct m0_be_tx_credit *credit)
static void _cpp_tx_close(struct m0_cm *cm)
M0_INTERNAL int m0_cob_fabrec_make(struct m0_cob_fabrec **rech, const char *link, size_t linklen)
uint64_t cm_aggr_grps_out_nr
#define container_of(ptr, type, member)
M0_INTERNAL void m0_cm_state_set(struct m0_cm *cm, enum m0_cm_state state)
M0_INTERNAL void m0_cm_cp_only_init(struct m0_cm *cm, struct m0_cm_cp *cp)
M0_INTERNAL int m0_dtx_done_sync(struct m0_dtx *tx)
static struct m0_reqh_service * service
M0_INTERNAL struct m0_reqh_service_type * m0_reqh_service_type_find(const char *sname)
M0_INTERNAL int m0_cob_nskey_make(struct m0_cob_nskey **keyh, const struct m0_fid *pfid, const char *name, size_t namelen)
static const struct m0_fid M0_SNS_CM_REPAIR_UT_PVER
static void ag_destroy(void)
M0_INTERNAL void m0_cob_tx_credit(struct m0_cob_domain *dom, enum m0_cob_op optype, struct m0_be_tx_credit *accum)
static int head(struct m0_sm *mach)
M0_INTERNAL void m0_cm_unlock(struct m0_cm *cm)
static void service_init_failure(void)
M0_INTERNAL void m0_sm_group_unlock(struct m0_sm_group *grp)
M0_INTERNAL int m0_fom_timeout_wait_on(struct m0_fom_timeout *to, struct m0_fom *fom, m0_time_t deadline)
const struct m0_cm_cp_ops m0_sns_cm_repair_cp_ops
static struct m0_sns_cm_ag * sag
static void cobs_create(uint64_t nr_files, uint64_t nr_cobs)
M0_INTERNAL int m0_cob_delete_put(struct m0_cob *cob, struct m0_be_tx *tx)
struct m0_sns_cm_ag rag_base
#define M0_FID_TINIT(type, container, key)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
int(* cmo_prepare)(struct m0_cm *cm)
static void m0_fi_enable(const char *func, const char *tag)
static void _cpp_tx_start(struct m0_cm *cm)
static struct m0_cob * cob
static void iter_setup(enum m0_cm_op op, uint64_t fd)
static void service_start_success(void)
static void iter_repair_multi_file(void)
M0_INTERNAL void m0_cob_nsrec_init(struct m0_cob_nsrec *nsrec)
static int iter_ut_fom_tick(struct m0_fom *fom, uint32_t *sem_id, int *phase)
M0_INTERNAL void m0_cob_oikey_make(struct m0_cob_oikey *oikey, const struct m0_fid *fid, int linkno)
static void buf_put(struct m0_sns_cm_cp *scp)
const struct m0_cm_cp_ops * c_ops
M0_INTERNAL int m0_cob_create(struct m0_cob *cob, struct m0_cob_nskey *nskey, struct m0_cob_nsrec *nsrec, struct m0_cob_fabrec *fabrec, struct m0_cob_omgrec *omgrec, struct m0_be_tx *tx)
M0_INTERNAL int m0_be_tx_open_sync(struct m0_be_tx *tx)
static struct m0_fid cob_fid
struct m0_be_tx_credit tx_betx_cred
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
static struct m0_rpc_server_ctx sctx
struct m0_sns_cm_cp fc_tgt_acc_cp
M0_INTERNAL void m0_dtx_fini(struct m0_dtx *tx)
struct m0_sm_group * lo_grp
struct m0_cm_aggr_group * c_ag
struct m0_ut_suite sns_cm_repair_ut
static struct m0_sm_state_descr iter_ut_fom_phases[]
static struct m0_semaphore iter_sem
static void iter_repair_large_file_with_large_unit_size(void)
M0_INTERNAL int m0_sns_cm_iter_next(struct m0_cm *cm, struct m0_cm_cp *cp)
static void iter_ag_init_failure(void)
M0_INTERNAL void m0_be_tx_init(struct m0_be_tx *tx, uint64_t tid, struct m0_be_domain *dom, struct m0_sm_group *sm_group, m0_be_tx_cb_t persistent, m0_be_tx_cb_t discarded, void(*filler)(struct m0_be_tx *tx, void *payload), void *datum)
struct m0_reqh_service_type m0_rms_type
struct m0_tl cm_aggr_grps_out
struct m0_sns_cm_file_ctx * sag_fctx
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_find(const struct m0_reqh_service_type *st, const struct m0_reqh *reqh)
M0_INTERNAL void m0_sns_cm_fctx_cleanup(struct m0_sns_cm *scm)
struct m0_sns_cm_repair_ag_failure_ctx * rag_fc
M0_INTERNAL void m0_fom_timeout_fini(struct m0_fom_timeout *to)
static void iter_run(uint64_t pool_width, uint64_t nr_files, uint64_t fd)
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
M0_INTERNAL const struct m0_fid M0_MDSERVICE_START_FID
static struct m0_sns_cm_cp scp
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
const struct m0_cm_aggr_group_ops * cag_ops
m0_time_t m0_time_from_now(uint64_t secs, long ns)
int cs_init(struct m0_motr *sctx)
struct m0_reqh_service cm_service
struct m0_sns_cm_cp * si_cp
static struct m0_sm_conf iter_ut_conf
static void service_start_failure(void)
struct m0_be_seg * rh_beseg
M0_INTERNAL void m0_sm_group_lock(struct m0_sm_group *grp)
static bool cp_verify(struct m0_sns_cm_cp *scp)
static void m0_fi_enable_once(const char *func, const char *tag)
void(* co_free)(struct m0_cm_cp *cp)
struct m0t1fs_filedata * fd
M0_INTERNAL int m0_cob_locate(struct m0_cob_domain *dom, struct m0_cob_oikey *oikey, uint64_t flags, struct m0_cob **out)
struct m0_sns_cm_rm_ctx sc_rm_ctx
M0_INTERNAL int m0_dtx_open_sync(struct m0_dtx *tx)
struct m0_cm_cp_pump cm_cp_pump
static struct m0_fom_simple iter_fom
struct m0_pdclust_instance * sf_pi
static struct m0_sns_cm_repair_ag rag
struct m0_sns_cm_iter sc_it
#define m0_tlist_for(descr, head, obj)
M0_INTERNAL int m0_cob_alloc(struct m0_cob_domain *dom, struct m0_cob **out)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
M0_INTERNAL void m0_fid_convert_gob2cob(const struct m0_fid *gob_fid, struct m0_fid *cob_fid, uint32_t device_id)
int(* cmo_start)(struct m0_cm *cm)
M0_INTERNAL void m0_fom_timeout_init(struct m0_fom_timeout *to)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
struct m0_pools_common cc_pools_common
static struct m0_fom_timeout iter_fom_timeout
M0_INTERNAL bool m0_fid_is_valid(const struct m0_fid *fid)
struct m0_tl cm_aggr_grps_in
#define M0_FOM_SIMPLE_POST(s, r, c, t, f, d, l)
M0_INTERNAL struct m0_sns_cm_repair_ag * sag2repairag(const struct m0_sns_cm_ag *sag)
M0_INTERNAL void cob_create(struct m0_reqh *reqh, struct m0_cob_domain *cdom, struct m0_be_domain *bedom, uint64_t cont, struct m0_fid *gfid, uint32_t cob_idx)
M0_INTERNAL struct m0_motr * m0_cs_ctx_get(struct m0_reqh *reqh)
M0_INTERNAL struct m0_sns_cm_ag * ag2snsag(const struct m0_cm_aggr_group *ag)
static void repair_ag_destroy(const struct m0_tl_descr *descr, struct m0_tl *head)
void pool_mach_transit(struct m0_reqh *reqh, struct m0_poolmach *pm, uint64_t fd, enum m0_pool_nd_state state)
static void iter_repair_single_file(void)
M0_INTERNAL void m0_be_tx_close_sync(struct m0_be_tx *tx)