66 extern void rmsvc(
void);
146 &
data->rd_res->r_remotes, other) {
204 &
src->rc_rmach_ctx.rmc_rpc,
205 dest->rc_rmach_ctx.rmc_ep_addr,
233 owner =
data->rd_owner;
256 for (
i = 0;
i < debtors_nr; ++
i) {
269 if (
rm_ctxs[srv_id].rc_is_dead)
300 for (
i = 0;
i < debtors_nr; ++
i) {
351 char minimal_conf_str[] =
"[5:\ 352 {0x74| ((^t|1:0), 1, (11, 22), ^o|1:23, ^v|1:24, 41212,\ 353 [3: \"param-0\", \"param-1\", \"param-2\"],\ 354 [1: ^n|1:2], [0], [1: ^o|1:23], [1:^p|1:0], [0])},\ 355 {0x70| ((^p|1:0), [1: ^o|1:23])},\ 356 {0x6e| ((^n|1:2), 16000, 2, 3, 2, [1: ^r|1:3])},\ 357 {0x72| ((^r|1:3), [1:3], 0, 0, 0, 0, \"addr-0\", [0])},\ 358 {0x6f| ((^o|1:23), 0, [0])}]";
360 for (
i = 0;
i < ctxs_nr;
i++) {
375 for (j = 0; j < ctxs_nr; j++) {
388 for (
i = 0;
i < ctxs_nr;
i++) {
413 &
rm_ctxs[dsrv_id].rc_test_data.rd_owner->ro_id);
454 sum = m0_tl_reduce(m0_rm_ur, credit,
list, 0, + credit->cr_datum);
const struct m0_rm_credit_ops * cr_ops
M0_INTERNAL int m0_rm_owner_selfadd(struct m0_rm_owner *owner, struct m0_rm_credit *r)
struct m0_reqh_service * rmservice[SERVER_NR]
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL void m0_ut_rpc_mach_init_and_add(struct m0_ut_rpc_mach_ctx *ctx)
static struct m0_list list
enum m0_rm_remote_state rem_state
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
const struct m0_conf_obj_type M0_CONF_PROFILE_TYPE
static struct m0_rm_remote creditor
struct rm_ctx rm_ctxs[SERVER_NR]
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
struct m0_rm_remote * ro_creditor
void creditor_cookie_setup(enum rm_server dsrv_id, enum rm_server csrv_id)
M0_INTERNAL void m0_fid_tset(struct m0_fid *fid, uint8_t tid, uint64_t container, uint64_t key)
struct rm_ut_data rm_test_data
const m0_time_t M0_TIME_NEVER
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_lookup(const struct m0_conf_cache *cache, const struct m0_fid *id)
M0_INTERNAL void m0_conf_dir_add(struct m0_conf_dir *dir, struct m0_conf_obj *obj)
void rm_fop_funcs_test(void)
const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
struct rm_ut_data rc_test_data
M0_INTERNAL const struct m0_bob_type loan_bob
bool m0_rm_ur_tlist_is_empty(const struct m0_tl *list)
struct m0_rpc_machine rmc_rpc
struct m0_ut_rpc_mach_ctx rc_rmach_ctx
M0_INTERNAL int m0_ha_client_del(struct m0_confc *confc)
int m0_rpc_session_destroy(struct m0_rpc_session *session, m0_time_t abs_timeout)
M0_INTERNAL int m0_confc_init(struct m0_confc *confc, struct m0_sm_group *sm_group, const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf)
int const char const void * value
struct m0_rm_owner * rd_owner
M0_INTERNAL void m0_confc_fini(struct m0_confc *confc)
M0_INTERNAL void m0_rm_domain_init(struct m0_rm_domain *dom)
M0_INTERNAL void m0_rm_remote_init(struct m0_rm_remote *rem, struct m0_rm_resource *res)
struct m0_rpc_session * rem_session
M0_INTERNAL bool m0_conf_obj_is_stub(const struct m0_conf_obj *obj)
M0_INTERNAL int m0_rm_owner_timedwait(struct m0_rm_owner *owner, uint64_t state, const m0_time_t abs_timeout)
void rm_ctx_fini(struct rm_ctx *rmctx)
M0_INTERNAL struct m0_fid * m0_reqh2profile(struct m0_reqh *reqh)
void rm_ctxs_rmsvc_conf_add(struct m0_confc *confc, struct rm_ctx *rmctx)
struct m0_chan rm_ut_tests_chan
M0_INTERNAL void m0_ref_get(struct m0_ref *ref)
void loan_session_set(enum rm_server csrv_id, enum rm_server dsrv_id)
M0_INTERNAL int m0_rpc_client_connect(struct m0_rpc_conn *conn, struct m0_rpc_session *session, struct m0_rpc_machine *rpc_mach, const char *remote_addr, struct m0_fid *svc_fid, uint64_t max_rpcs_in_flight, m0_time_t abs_timeout)
void rm_ctx_init(struct rm_ctx *rmctx, enum rm_server id)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
#define m0_tl_teardown(name, head, obj)
struct rm_ut_data test_data
const struct m0_tl_descr m0_remotes_tl
const struct m0_fid_type cot_ftype
void rm_utdata_owner_windup_fini(struct rm_ut_data *data)
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
static struct m0_confc * confc
void rm_ctxs_conf_fini(struct rm_ctx *rm_ctxs, int ctxs_nr)
#define bob_of(ptr, type, field, bt)
int m0_rpc_conn_destroy(struct m0_rpc_conn *conn, m0_time_t abs_timeout)
struct m0_conf_cache cc_cache
enum rm_server debtor_id[SERVER_NR - 1]
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL bool m0_cookie_is_eq(const struct m0_cookie *cookie1, const struct m0_cookie *cookie2)
void rm_fom_funcs_test(void)
M0_INTERNAL void m0_cookie_init(struct m0_cookie *cookie, const uint64_t *obj)
void m0_remotes_tlist_del(struct m0_rm_remote *other)
M0_INTERNAL int m0_conf_obj_find(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
struct m0_rm_remote * rl_other
void rm_utdata_init(struct rm_ut_data *data, enum obj_type type)
#define M0_CONF_CAST(ptr, type)
M0_INTERNAL int m0_reqh_service_setup(struct m0_reqh_service **out, struct m0_reqh_service_type *stype, struct m0_reqh *reqh, struct m0_reqh_context *rctx, const struct m0_fid *fid)
void rm_ctxs_conf_init(struct rm_ctx *rm_ctxs, int ctxs_nr)
void rm_ctx_disconnect(struct rm_ctx *src, const struct rm_ctx *dest)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
struct m0_reqh_service_type m0_rms_type
struct m0_conf_dir * pc_services
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
void local_credits_test(void)
M0_INTERNAL void m0_rm_credit_init(struct m0_rm_credit *credit, struct m0_rm_owner *owner)
M0_INTERNAL void m0_rm_remote_fini(struct m0_rm_remote *rem)
void rm_ctx_server_windup(enum rm_server srv_id)
#define M0_ALLOC_PTR(ptr)
static struct m0_rm_remote * remote
M0_INTERNAL void m0_ut_rpc_mach_fini(struct m0_ut_rpc_mach_ctx *ctx)
M0_INTERNAL void m0_rm_owner_windup(struct m0_rm_owner *owner)
struct m0_tl ro_owned[OWOS_NR]
enum rm_server creditor_id
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
M0_INTERNAL void m0_conf_cache_clean(struct m0_conf_cache *cache, const struct m0_conf_obj_type *type)
M0_INTERNAL int m0_ha_client_add(struct m0_confc *confc)
enum m0_conf_status co_status
static void m0_fi_enable_once(const char *func, const char *tag)
void(* cro_initial_capital)(struct m0_rm_credit *self)
void credits_are_equal(enum rm_server srv_id, enum rm_ut_credits_list list_id, uint64_t value)
void rm_test_owner_capital_raise(struct m0_rm_owner *owner, struct m0_rm_credit *credit)
const struct m0_conf_obj_type M0_CONF_PROCESS_TYPE
struct m0_cookie rem_cookie
void rm_ctx_server_stop(enum rm_server srv_id)
M0_INTERNAL void m0_conf_cache_lock(struct m0_conf_cache *cache)
struct m0_rpc_session rc_sess[SERVER_NR]
const struct m0_conf_obj_type M0_CONF_DIR_TYPE
#define m0_tl_for(name, head, obj)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
struct m0_pdclust_src_addr src
M0_INTERNAL void m0_rm_domain_fini(struct m0_rm_domain *dom)
struct m0_mutex rm_ut_tests_chan_mutex
void rm_ctx_server_start(enum rm_server srv_id)
M0_INTERNAL void m0_conf_cache_unlock(struct m0_conf_cache *cache)
void rm_ctx_connect(struct rm_ctx *src, const struct rm_ctx *dest)
void rm_ctx_server_owner_windup(enum rm_server srv_id)
struct m0_rm_resource * ro_resource
void rm_utdata_fini(struct rm_ut_data *data, enum obj_type type)
#define M0_IMPOSSIBLE(fmt,...)