23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_CONF 584 .sd_name =
"M0_RCS_INIT",
590 .sd_name =
"M0_RCS_ENTRYPOINT_WAIT",
596 .sd_name =
"M0_RCS_ENTRYPOINT_CONSUME",
601 .sd_name =
"M0_RCS_CREDITOR_SETUP",
606 .sd_name =
"M0_RCS_GET_RLOCK",
611 .sd_name =
"M0_RCS_VERSION_ELECT",
617 .sd_name =
"M0_RCS_IDLE",
622 .sd_name =
"M0_RCS_RLOCK_CONFLICT",
626 .sd_name =
"M0_RCS_CONDUCTOR_DRAIN",
631 .sd_name =
"M0_RCS_CONDUCTOR_DISCONNECT",
635 .sd_name =
"M0_RCS_STOPPING",
640 .sd_name =
"M0_RCS_FAILURE",
645 .sd_name =
"M0_RCS_FINAL" 806 void *fake_ptr = (
void *)1;
834 M0_PRE(m0_conf_cache_tlist_length(
1259 rcnf_active_tlink_fini(lnk);
1307 M0_LEAVE(
"co_ha_state = %d, return true",
obj->co_ha_state);
1317 M0_LEAVE(
"lnk=%p co_ha_state = M0_NC_FAILED, return false", lnk);
1420 NULL, HERD_LINK_TIMEOUT_DEFAULT);
1421 if (lnk->
rl_rc == 0)
1567 rcnf_herd_tlink_fini(lnk);
1575 rcnf_herd_tlist_del(lnk);
1622 uint32_t link_quorum = 0;
1624 M0_ENTRY(
"rconfc = %p, confd_addr[] = %p, [confd_addr] = %u",
1681 if (lnk->
rl_rc == 0)
1691 link_quorum < rconfc->rc_quorum) {
1693 rcnf_herd_tlist_del(lnk);
1705 if (link_quorum < rconfc->rc_quorum) {
1708 return M0_RC(-EAGAIN);
1772 CONDUCTOR_TIMEOUT_DEFAULT) ?:
1839 next->rl_confd_addr,
rc);
1908 " hbp_confd_eps[%d]=%s",
1975 if (M0_IN(
rc, (-ENOKEY, -EPERM)))
2016 M0_LEAVE(
"rc=%d hae_control=%d is_failed=%s entrypoint_retries=%"PRIu32,
2176 "waiters %d, ha %d",
obj->co_nrefs,
FID_P(&
obj->co_id),
2177 obj->co_chan.ch_waiters,
obj->co_ha_chan.ch_waiters);
2238 M0_LEAVE(
"result=%s", result ?
"true" :
"false");
2417 M0_LEAVE(
"Conflict to be handled...");
2438 armed_count = m0_tl_reduce(rcnf_herd, lnk, &
rconfc->
rc_herd, 0,
2440 ver_count_max = m0_fold(idx, acc, va->
va_count, 0,
2442 if (ver_count_max + armed_count < rconfc->rc_quorum) {
2463 bool quorum_reached =
false;
2469 for (idx = 0; idx < va->
va_count; idx++) {
2487 for (idx = 0; idx < va->
va_count; idx++) {
2491 quorum_reached =
true;
2495 M0_LEAVE(
"quorum %sreached", quorum_reached ?
"" :
"not ");
2496 return quorum_reached;
2662 bool quorum_is =
false;
2677 lnk->
rl_rc = -ENODATA;
2690 else if (!quorum_was)
2753 M0_CONF_ROOT_PROFILES_FID);
2768 MAX_RETRY_COUNT = 100,
2772 static uint32_t retry_count = 0;
2788 if (
rc == -ECONNREFUSED && retry_count++ < MAX_RETRY_COUNT) {
2791 connection refused error");
2943 uint64_t timeout_ns)
2964 deadline) == -ETIMEDOUT) {
3086 size_t confd_eps_length;
3095 if ((*eps)[
i] ==
NULL)
3153 M0_ENTRY(
"ha_entrypoint_client_state=%s",
3199 #undef M0_TRACE_SUBSYSTEM
static int rconfc_herd_destroy(struct m0_rconfc *rconfc)
struct m0_fid hae_active_rm_fid
m0_rconfc_cb_t rc_fatal_cb
M0_INTERNAL void m0_rconfc_rm_fid(struct m0_rconfc *rconfc, struct m0_fid *out)
struct m0_clink rc_conductor_clink
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
struct m0_conf_obj * cc_root
struct rconfc_load_ctx rc_rx
struct m0_ha_entrypoint_client h_entrypoint_client
#define M0_ALLOC_ARR(arr, nr)
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_pinned(const struct m0_conf_cache *cache)
static struct m0_rconfc * rlock_ctx_incoming_to_rconfc(struct m0_rm_incoming *in)
static void rconfc_read_lock_retry(struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
M0_INTERNAL void m0_sm_fail(struct m0_sm *mach, int fail_state, int32_t rc)
static bool rconfc_gate_check(struct m0_confc *confc)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void rconfc_herd_link_init(struct rconfc_link *lnk)
M0_INTERNAL int m0_ha_entrypoint_rep_copy(struct m0_ha_entrypoint_rep *to, struct m0_ha_entrypoint_rep *from)
struct m0_sm_ast rc_load_fini_ast
struct m0_clink rc_ha_entrypoint_cl
static int _confc_phony_cache_append(struct m0_confc *confc, const struct m0_fid *fid)
static void rconfc_link_ast_post(struct rconfc_link *lnk, void *datum, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
struct m0_sm_ast rl_link_ast
static const struct m0_sm_conf rconfc_sm_conf
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
static bool rconfc_gate_drain(struct m0_clink *clink)
M0_INTERNAL void m0_clink_del(struct m0_clink *link)
struct m0_ha_entrypoint_rep rc_ha_entrypoint_rep
static struct m0_rm_remote creditor
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
struct m0_rm_remote * ro_creditor
static void rconfc_link_fini_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static bool rconfc_unpinned_cb(struct m0_clink *link)
struct m0_sm_ast rc_cctx_fini_ast
static struct m0_reqh * rconfc_link2reqh(struct rconfc_link *lnk)
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL int m0_conf_full_load(struct m0_conf_root *r)
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
static void rconfc_start_ast_cb(struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
static int rconfc_local_load(struct m0_rconfc *rconfc)
void(* rio_complete)(struct m0_rm_incoming *in, int32_t rc)
const m0_time_t M0_TIME_NEVER
M0_INTERNAL void rconfc_herd_link_cleanup(struct rconfc_link *lnk)
static struct io_request req
M0_INTERNAL struct m0_rpc_conn * m0_confc2conn(struct m0_confc *confc)
static struct m0_sm_group * grp
struct m0_conf_obj rt_obj
M0_INTERNAL struct m0_conf_obj * m0_conf_cache_lookup(const struct m0_conf_cache *cache, const struct m0_fid *id)
static void rconfc_conductor_drain(struct m0_sm_group *grp, struct m0_sm_ast *ast)
#define M0_LOG(level,...)
bool rc_quorum_decision_is_made
static void rconfc_fail_ast(struct m0_rconfc *rconfc, int rc)
const char ** hae_confd_eps
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static void rconfc_load_ast_thread(struct rconfc_load_ctx *rx)
M0_INTERNAL void m0_sm_group_unlock_rec(struct m0_sm_group *grp, bool runast)
bool(* go_check)(struct m0_confc *confc)
uint32_t rc_ha_entrypoint_retries
struct rconfc_load_ctx::rconfc_load_ast rx_ast
static void rconfc__ast_post(struct m0_rconfc *rconfc, void *datum, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
void(* m0_rconfc_cb_t)(struct m0_rconfc *rconfc)
int(* go_skip)(struct m0_confc *confc)
static void rlock_ctx_read_domain_fini(struct rlock_ctx *rlx)
M0_INTERNAL void m0_rm_rwlock_req_init(struct m0_rm_incoming *req, struct m0_rm_owner *owner, const struct m0_rm_incoming_ops *ops, enum m0_rm_incoming_flags flags, enum m0_rm_rwlock_req_type type)
struct m0_confc * fc_confc
M0_INTERNAL int m0_ha_client_del(struct m0_confc *confc)
struct m0_rm_ha_tracker rem_tracker
static void leave(struct m0_locality_chore *chore, struct m0_locality *loc, void *place)
struct m0_fid rlc_owner_fid
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)
static void rconfc_stop_internal(struct m0_rconfc *rconfc)
struct m0_clink rl_ha_clink
#define M0_MEMBER(ptr, member)
M0_INTERNAL void m0_rconfc_stop_sync(struct m0_rconfc *rconfc)
static void rconfc_start(struct m0_rconfc *rconfc)
static int _confc_cache_clean_lock(struct m0_confc *confc)
M0_INTERNAL enum m0_ha_entrypoint_client_state m0_ha_entrypoint_client_state_get(struct m0_ha_entrypoint_client *ecl)
M0_INTERNAL void m0_rconfc_fatal_cb_set(struct m0_rconfc *rconfc, m0_rconfc_cb_t cb)
M0_INTERNAL const char * m0_sm_state_name(const struct m0_sm *mach, int state)
M0_INTERNAL void m0_confc_fini(struct m0_confc *confc)
struct ver_item va_items[VERSION_ITEMS_TOTAL_MAX]
static int rlock_ctx_read_domain_init(struct rlock_ctx *rlx)
M0_INTERNAL bool m0_clink_is_armed(const struct m0_clink *link)
M0_INTERNAL void m0_rpc_link_fini(struct m0_rpc_link *rlink)
static void rconfc_herd_prune(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_rm_remote_init(struct m0_rm_remote *rem, struct m0_rm_resource *res)
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
struct m0_confc_gate_ops rc_gops
struct m0_rpc_machine * rc_rmach
M0_INTERNAL struct m0 * m0_get(void)
uint32_t rc_sm_state_on_abort
static void rconfc_owner_creditor_reset(struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
M0_INTERNAL m0_time_t m0_rpc__down_timeout(void)
static uint32_t rconfc_confd_count(const char **confd_addr)
#define container_of(ptr, type, member)
static void rconfc_conductor_disconnected(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_rpc_session * rem_session
M0_INTERNAL void m0_ha_entrypoint_client_request(struct m0_ha_entrypoint_client *ecl)
struct m0_sm_ast rc_load_ast
M0_INTERNAL bool m0_fid_is_set(const struct m0_fid *fid)
static void rlock_ctx_disconnect(struct rlock_ctx *rlx)
static struct m0_rpc_item * item
M0_INTERNAL bool m0_conf_obj_is_stub(const struct m0_conf_obj *obj)
M0_INTERNAL void m0_rw_lockable_fini(struct m0_rw_lockable *lockable)
M0_INTERNAL void m0_sm_group_fini(struct m0_sm_group *grp)
M0_INTERNAL int m0_confc_reconnect(struct m0_confc *confc, struct m0_rpc_machine *rpc_mach, const char *confd_addr)
M0_INTERNAL int m0_rm_owner_timedwait(struct m0_rm_owner *owner, uint64_t state, const m0_time_t abs_timeout)
#define m0_confc_open(ctx, origin,...)
static void rconfc_conf_full_load(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static void rconfc_read_lock_complete(struct m0_rm_incoming *in, int32_t rc)
M0_INTERNAL int m0_sm_timedwait(struct m0_sm *mach, uint64_t states, m0_time_t deadline)
static void _confc_phony_cache_remove(struct m0_confc *confc, const struct m0_fid *fid)
static bool rlock_owner_clink_cb(struct m0_clink *cl)
M0_INTERNAL int m0_confc_root_open(struct m0_confc *confc, struct m0_conf_root **root)
static bool rconfc_ha_update_cb(struct m0_clink *link)
M0_INTERNAL int m0_rconfc_rm_endpoint(struct m0_rconfc *rconfc, char **ep)
M0_INTERNAL const char * m0_rpc_conn_addr(const struct m0_rpc_conn *conn)
struct m0_rm_owner rlc_owner
struct m0_rw_lockable rlc_rwlock
M0_INTERNAL void m0_rm_rwlock_owner_init(struct m0_rm_owner *owner, struct m0_fid *fid, struct m0_rw_lockable *lockable, struct m0_rm_remote *creditor)
static struct m0_sm_ast ast[NR]
struct m0_rconfc * rlc_parent
M0_INTERNAL void m0_sm_group_unlock(struct m0_sm_group *grp)
struct m0_rm_remote rlc_creditor
M0_INTERNAL bool m0_rconfc_reading_is_allowed(const struct m0_rconfc *rconfc)
static void _failure_ast_cb(struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
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)
struct m0_clink rl_fom_clink
static int64_t max64(int64_t a, int64_t b)
static void rconfc_load_ast_thread_fini(struct rconfc_load_ctx *rx)
#define M0_ERR_INFO(rc, fmt,...)
struct m0_conf_root * root
struct m0_rpc_machine * rlc_rmach
return M0_ERR(-EOPNOTSUPP)
struct m0_clink rc_ha_update_cl
static int _confc_cache_clean(struct m0_confc *confc)
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)
struct m0_clink rc_herd_cl
static void rconfc_herd_link_subscribe(struct rconfc_link *lnk)
static const char * _confc_remote_addr_read(const struct m0_confc *confc)
static bool rconfc_quorum_is_possible(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_rm_rwlock_owner_fini(struct m0_rm_owner *owner)
static void rconfc_active_populate(struct m0_rconfc *rconfc)
#define M0_AMB(obj, ptr, field)
#define m0_tl_teardown(name, head, obj)
static enum m0_rm_owner_state rlock_ctx_creditor_state(struct rlock_ctx *rlx)
struct m0_rm_resource_type rlc_rt
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
M0_INTERNAL void m0_rconfc_stop(struct m0_rconfc *rconfc)
M0_INTERNAL const char * m0_bool_to_str(bool b)
struct m0_rm_incoming rlc_req
M0_INTERNAL void m0_confc_ctx_fini_locked(struct m0_confc_ctx *ctx)
static struct m0_confc * confc
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
M0_INTERNAL void m0_sm_group_init(struct m0_sm_group *grp)
M0_INTERNAL void m0_fid_tgenerate(struct m0_fid *fid, const uint8_t tid)
static void rconfc_cctx_fini(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static void rconfc_herd_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
struct m0_mutex rc_herd_lock
void m0_sm_state_set(struct m0_sm *mach, int state)
M0_INTERNAL void m0_rw_lockable_init(struct m0_rw_lockable *lockable, const struct m0_fid *fid, struct m0_rm_domain *dom)
struct m0_clink rc_unpinned_cl
struct m0_rm_domain rlc_dom
static void rconfc_fail(struct m0_rconfc *rconfc, int rc)
M0_INTERNAL bool m0_confc_ctx_is_completed(const struct m0_confc_ctx *ctx)
static int rlock_ctx_create(struct m0_rconfc *parent, struct m0_rpc_machine *rmach, struct rlock_ctx **out)
static bool rlock_ctx_is_online(struct rlock_ctx *rlx)
bool(* go_drain)(struct m0_clink *clink)
M0_TL_DEFINE(rcnf_herd, M0_INTERNAL, struct rconfc_link)
int m0_rpc_conn_destroy(struct m0_rpc_conn *conn, m0_time_t abs_timeout)
M0_INTERNAL bool m0_confc_is_online(const struct m0_confc *confc)
M0_INTERNAL int m0_confc_ctx_init(struct m0_confc_ctx *ctx, struct m0_confc *confc)
M0_INTERNAL void m0_rm_rwlock_req_fini(struct m0_rm_incoming *req)
struct m0_conf_cache cc_cache
M0_INTERNAL bool m0_rconfc_is_preloaded(struct m0_rconfc *rconfc)
const char * confd_addr[]
static bool ha_clink_cb(struct m0_clink *clink)
static void rconfc_creditor_death_handle(struct m0_rconfc *rconfc)
struct m0_confc_ctx rl_cctx
static void rlock_ctx_owner_windup(struct rlock_ctx *rlx)
struct m0_chan rc_herd_chan
struct m0_rconfc * rl_rconfc
M0_INTERNAL void m0_clink_signal(struct m0_clink *clink)
struct m0_sm_group * sm_grp
static void rconfc_ast_post(struct m0_rconfc *rconfc, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
static void rconfc_state_set(struct m0_rconfc *rconfc, int state)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL size_t m0_tlist_length(const struct m0_tl_descr *d, const struct m0_tl *list)
static int rconfc_start_internal(struct m0_rconfc *rconfc)
struct m0_confc_gate_ops m0_rconfc_gate_ops
M0_INTERNAL void rconfc_herd_link_fini(struct rconfc_link *lnk)
M0_INTERNAL int m0_conf_obj_find_lock(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
struct m0_chan co_ha_chan
static struct m0_sm_state_descr rconfc_states[]
static int _confc_phony_init(struct m0_confc *confc)
const struct m0_fid M0_RWLOCK_FID
M0_INTERNAL void m0_rconfc_lock(struct m0_rconfc *rconfc)
struct m0_rm_incoming_ops m0_rconfc_ri_ops
static void rconfc_read_lock_conflict(struct m0_rm_incoming *in)
M0_INTERNAL int m0_conf_confc_ha_update_async(struct m0_confc *confc, struct m0_ha_nvec *nvec, struct m0_chan *chan)
M0_INTERNAL void m0_clink_cleanup(struct m0_clink *link)
static bool rconfc_herd_link__on_death_cb(struct m0_clink *clink)
M0_INTERNAL int m0_conf_obj_find(struct m0_conf_cache *cache, const struct m0_fid *id, struct m0_conf_obj **out)
struct m0_sm_ast * sa_next
struct m0_sm_group rx_grp
static void rconfc_conf_load_fini(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL bool m0_confc_is_inited(const struct m0_confc *confc)
M0_INTERNAL int m0_rwlockable_domain_type_init(struct m0_rm_domain *rwl_dom, struct m0_rm_resource_type *rwl_rt)
static struct m0_clink clink[RDWR_REQUEST_MAX]
M0_INTERNAL int m0_conf_cache_add(struct m0_conf_cache *cache, struct m0_conf_obj *obj)
static void rconfc_ha_update_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
void(* rl_on_state_cb)(struct rconfc_link *lnk)
static void rconfc_idle(struct m0_rconfc *rconfc)
enum m0_ha_entrypoint_control hae_control
static int rconfc_gate_skip(struct m0_confc *confc)
static void rconfc_rlock_windup(struct m0_rconfc *rconfc)
static void rconfc_read_lock_put(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_rconfc_fini(struct m0_rconfc *rconfc)
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
#define m0_forall(var, nr,...)
static void rconfc_herd_cctxs_fini(struct m0_rconfc *rconfc)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
static uint64_t _confc_ver_read(const struct m0_confc *confc)
M0_INTERNAL int m0_rconfc_confd_endpoints(struct m0_rconfc *rconfc, const char ***eps)
struct m0_rpc_link cc_rlink
static void rlock_ctx_creditor_unset(struct rlock_ctx *rlx)
static void rconfc_version_elected(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void m0_rm_credit_put(struct m0_rm_incoming *in)
static void rconfc_conductor_disconnected_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static uint8_t fail[DATA_UNIT_COUNT_MAX+PARITY_UNIT_COUNT_MAX]
M0_INTERNAL void m0_rconfc_unlock(struct m0_rconfc *rconfc)
m0_rconfc_cb_t rc_expired_cb
M0_INTERNAL struct m0_conf_obj * m0_conf_obj_create(const struct m0_fid *id, struct m0_conf_cache *cache)
static bool rconfc__cb_quorum_test(struct m0_clink *clink)
static struct m0_fid profile
M0_INTERNAL void m0_confc_gate_ops_set(struct m0_confc *confc, struct m0_confc_gate_ops *gops)
struct m0_rpc_conn rlc_conn
static int rconfc_conductor_connect(struct m0_rconfc *rconfc, struct rconfc_link *lnk)
M0_INTERNAL void m0_strings_free(const char **arr)
static void rconfc_read_lock_get(struct m0_rconfc *rconfc)
m0_ha_entrypoint_client_state
static void rconfc_active_all_unlink(struct m0_rconfc *rconfc)
#define M0_FI_ENABLED(tag)
static int rconfc_conductor_iterate(struct m0_rconfc *rconfc)
struct m0_ha_nvec rc_nvec
const struct m0_fom_ops rconfc_link_fom_ops
M0_INTERNAL void m0_rm_remote_fini(struct m0_rm_remote *rem)
M0_INTERNAL void m0_sm_init(struct m0_sm *mach, const struct m0_sm_conf *conf, uint32_t state, struct m0_sm_group *grp)
M0_INTERNAL void m0_conf_cache_del(const struct m0_conf_cache *cache, struct m0_conf_obj *obj)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_clink_add(struct m0_chan *chan, struct m0_clink *link)
static int rlock_ctx_connect(struct rlock_ctx *rlx, const char *ep)
M0_TL_DESCR_DEFINE(rcnf_herd, "rconfc's working confc list", M0_INTERNAL, struct rconfc_link, rl_herd, rl_magic, M0_RCONFC_LINK_MAGIC, M0_RCONFC_HERD_HEAD_MAGIC)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
const struct m0_fid M0_CONF_ROOT_FID
static void rconfc_entrypoint_debug_print(struct m0_ha_entrypoint_rep *entrypoint)
M0_INTERNAL void m0_rm_owner_windup(struct m0_rm_owner *owner)
M0_INTERNAL void m0_ha_entrypoint_rep_free(struct m0_ha_entrypoint_rep *rep)
M0_INTERNAL int m0_rconfc_start(struct m0_rconfc *rconfc)
static bool rconfc_confd_addr_are_all_unique(const char **confd_addr)
static int rconfc_load_ast_thread_init(struct rconfc_load_ctx *rx)
static int rconfc_herd_update(struct m0_rconfc *rconfc, const char **confd_addr, struct m0_fid_arr *confd_fids)
M0_INTERNAL void m0_conf_obj_delete(struct m0_conf_obj *obj)
struct m0_clink rlc_clink
static void rconfc_herd_link_unsubscribe(struct rconfc_link *lnk)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
M0_INTERNAL uint64_t m0_rconfc_ver_max_read(struct m0_rconfc *rconfc)
static void rconfc_herd_link_destroy(struct rconfc_link *lnk)
M0_INTERNAL void m0_sm_group_lock(struct m0_sm_group *grp)
M0_INTERNAL struct m0_chan * m0_ha_entrypoint_client_chan(struct m0_ha_entrypoint_client *ecl)
static int rlock_ctx_creditor_setup(struct rlock_ctx *rlx, const char *ep)
static void rconfc_version_elect(struct m0_sm_group *grp, struct m0_sm_ast *ast)
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)
M0_INTERNAL void m0_fom_queue(struct m0_fom *fom)
M0_INTERNAL void m0_rm_owner_unlock(struct m0_rm_owner *owner)
struct m0_fom_type rconfc_link_fom_type
static void ver_accm_init(struct ver_accm *va, int total)
static void rlock_ctx_destroy(struct rlock_ctx *rlx)
static struct m0_rconfc * rconfc(struct m0_client *m0c)
#define max_type(t, a, b)
struct m0_sm_ast rc_stop_ast
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
static void rconfc_active_add(struct m0_rconfc *rconfc, struct rconfc_link *lnk)
static void rlock_conflict_handle(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL void m0_rm_owner_creditor_reset(struct m0_rm_owner *owner, struct m0_rm_remote *creditor)
M0_INTERNAL void m0_chan_fini(struct m0_chan *chan)
static void _confc_phony_fini(struct m0_confc *phony)
static uint32_t rconfc_state(const struct m0_rconfc *rconfc)
static bool rconfc_quorum_test(struct m0_rconfc *rconfc, struct m0_confc *confc)
static void rconfc_stop_ast_cb(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL int m0_rconfc_init(struct m0_rconfc *rconfc, const struct m0_fid *profile, struct m0_sm_group *sm_group, struct m0_rpc_machine *rmach, m0_rconfc_cb_t expired_cb, m0_rconfc_cb_t ready_cb)
M0_INTERNAL int m0_confc_init_wait(struct m0_confc *confc, struct m0_sm_group *sm_group, const char *confd_addr, struct m0_rpc_machine *rpc_mach, const char *local_conf, uint64_t timeout_ns)
static int rconfc_herd_fini(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_rm_owner_lock(struct m0_rm_owner *owner)
static void rconfc_conductor_drained(struct m0_rconfc *rconfc)
static bool rconfc_quorum_is_reached(struct m0_rconfc *rconfc)
struct m0_ha_note * nv_note
struct m0_fid_arr hae_confd_fids
M0_INTERNAL void m0_rpc_conn_sessions_cancel(struct m0_rpc_conn *conn)
static bool rconfc_conductor_disconnect_cb(struct m0_clink *clink)
M0_INTERNAL void m0_sm_asts_run(struct m0_sm_group *grp)
M0_INTERNAL void m0_conf_cache_lock(struct m0_conf_cache *cache)
#define m0_tl_find(name, var, head,...)
M0_INTERNAL void m0_rpc_link_disconnect_async(struct m0_rpc_link *rlink, m0_time_t abs_timeout, struct m0_clink *wait_clink)
#define m0_tl_for(name, head, obj)
M0_INTERNAL void m0_rwlockable_domain_type_fini(struct m0_rm_domain *rwl_dom, struct m0_rm_resource_type *rwl_rt)
M0_INTERNAL bool m0_fid_arr_all_unique(const struct m0_fid_arr *a)
struct m0_ha_entrypoint_rep ecl_rep
struct m0_clink rht_clink
static bool rconfc_herd_fini_cb(struct m0_clink *link)
static int rconfc_conductor_engage(struct m0_rconfc *rconfc)
struct m0_rpc_session rlc_sess
M0_INTERNAL int32_t m0_confc_ctx_error(const struct m0_confc_ctx *ctx)
M0_INTERNAL bool m0_sm_group_is_locked(const struct m0_sm_group *grp)
M0_INTERNAL void m0_conf_cache_unlock(struct m0_conf_cache *cache)
#define m0_tl_exists(name, var, head,...)
M0_INTERNAL struct rconfc_link * rconfc_herd_find(struct m0_rconfc *rconfc, const char *addr)
m0_rconfc_cb_t rc_ready_cb
M0_INTERNAL void m0_rm_credit_get(struct m0_rm_incoming *in)
struct m0_fid rl_confd_fid
struct m0_rm_resource * ro_resource
static int rconfc_entrypoint_consume(struct m0_rconfc *rconfc)
static bool rconfc_is_locked(struct m0_rconfc *rconfc)
M0_INTERNAL void m0_sm_fini(struct m0_sm *mach)
M0_INTERNAL void m0_sm_group_lock_rec(struct m0_sm_group *grp, bool runast)
M0_INTERNAL int m0_rconfc_start_wait(struct m0_rconfc *rconfc, uint64_t timeout_ns)