24 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CLIENT 40 #include "cas/cas_xc.h" 47 #define WAIT_TIMEOUT M0_TIME_NEVER 48 #define SERVER_LOG_FILE_NAME "cas_server.log" 62 "-D",
"cs_sdb",
"-S",
"cs_stob",
63 "-A",
"linuxstob:cs_addb_stob",
65 "-H",
"0@lo:12345:34:1",
599 for (
i = 0;
i <
CNT;
i++) {
621 keys.
ov_buf[0] = &cur_key;
647 keys.
ov_buf[0] = &cur_key;
704 keys.
ov_buf[0] = &cur_key;
725 for (
i = 0;
i < recs_nr;
i++) {
730 cur_key = *(uint64_t *)keys.
ov_buf[
i];
743 accum += recs_nr - 1;
815 {
"namei-ops-dist-skip-layout",
818 {
"record-ops-dist-skip-layout",
821 {
"namei-ops-dist-skip-layout-enable-crow",
824 {
"record-ops-dist-skip-layout-enable-crow",
843 extern void st_mt(
void);
965 for (
i = 0;
i <
nr; ++
i) {
969 memcpy(key_vecs[
i].
ov_buf[0], &
i,
sizeof(
i));
987 for (
i = 0;
i <
nr; ++
i) {
1075 struct m0_buf buf_key = { .
b_nob =
sizeof(uint64_t),
1077 struct m0_buf buf_val = { .
b_nob =
sizeof(uint64_t),
1084 rec->
cr_key = at_buf_key;
1085 rec->
cr_val = at_buf_val;
1089 &(
struct m0_ext) { .e_start = 0,
1094 op->cg_id.ci_fid = *cfid;
1095 op->cg_rec.cr_nr = 1;
1096 op->cg_rec.cr_rec = rec;
1104 uint64_t *
key, uint64_t *
val)
1115 struct m0_fid srv_dtm0_fid;
1116 struct m0_fid srv_proc_fid;
1126 struct m0_fom zero_fom_to_be_deleted = {};
1128 uint32_t sdev_idx = 10;
1162 M0_CST_DTM0, &srv_dtm0_fid);
1166 &zero_fom_to_be_deleted,
false);
1225 .ts_owners =
"Anatoliy",
1229 {
"fom",
st_mt,
"Anatoliy" },
1232 {
"dtm0",
st_dtm0,
"Anatoliy" },
1241 #undef M0_TRACE_SUBSYSTEM static const char * srv_ep_addr
static void ut_dix_record_ops_dist_skip_layout_enable_crow(void)
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
M0_INTERNAL int m0_dtm0_tx_desc_init(struct m0_dtm0_tx_desc *td, uint32_t nr_pa)
#define M0_UT_CONF_PROFILE
static void st_dtm0_r(void)
#define M0_ALLOC_ARR(arr, nr)
struct m0_dix_ldesc kc_layout_ldesc
int const char const void size_t int flags
static void exec_concurrent(uint64_t nr, enum m0_idx_opcode opcode)
static void ut_dix_namei_ops(bool dist, uint32_t flags)
const char * mc_process_fid
static void ut_dix_namei_ops_dist_skip_layout_enable_crow(void)
static int ut_suite_mt_idx_dix_fini(void)
void m0_op_fini(struct m0_op *op)
static struct io_request req
#define M0_LOG(level,...)
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
#define M0_FID_INIT(container, key)
static void idx_dix_ut_fini()
static void ut_dix_record_ops_dist_skip_layout(void)
static void idx_teardown(void)
void m0_client_fini(struct m0_client *m0c, bool fini_m0)
static char * cas_startup_cmd[]
M0_INTERNAL const struct m0_fid_type m0_cas_index_fid_type
static void ut_dix_namei_ops_cancel(bool dist)
static void ut_dix_init_fini(void)
void m0_idx_fini(struct m0_idx *idx)
M0_INTERNAL struct m0 * m0_get(void)
#define M0_SRC_PATH(name)
int m0_client_init(struct m0_client **m0c, struct m0_config *conf, bool init_m0)
const struct m0_uint128 M0_UBER_REALM
struct m0_op_common oi_oc
M0_INTERNAL bool m0_fid_is_set(const struct m0_fid *fid)
static struct dtm0_ut_ctx duc
static void dix_config_fini()
static void dtm0_ut_cas_op_prepare(const struct m0_fid *cfid, struct m0_cas_op *op, struct m0_cas_rec *rec, uint64_t *key, uint64_t *val, struct m0_dtm0_tx_desc *txr)
struct m0_rpc_at_buf cr_val
static void ut_dix_namei_ops_non_dist(void)
static void general_ifid_fill_batch(struct m0_fid *ifid, bool dist, int i)
M0_INTERNAL int m0_bufvec_alloc(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size)
int32_t m0_op_wait(struct m0_op *op, uint64_t bits, m0_time_t to)
static struct m0_idx_dix_config ut_dix_config
int m0_idx_op(struct m0_idx *idx, enum m0_idx_opcode opcode, struct m0_bufvec *keys, struct m0_bufvec *vals, int32_t *rcs, uint32_t flags, struct m0_op **op)
struct m0_dtm0_tid dtd_id
struct m0_ut_suite ut_suite_idx_dix
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
static const char * local_ep_addr
struct m0_entity in_entity
static uint64_t dix_val(uint64_t i)
struct m0_rpc_at_buf cr_key
static void st_dtm0(void)
static void ut_dix_record_ops_non_dist(void)
static void ut_dix_record_ops(bool dist, uint32_t flags)
#define SERVER_LOG_FILE_NAME
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
#define M0_FID_TINIT(type, container, key)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
#define M0_NET_XPRT_PREFIX_DEFAULT
static void m0_fi_enable(const char *func, const char *tag)
static struct m0_config ut_m0_config
M0_INTERNAL const struct m0_fid_type m0_dix_fid_type
static void ut_dix_record_ops_dist(void)
M0_INTERNAL void m0_dtm0_clk_src_now(struct m0_dtm0_clk_src *cs, struct m0_dtm0_ts *now)
void st_lsfid_cancel(void)
static void st_dtm0_c(void)
static void dtm0_ut_send_redo(const struct m0_fid *ifid, uint64_t *key, uint64_t *val)
void m0_op_launch(struct m0_op **op, uint32_t nr)
static void exec_then_stable(uint64_t nr, enum m0_idx_opcode opcode)
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)
M0_INTERNAL int m0_xcode_obj_enc_to_buf(struct m0_xcode_obj *obj, void **buf, m0_bcount_t *len)
static int * rcs_alloc(int count)
struct m0_net_xprt ** rsx_xprts
static struct m0_rpc_server_ctx dix_ut_sctx
struct m0_container duc_realm
union m0_rpc_at_buf::@447 u
M0_INTERNAL int m0_fid_sscanf(const char *s, struct m0_fid *fid)
void m0_op_cancel(struct m0_op **op, uint32_t nr)
struct m0_ut_suite ut_suite_mt_idx_dix
static void st_dtm0_putdel(void)
static void idx_dix_ut_m0_client_init()
void * mc_idx_service_conf
M0_INTERNAL void m0_dix_ldesc_fini(struct m0_dix_ldesc *ld)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
#define m0_forall(var, nr,...)
struct m0_dix_ldesc kc_ldescr_ldesc
int m0_entity_create(struct m0_fid *pool, struct m0_entity *entity, struct m0_op **op)
M0_INTERNAL int m0_conf_process2service_get(struct m0_confc *confc, const struct m0_fid *process_fid, enum m0_conf_service_type stype, struct m0_fid *sfid)
M0_INTERNAL int m0_dtm0_tx_desc_copy(const struct m0_dtm0_tx_desc *src, struct m0_dtm0_tx_desc *dst)
struct m0_dtm0_tx_pa * dtp_pa
static void st_dtm0_e_then_s(void)
uint32_t mc_max_rpc_msg_size
const char * mc_local_addr
static struct m0_realm realm
#define M0_UT_CONF_PROCESS
static int duc_setup(void)
struct m0_net_xprt ** m0_net_all_xprt_get(void)
struct m0_client * st_get_instance()
uint32_t mc_tm_recv_queue_min_len
static void idx_setup(void)
static uint64_t dix_key(uint64_t i)
static int duc_teardown(void)
static void run_m0ops(uint64_t nr, enum m0_idx_opcode opcode, uint64_t phase1wait, uint64_t phase2wait)
static void ut_dix_namei_ops_dist_skip_layout(void)
static void m0_fi_enable_once(const char *func, const char *tag)
struct m0_dtm0_tx_participants dtd_ps
int m0_entity_delete(struct m0_entity *entity, struct m0_op **op)
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
#define M0_XCODE_OBJ(type, ptr)
void m0_container_init(struct m0_container *con, struct m0_realm *parent, const struct m0_uint128 *id, struct m0_client *instance)
static struct m0_cas_op * cas_op(const struct m0_fom *fom)
static void exec_one_by_one(uint64_t nr, enum m0_idx_opcode opcode)
void m0_op_free(struct m0_op *op)
int m0_entity_open(struct m0_entity *entity, struct m0_op **op)
static void ut_dix_namei_ops_cancel_dist(void)
static void dix_config_init()
static struct m0_fid cli_dtm0_fid
static uint8_t ifid_type(bool dist)
M0_INTERNAL int m0_dtm0_req_post(struct m0_dtm0_service *svc, struct m0_be_op *op, const struct dtm0_req_fop *req, const struct m0_fid *tgt, const struct m0_fom *parent_fom, bool wait_for_ack)
static struct m0_client * ut_m0c
static void ut_dix_namei_ops_cancel_non_dist(void)
M0_INTERNAL void m0_dtm0_clk_src_init(struct m0_dtm0_clk_src *cs, enum m0_dtm0_cs_types type)
M0_INTERNAL void m0_dix_fid_convert_dix2cctg(const struct m0_fid *dix_fid, struct m0_fid *cctg_fid, uint32_t device_id)
static struct m0_fid ifid
static int ut_suite_mt_idx_dix_init(void)
void m0_idx_init(struct m0_idx *idx, struct m0_realm *parent, const struct m0_uint128 *id)
struct m0_motr rsx_motr_ctx
static void dtm0_ut_read_and_check(uint64_t key, uint64_t val)
static const char * process_fid
static void general_ifid_fill(struct m0_fid *ifid, bool dist)
static void idx_dix_ut_init()
M0_INTERNAL int m0_bufvec_empty_alloc(struct m0_bufvec *bufvec, uint32_t num_segs)
static void ut_dix_namei_ops_dist(void)
struct m0_dtm0_service * m0c_dtms
int m0_nanosleep(const m0_time_t req, m0_time_t *rem)