29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CAS 43 #define SERVER_LOG_FILE_NAME "cas_server.log" 44 #define IFID(x, y) M0_FID_TINIT('i', (x), (y)) 85 "-D",
"cs_sdb",
"-S",
"cs_stob",
86 "-A",
"linuxstob:cs_addb_stob",
88 "-H",
"0@lo:12345:34:1",
133 if (
size ==
sizeof(uint64_t))
137 for (j = 1; j <=
num + 1; j++)
138 *(
char *)(
buf +
size - j) = 0xff & j;
187 cctx->cl_wait.aw_done =
false;
188 cl_rpc_ctx = &
cctx->cl_rpc_ctx;
291 cctx->cl_wait.aw_done =
false;
300 for (
i = 0;
i < ids_nr;
i++)
368 for (
i = 0;
i < ids_nr;
i++)
398 const struct m0_fid *start_fid,
425 for (
i = 0;
i < *rep_count;
i++)
555 for (
i = 0;
i <
nr;
i++)
594 if (
rep[
i].cge_rc == 0)
618 for (
i = 0;
i <
nr;
i++) {
661 if (
rep[
i].cnp_rc == 0)
982 *(uint64_t*)
rep[j].cge_val.b_addr == j * j));
1099 *(uint64_t*)get_rep[j].cge_val.b_addr == j * j));
1133 &rep_count, rep_list);
1137 rep_list[
i].clr_rc == 0 &&
1146 &rep_count, rep_list);
1156 &rep_count, rep_list);
1211 rep_list[
i].clr_rc == -ENOMEM :
1212 rep_list[
i].clr_rc == -EPROTO));
1221 return memcmp(
rep->cnp_key.b_addr,
key,
rep->cnp_key.b_nob) == 0 &&
1222 memcmp(
rep->cnp_val.b_addr,
val,
rep->cnp_val.b_nob) == 0;
1235 bool exclude_start_key;
1262 if (!exclude_start_key || slant)
1275 recs_nr =
COUNT / 2;
1281 if (!exclude_start_key || slant)
1303 if (!exclude_start_key)
1326 next_rep, &rep_count,
flags);
1348 for (
i = 0;
i <
nr; ++
i) {
1363 const struct m0_bufvec *expected_values,
1381 if (expected_values ==
NULL)
1382 expected_values = &empty_values;
1385 M0_IN(get_rep[
i].cge_rc, (0, -ENOENT))));
1389 get_rep[
i].
cge_rc == -ENOENT));
1402 result =
bufvec_cmp(&actual_values, expected_values) == 0;
1433 M0_IN(get_rep[
i].
cge_rc, (0, -ENOENT))));
1458 M0_IN(get_rep[
i].
cge_rc, (0, -ENOENT))));
1469 (get_rep[
i].
cge_rc == -ENOENT))));
1479 memset(get_rep, 0,
sizeof(*get_rep) * keys->
ov_vec.
v_nr);
1516 for (
i = 0;
i <
nr; ++
i) {
1536 uint32_t requested_keys_nr,
1539 struct m0_crv *expected_versions,
1547 struct m0_crv *actual_versions;
1553 next_rep, &rep_count,
flags);
1557 if (expected_keys ==
NULL) {
1561 next_rep[
i].cnp_rc == -ENOENT));
1570 &actual_keys) == 0);
1572 if (expected_values !=
NULL)
1574 &actual_values) == 0);
1575 if (expected_versions !=
NULL)
1579 sizeof(expected_versions[0])) == 0);
1595 uint32_t requested_keys_nr,
1661 if (expected_values !=
NULL)
1702 #define M0_BUFVEC_SLICE(__bufvec, __idx) \ 1703 M0_BUFVEC_INIT_BUF((__bufvec)->ov_buf + (__idx), \ 1704 (__bufvec)->ov_vec.v_count + (__idx)) 1712 enum { V_PAST, V_FUTURE, V_NR };
1718 uint64_t
version[V_NR] = { 2, 3 };
1743 memcpy(((
i & 0x01) == 0 ? &keven : &kodd)->ov_buf[
i / 2],
1866 enum { V_PAST, V_FUTURE, V_NR };
1873 uint64_t
version[V_NR] = { 2, 3 };
1904 is_even = (
i & 0x01) == 0 ;
1909 *(uint64_t*)expected_values.
ov_buf[
i] =
i;
1913 memcpy((is_even ? &keven : &kodd)->ov_buf[
i / 2],
1919 version[!is_even ? V_FUTURE : V_PAST],
1942 &keys, &expected_values, versions,
1952 &expected_values, versions + 1,
1962 &expected_values, versions + 1,
1975 #undef M0_BUFVEC_SLICE 2012 (*(uint64_t*)keys.
ov_buf[
i] =
i + 1,
2013 *(uint64_t*)values.
ov_buf[
i] = (
i + 1) * (
i + 1),
2043 (*(uint64_t*)keys.
ov_buf[
i] =
i + 1,
2044 *(uint64_t*)values.
ov_buf[
i] = (
i + 1) * (
i + 1),
2136 *(uint64_t*)values.
ov_buf[
i] = 0,
2142 *(uint64_t *)start_key.
ov_buf[0] = 0;
2149 next_rep, &rep_count, 0);
2165 uint32_t recs_nr[3];
2188 recs_nr[0] =
COUNT / 2 - 1;
2189 recs_nr[1] =
COUNT / 2 - 1;
2321 enum v { V_NONE, V_PAST, V_NOW, V_FUTURE, V_NR};
2343 for (j = 0; j < V_NR; j++) {
2352 for (j = 0; j < V_NR; j++)
2353 *(uint64_t*)vals[j].
ov_buf[
i] =
i << j;
2414 for (j = 0; j < V_NR; j++)
2486 uint32_t recs_nr[20];
2512 "payload_too_large1");
2514 "payload_too_large2",
2520 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2527 "payload_too_large1");
2529 "payload_too_large2",
2534 memcmp(get_rep[
i].cge_val.b_addr,
2537 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2546 for (
i = 0;
i < 20;
i++) {
2552 "payload_too_large1");
2554 "payload_too_large2",
2561 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2564 for (
i = 0;
i < 20;
i++) {
2565 for (j = 0; j < 3; j++) {
2578 "payload_too_large1");
2580 "payload_too_large2",
2585 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2590 "payload_too_large1");
2592 "payload_too_large2",
2597 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2640 index.ci_fid = ifids[0];
2643 "payload_too_large1");
2645 "payload_too_large2",
2649 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2655 index.ci_fid = ifids[1];
2658 "payload_too_large1");
2660 "payload_too_large2",
2664 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large2");
2756 *(uint64_t*)keys.
ov_buf[0] = 1;
2757 *(uint32_t*)values.
ov_buf[0] = 1;
2777 *(uint64_t*)values.
ov_buf[0] = 2;
2790 *(uint64_t*)values.
ov_buf[0] = 3;
2848 *(uint64_t*)keys.
ov_buf[0] = 1;
2849 *(uint64_t*)values.
ov_buf[0] = 1;
2894 *(uint64_t*)keys.
ov_buf[0] = 1;
2895 *(uint64_t*)values.
ov_buf[0] = 1;
3012 rep[
i].crr_rc == -EEXIST :
rep[
i].crr_rc == 0));
3015 (*(uint64_t*)values.
ov_buf[
i] = 0,
true));
3090 enum v { V_NONE, V_PAST, V_NOW, V_FUTURE, V_NR};
3091 uint64_t
version[V_NR] = { 0, 1, 2, 3,};
3232 (*(uint64_t*)values.
ov_buf[
i] = 0,
true));
3280 (*(uint64_t*)values.
ov_buf[
i] = 0,
true));
3284 (
i <
COUNT / 3) ? get_rep[
i].cge_rc == -ENOENT :
3285 rep[
i].crr_rc == 0 &&
3286 *(uint64_t*)get_rep[
i].cge_val.b_addr ==
i *
i));
3382 memcmp(get_rep[
i].cge_val.b_addr,
3392 static void get(void)
3499 (*(uint64_t*)values.
ov_buf[
i] = 0,
true));
3602 "payload_too_large1", 1, 1);
3615 m0_fi_disable(
"m0_rpc_item_max_payload_exceeded",
"payload_too_large1");
3760 if (winner->
op ==
DEL)
3762 else if (winner == before)
3771 const struct m0_bufvec *keys =
c->before.keys;
3772 const struct m0_bufvec *before_values =
c->before.values;
3773 const struct m0_bufvec *after_values =
c->after.values;
3818 const uint64_t
key = 1;
3819 const uint64_t before_value = 1;
3820 const uint64_t after_value = 2;
3822 const void *key_data = &
key;
3823 const void *before_val_data = &before_value;
3824 const void *after_val_data = &after_value;
3835 #define BEFORE(_what, _when) \ 3840 .values = &before_values, \ 3843 #define AFTER(_what, _when) \ 3848 .values = &after_values, \ 3895 .ts_owners =
"Leonid",
3907 {
"idx-list",
idx_list,
"Leonid" },
3909 {
"next",
next,
"Leonid" },
3914 {
"put",
put,
"Leonid" },
3915 {
"put-bulk",
put_bulk,
"Leonid" },
3918 {
"put-crow",
put_crow,
"Sergey" },
3919 {
"put-fail",
put_fail,
"Leonid" },
3922 {
"get",
get,
"Leonid" },
3923 {
"get-bulk",
get_bulk,
"Leonid" },
3924 {
"get-fail",
get_fail,
"Leonid" },
3925 {
"upd",
upd,
"Leonid" },
3926 {
"del",
del,
"Leonid" },
3927 {
"del-bulk",
del_bulk,
"Leonid" },
3928 {
"del-fail",
del_fail,
"Leonid" },
3929 {
"delN",
del_n,
"Leonid" },
3938 {
"put-ver",
put_ver,
"Ivan" },
3940 {
"del-ver",
del_ver,
"Ivan" },
3949 #undef M0_TRACE_SUBSYSTEM static const char * srv_ep_addr
static int ut_rec_common_del(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint64_t flags)
#define M0_BUFVEC_INIT_BUF(addr_ptr, count_ptr)
struct async_wait cl_wait
static void idx_tree_insert(void)
M0_INTERNAL int m0_dtm0_tx_desc_init(struct m0_dtm0_tx_desc *td, uint32_t nr_pa)
static int ut_idx_delete(struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
static void put_del_ver_case_execute(const struct put_del_ver_case *c, struct m0_cas_id *index)
struct m0_dtm0_dtx * tx_dtx
#define M0_ALLOC_ARR(arr, nr)
struct m0_dtx dd_ancient_dtx
void m0_net_domain_fini(struct m0_net_domain *dom)
static void idx_create_n(void)
static void put_create(void)
static void get_fail(void)
static void recs_fragm_fail(void)
static void put_bulk_fail(void)
int const char const void size_t int flags
const struct m0_tl_descr ndoms_descr
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
static void put_overwrite(void)
static void recs_fragm(void)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
static void idx_list_fail(void)
M0_INTERNAL int m0_cas_index_list(struct m0_cas_req *req, const struct m0_fid *start_fid, uint32_t indices_nr, uint32_t flags)
static void put_del_ver(void)
static void del_get_verified(struct m0_cas_id *index, struct m0_bufvec *keys, uint64_t version, uint64_t del_flags, uint64_t get_flags)
const m0_time_t M0_TIME_NEVER
static void next_multi_common(struct m0_bufvec *keys, struct m0_bufvec *values)
static void reply_too_large(void)
static void vals_create(int count, int size, struct m0_bufvec *vals)
static struct io_request req
M0_INTERNAL bool m0_semaphore_timeddown(struct m0_semaphore *semaphore, const m0_time_t abs_timeout)
static enum named_outcome outcome(const struct put_del_ver_case *c)
int m0_rpc_server_start(struct m0_rpc_server_ctx *sctx)
static void idx_delete_fail(void)
M0_INTERNAL uint64_t m0_ctg_rec_nr(void)
static void put_ver(void)
M0_INTERNAL void m0_cas_get_rep(const struct m0_cas_req *req, uint64_t idx, struct m0_cas_get_reply *rep)
struct m0_rpc_client_ctx cl_rpc_ctx
static void next_ver_exposed(void)
M0_INTERNAL const struct m0_fid m0_cas_meta_fid
static void put_save_common(uint32_t flags)
static struct m0_rpc_client_ctx cctx
#define AFTER(_what, _when)
static bool has_tombstones(struct m0_cas_id *index, const struct m0_bufvec *keys)
static void next_multi(void)
M0_INTERNAL void m0_cas_index_create_rep(const struct m0_cas_req *req, uint64_t idx, struct m0_cas_rec_reply *rep)
#define m0_exists(var, nr,...)
M0_INTERNAL int m0_pageshift_get(void)
#define container_of(ptr, type, member)
#define M0_SRC_PATH(name)
struct m0_fop_getxattr_rep * rep
M0_INTERNAL int m0_cas_get(struct m0_cas_req *req, struct m0_cas_id *index, const struct m0_bufvec *keys)
static void put_bulk(void)
static void null_value(void)
M0_INTERNAL int m0_bufvec_cursor_cmp(struct m0_bufvec_cursor *c0, struct m0_bufvec_cursor *c1)
static void del_fail(void)
static const char * cl_ep_addr
static bool casc_chan_cb(struct m0_clink *clink)
M0_INTERNAL void m0_cas_req_unlock(struct m0_cas_req *req)
int m0_bufvec_alloc_aligned(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size, unsigned shift)
M0_INTERNAL int m0_bufvec_alloc(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size)
M0_INTERNAL void m0_cas_req_lock(struct m0_cas_req *req)
static void ut_dtx_fini(struct m0_dtx *dtx)
struct m0_dtm0_tid dtd_id
static struct cl_ctx casc_ut_cctx
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
static void idx_list(void)
static void del_bulk(void)
static int ut_idx_crdel_wrp(enum idx_operation op, struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, m0_chan_cb_t cb, struct m0_cas_rec_reply *rep, uint32_t flags)
static int ut_rec_del(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_rec_reply *rep, uint64_t flags)
return M0_ERR(-EOPNOTSUPP)
static int ut_idx_create_async(struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, m0_chan_cb_t cb, struct m0_cas_rec_reply *rep)
M0_INTERNAL int m0_cas_req_generic_rc(const struct m0_cas_req *req)
static void get_ver_exposed(void)
M0_INTERNAL void m0_cas_req_init(struct m0_cas_req *req, struct m0_rpc_session *sess, struct m0_sm_group *grp)
static void next_bulk(void)
M0_INTERNAL void m0_cas_put_rep(struct m0_cas_req *req, uint64_t idx, struct m0_cas_rec_reply *rep)
M0_INTERNAL struct m0_dtm0_ts m0_crv_ts(const struct m0_crv *crv)
M0_INTERNAL void m0_fi_disable(const char *fp_func, const char *fp_tag)
static void idx_delete_non_exist(void)
#define M0_NET_XPRT_PREFIX_DEFAULT
M0_INTERNAL int m0_cas_next(struct m0_cas_req *req, struct m0_cas_id *index, struct m0_bufvec *start_keys, uint32_t *recs_nr, uint32_t flags)
M0_INTERNAL int m0_cas_versioned_get(struct m0_cas_req *req, struct m0_cas_id *index, const struct m0_bufvec *keys)
static void value_create(int size, int num, char *buf)
#define M0_BUFVEC_SLICE(__bufvec, __idx)
static void ut_next_rep_clear(struct m0_cas_next_reply *rep, uint64_t nr)
const struct m0_bufvec * values
M0_INTERNAL void m0_cas_next_rep(const struct m0_cas_req *req, uint32_t idx, struct m0_cas_next_reply *rep)
static void casc_ut_init(struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx)
static void casc_ut_fini(struct m0_rpc_server_ctx *sctx, struct cl_ctx *cctx)
static struct m0_addb2_callback c
static void put_get_verified(struct m0_cas_id *index, struct m0_bufvec *keys, struct m0_bufvec *values, struct m0_bufvec *expected_values, uint64_t version, int put_flags, int get_flags)
static char * cas_startup_cmd[]
static void put_common(struct m0_bufvec *keys, struct m0_bufvec *values)
static void del_ver(void)
static void next_reply_breakdown(struct m0_cas_next_reply *next_rep, m0_bcount_t nr, struct m0_bufvec *out_key, struct m0_bufvec *out_val, struct m0_crv **out_ver)
static void idx_delete_n(void)
struct m0_net_domain cl_ndom
M0_INTERNAL void m0_bufvec_cursor_init(struct m0_bufvec_cursor *cur, const struct m0_bufvec *bvec)
static const char * cl_ep_addrs[]
int m0_rpc_client_stop(struct m0_rpc_client_ctx *cctx)
M0_INTERNAL int m0_cas_del(struct m0_cas_req *req, struct m0_cas_id *index, struct m0_bufvec *keys, struct m0_dtx *dtx, uint32_t flags)
static void ut_dtx_init(struct m0_dtx **out, uint64_t version)
struct m0_net_xprt * m0_net_xprt_default_get(void)
int m0_rpc_client_start(struct m0_rpc_client_ctx *cctx)
struct m0_net_xprt ** rsx_xprts
static bool has_values(struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *expected_values, uint64_t flags)
static void next_multi_bulk(void)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
void * m0_alloc(size_t size)
static struct m0_rpc_server_ctx sctx
static void put_crow_fail(void)
static int ut_rec__get(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_get_reply *rep, uint64_t flags)
static void idx_tree_delete_fail(void)
#define BEFORE(_what, _when)
static void get_bulk(void)
M0_INTERNAL uint64_t m0_ctg_rec_size(void)
M0_INTERNAL bool m0_crv_tbs(const struct m0_crv *crv)
static int get_reply2bufvec(struct m0_cas_get_reply *get_rep, m0_bcount_t nr, struct m0_bufvec *out)
static void next_records_verified(struct m0_cas_id *index, struct m0_bufvec *start_key, uint32_t requested_keys_nr, struct m0_bufvec *expected_keys, struct m0_bufvec *expected_values, struct m0_crv *expected_versions, int flags)
#define SERVER_LOG_FILE_NAME
M0_INTERNAL const struct m0_fid m0_cas_dead_index_fid
M0_INTERNAL int m0_cas_index_create(struct m0_cas_req *req, const struct m0_cas_id *cids, uint64_t cids_nr, struct m0_dtx *dtx)
const struct m0_bufvec * keys
M0_INTERNAL void m0_cas_index_list_rep(struct m0_cas_req *req, uint32_t idx, struct m0_cas_ilist_reply *rep)
static int ut_rec_get(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_cas_get_reply *rep)
static void put_fail(void)
static struct m0_clink clink[RDWR_REQUEST_MAX]
struct m0_addb2__id_intrp ids[]
struct m0_net_domain * rcx_net_dom
struct m0_semaphore aw_cb_wait
static void recs_count(void)
bool(* m0_chan_cb_t)(struct m0_clink *link)
M0_INTERNAL void m0_reqh_idle_wait(struct m0_reqh *reqh)
static void next_keys_verified(struct m0_cas_id *index, struct m0_bufvec *start_key, uint32_t requested_keys_nr, struct m0_bufvec *expected_keys, int flags)
M0_INTERNAL int m0_cas_index_delete(struct m0_cas_req *req, const struct m0_cas_id *cids, uint64_t cids_nr, struct m0_dtx *dtx, uint32_t flags)
static void m0_fi_enable_off_n_on_m(const char *func, const char *tag, uint32_t n, uint32_t m)
static int(* cases[])(struct m0_bufvec *cas_reps, struct m0_bufvec *dix_reps, uint32_t **recs_nr, struct m0_bufvec *start_keys, uint32_t *ctx_nr)
uint64_t rcx_max_rpcs_in_flight
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
#define m0_forall(var, nr,...)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
static void next_fail(void)
static struct m0_rpc_server_ctx casc_ut_sctx
M0_INTERNAL bool m0_crv_is_none(const struct m0_crv *crv)
static bool has_versions(struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version, uint64_t flags)
M0_INTERNAL void m0_cas_index_delete_rep(const struct m0_cas_req *req, uint64_t idx, struct m0_cas_rec_reply *rep)
int ut_rec_common_put_seq(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint32_t flags)
static void next_ver(void)
static void put_fail_common(struct m0_bufvec *keys, struct m0_bufvec *values)
static int ut_idx_create(struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
M0_INTERNAL void m0_cas_req_fini_lock(struct m0_cas_req *req)
static void get_common(struct m0_bufvec *keys, struct m0_bufvec *values)
M0_INTERNAL void m0_cas_del_rep(struct m0_cas_req *req, uint64_t idx, struct m0_cas_rec_reply *rep)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
static void ut_rec_common_del_verified(struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version, uint64_t flags)
static const char * srv_ep_addrs[]
static void ut_rec_common_put_verified(struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, uint64_t version, uint64_t flags)
struct m0_reqh_context cc_reqh_ctx
struct m0_rpc_session rcx_session
static struct m0_chan chan[RDWR_REQUEST_MAX]
M0_INTERNAL uint64_t m0_cas_req_nr(const struct m0_cas_req *req)
static void next_common(struct m0_bufvec *keys, struct m0_bufvec *values, uint32_t flags)
M0_INTERNAL int m0_cas_index_lookup(struct m0_cas_req *req, const struct m0_cas_id *cids, uint64_t cids_nr)
#define M0_ALLOC_PTR(ptr)
static int bufvec_cmp(const struct m0_bufvec *left, const struct m0_bufvec *right)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
static void del_common(struct m0_bufvec *keys, struct m0_bufvec *values, uint64_t version, uint64_t put_flags, uint64_t del_flags, uint64_t get_flags)
#define M0_UT_CONF_PROCESS
static void put_common_with_ver(struct m0_bufvec *keys, struct m0_bufvec *values, uint64_t version)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
struct m0_net_xprt ** m0_net_all_xprt_get(void)
M0_INTERNAL int m0_cas_put(struct m0_cas_req *req, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, uint32_t flags)
static void ut_get_rep_clear(struct m0_cas_get_reply *rep, uint32_t nr)
const char * rcx_remote_addr
M0_INTERNAL void m0_crv_init(struct m0_crv *crv, const struct m0_dtm0_ts *ts, bool tbs)
M0_INTERNAL int m0_cas_req_wait(struct m0_cas_req *req, uint64_t states, m0_time_t to)
static void cas_ver_op_execute(const struct cas_ver_op *cvop, struct m0_cas_id *index)
static void idx_delete(void)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
static int ut_lookup_idx(struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep)
static const char * cdbnames[]
static void put_crow(void)
static int ut_idx_list(struct cl_ctx *cctx, const struct m0_fid *start_fid, uint64_t ids_nr, uint64_t *rep_count, struct m0_cas_ilist_reply *rep)
static void m0_fi_enable_once(const char *func, const char *tag)
const char * rcx_local_addr
static void cas_client_fini(struct cl_ctx *cctx)
static int bufvec_empty_alloc(struct m0_bufvec *bufvec, uint32_t num_segs)
static int ut_rec_common_del_seq(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint64_t flags)
static void verify_version_properties(struct m0_cas_id *index, const struct m0_bufvec *keys, uint64_t version)
void m0_rpc_server_stop(struct m0_rpc_server_ctx *sctx)
static int ut_rec_common_put(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, struct m0_cas_rec_reply *rep, uint32_t flags)
struct m0_ut_suite cas_client_ut
static void idx_create_a(void)
M0_INTERNAL void m0_cas_rep_mlock(const struct m0_cas_req *req, uint64_t idx)
M0_INTERNAL const struct m0_fid m0_cas_ctidx_fid
static int ut_idx_flagged_delete(struct cl_ctx *cctx, const struct m0_fid *ids, uint64_t ids_nr, struct m0_cas_rec_reply *rep, uint32_t flags)
static int ut_next_rec(struct cl_ctx *cctx, struct m0_cas_id *index, struct m0_bufvec *start_keys, uint32_t *recs_nr, struct m0_cas_next_reply *rep, uint64_t *count, uint32_t flags)
static void idx_tree_delete(void)
struct m0_net_xprt * xprt
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static int cas_client_init(struct cl_ctx *cctx, const char *cl_ep_addr, const char *srv_ep_addr, const char *dbname, struct m0_net_xprt *xprt)
M0_INTERNAL void m0_bufvec_free2(struct m0_bufvec *bufvec)
static struct m0_fid ifid
static void put_overwrite_ver(void)
struct m0_fid g_process_fid
M0_INTERNAL void m0_cas_index_lookup_rep(const struct m0_cas_req *req, uint64_t idx, struct m0_cas_rec_reply *rep)
static int ut_rec_put(struct cl_ctx *cctx, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_cas_rec_reply *rep, uint32_t flags)
static void idx_create_fail(void)
struct m0_motr rsx_motr_ctx
struct m0_dtm0_tx_desc dd_txd
M0_INTERNAL int m0_bufvec_empty_alloc(struct m0_bufvec *bufvec, uint32_t num_segs)
static void idx_create(void)
static void vals_mix_create(int count, int large_size, struct m0_bufvec *vals)
static bool next_rep_equals(const struct m0_cas_next_reply *rep, void *key, void *val)
static void put_del_ver_case_verify(const struct put_del_ver_case *c, struct m0_cas_id *index)
#define M0_IMPOSSIBLE(fmt,...)