Motr  M0
High availability

Data Structures

struct  m0_ha_cookie
 
struct  m0_ha_cookie_xc
 
struct  ha_entrypoint_service
 
struct  ha_entrypoint_server_fom
 
struct  m0_ha_entrypoint_server_cfg
 
struct  m0_ha_entrypoint_server
 
struct  m0_ha_entrypoint_client_cfg
 
struct  m0_ha_entrypoint_client
 
struct  m0_ha_entrypoint_rep_fop
 
struct  m0_ha_entrypoint_req_fop
 
struct  m0_ha_entrypoint_req
 
struct  m0_ha_entrypoint_rep
 
struct  ha_client
 
struct  ha_global
 
struct  m0_ha_epoch_monitor
 
struct  m0_ha_domain
 
struct  m0_ha_module
 
struct  ha_link_ctx
 
struct  m0_ha_ops
 
struct  m0_ha_cfg
 
struct  m0_ha
 
struct  m0_halon_interface_cfg
 
struct  m0_halon_interface_internal
 
struct  m0_halon_interface
 
struct  ha_link_wait_ctx
 
struct  ha_link_incoming_fom
 
struct  m0_ha_link_conn_cfg
 
struct  m0_ha_link_cfg
 
struct  m0_ha_link
 
struct  m0_ha_link_tags
 
struct  m0_ha_link_msg_fop
 
struct  m0_ha_link_msg_rep_fop
 
struct  m0_ha_link_params
 
struct  ha_link_service
 
struct  m0_ha_lq_cfg
 
struct  m0_ha_lq
 
struct  m0_ha_msg_data
 
struct  m0_ha_msg
 
struct  m0_ha_msg_qitem
 
struct  m0_ha_msg_queue_cfg
 
struct  m0_ha_msg_queue
 
struct  ha_ut_entrypoint_usecase_ctx
 
struct  ha_ut_usecase_ctx
 
struct  ha_ut_wait_ctx
 
struct  m0_ha_ut_rpc_ctx
 
struct  m0_ha_ut_rpc_session_ctx
 
struct  ha_ut_link_ctx
 
struct  ha_ut_link_mt_test
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define HACO_F
 
#define HACO_P(_hc)
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_OTHER
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define HLTAGS_F
 
#define HLTAGS_P(_tags)
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT
 

Typedefs

typedef void(* m0_ha_client_cb_t) (void *client, const void *data, uint64_t data2)
 

Enumerations

enum  { ECL_TIMEOUT = 5, ECL_MAX_RPCS_IN_FLIGHT = 2 }
 
enum  { HEC_FOM_INIT = M0_FOM_PHASE_INIT, HEC_FOM_FINI = M0_FOM_PHASE_FINISH }
 
enum  m0_ha_entrypoint_server_fom_state { M0_HES_INIT = M0_FOM_PHASE_INIT, M0_HES_FINI = M0_FOM_PHASE_FINISH, M0_HES_REPLY_WAIT }
 
enum  m0_ha_entrypoint_client_state {
  M0_HEC_INIT, M0_HEC_STOPPED, M0_HEC_UNAVAILABLE, M0_HEC_CONNECT,
  M0_HEC_CONNECT_WAIT, M0_HEC_FILL, M0_HEC_SEND, M0_HEC_SEND_WAIT,
  M0_HEC_DISCONNECT, M0_HEC_DISCONNECT_WAIT, M0_HEC_AVAILABLE, M0_HEC_FINI
}
 
enum  m0_ha_entrypoint_control { M0_HA_ENTRYPOINT_CONSUME, M0_HA_ENTRYPOINT_QUIT, M0_HA_ENTRYPOINT_QUERY }
 
enum  m0_ha_epoch_outcome {
  M0_HEO_CONTINUE, M0_HEO_OK, M0_HEO_OBEY, M0_HEO_DROP,
  M0_HEO_ERROR
}
 
enum  {
  HA_MAX_RPCS_IN_FLIGHT = 2, HA_DISCONNECT_TIMEOUT = 5, HA_RESEND_INTERVAL = 1, HA_RECONNECT_INTERVAL = 1,
  HA_NR_SENT_MAX = 10
}
 
enum  ha_link_ctx_type { HLX_INCOMING, HLX_OUTGOING }
 
enum  m0_ha_mod_level {
  M0_HA_MOD_LEVEL_ASSIGNS, M0_HA_MOD_LEVEL_LINK_SERVICE, M0_HA_MOD_LEVEL_LINK, M0_HA_MOD_LEVEL_ENTRYPOINT,
  M0_HA_MOD_LEVEL_STARTED
}
 
enum  m0_ha_level {
  M0_HA_LEVEL_ASSIGNS, M0_HA_LEVEL_ADDR_STRDUP, M0_HA_LEVEL_LINK_SERVICE, M0_HA_LEVEL_ENTRYPOINT_SERVER_INIT,
  M0_HA_LEVEL_ENTRYPOINT_CLIENT_INIT, M0_HA_LEVEL_INIT, M0_HA_LEVEL_ENTRYPOINT_SERVER_START, M0_HA_LEVEL_INCOMING_LINKS,
  M0_HA_LEVEL_START, M0_HA_LEVEL_LINK_CTX_ALLOC, M0_HA_LEVEL_LINK_CTX_INIT, M0_HA_LEVEL_ENTRYPOINT_CLIENT_START,
  M0_HA_LEVEL_ENTRYPOINT_CLIENT_WAIT, M0_HA_LEVEL_LINK_ASSIGN, M0_HA_LEVEL_CONNECT
}
 
enum  { HALON_INTERFACE_EP_BUF = 0x40, HALON_INTERFACE_NVEC_SIZE_MAX = 0x1000 }
 
enum  m0_halon_interface_level {
  M0_HALON_INTERFACE_LEVEL_ASSIGNS, M0_HALON_INTERFACE_LEVEL_NET_DOMAIN, M0_HALON_INTERFACE_LEVEL_NET_BUFFER_POOL, M0_HALON_INTERFACE_LEVEL_REQH_INIT,
  M0_HALON_INTERFACE_LEVEL_REQH_START, M0_HALON_INTERFACE_LEVEL_RPC_MACHINE, M0_HALON_INTERFACE_LEVEL_HA_INIT, M0_HALON_INTERFACE_LEVEL_DISPATCHER,
  M0_HALON_INTERFACE_LEVEL_HA_START, M0_HALON_INTERFACE_LEVEL_HA_CONNECT, M0_HALON_INTERFACE_LEVEL_INSTANCE_SET, M0_HALON_INTERFACE_LEVEL_EVENTS_STARTING,
  M0_HALON_INTERFACE_LEVEL_RM_SETUP, M0_HALON_INTERFACE_LEVEL_SPIEL_INIT, M0_HALON_INTERFACE_LEVEL_SNS_CM_TRIGGER_FOPS, M0_HALON_INTERFACE_LEVEL_EVENTS_STARTED,
  M0_HALON_INTERFACE_LEVEL_STARTED
}
 
enum  m0_halon_interface_state { M0_HALON_INTERFACE_STATE_UNINITIALISED, M0_HALON_INTERFACE_STATE_INITIALISED, M0_HALON_INTERFACE_STATE_WORKING, M0_HALON_INTERFACE_STATE_FINALISED }
 
enum  { HA_LINK_SUPPRESS_START_NR = 3 }
 
enum  ha_link_send_type { HA_LINK_SEND_QUERY, HA_LINK_SEND_POST, HA_LINK_SEND_REPLY }
 
enum  ha_link_outgoing_fom_state {
  HA_LINK_OUTGOING_STATE_INIT = M0_FOM_PHASE_INIT, HA_LINK_OUTGOING_STATE_FINISH = M0_FOM_PHASE_FINISH, HA_LINK_OUTGOING_STATE_INCOMING_REGISTER, HA_LINK_OUTGOING_STATE_INCOMING_DEREGISTER,
  HA_LINK_OUTGOING_STATE_INCOMING_QUIESCE, HA_LINK_OUTGOING_STATE_INCOMING_QUIESCE_WAIT, HA_LINK_OUTGOING_STATE_RPC_LINK_INIT, HA_LINK_OUTGOING_STATE_RPC_LINK_FINI,
  HA_LINK_OUTGOING_STATE_NOT_CONNECTED, HA_LINK_OUTGOING_STATE_CONNECT, HA_LINK_OUTGOING_STATE_CONNECTING, HA_LINK_OUTGOING_STATE_DISCONNECT,
  HA_LINK_OUTGOING_STATE_DISCONNECTING, HA_LINK_OUTGOING_STATE_IDLE, HA_LINK_OUTGOING_STATE_SEND, HA_LINK_OUTGOING_STATE_WAIT_REPLY,
  HA_LINK_OUTGOING_STATE_WAIT_RELEASE, HA_LINK_OUTGOING_STATE_NR
}
 
enum  m0_ha_link_state {
  M0_HA_LINK_STATE_INIT, M0_HA_LINK_STATE_FINI, M0_HA_LINK_STATE_START, M0_HA_LINK_STATE_STOP,
  M0_HA_LINK_STATE_IDLE, M0_HA_LINK_STATE_RECV, M0_HA_LINK_STATE_DELIVERY, M0_HA_LINK_STATE_RPC_FAILED,
  M0_HA_LINK_STATE_LINK_FAILED, M0_HA_LINK_STATE_LINK_REUSED, M0_HA_LINK_STATE_DISCONNECTING, M0_HA_LINK_STATE_NR
}
 
enum  { M0_HA_MSG_FAILURE_VEC_LIMIT = 1024 }
 
enum  { M0_HA_MSG_TAG_UNKNOWN = 0, M0_HA_MSG_TAG_INVALID = UINT64_MAX }
 
enum  m0_ha_msg_type {
  M0_HA_MSG_INVALID, M0_HA_MSG_STOB_IOQ, M0_HA_MSG_NVEC, M0_HA_MSG_FAILURE_VEC_REQ,
  M0_HA_MSG_FAILURE_VEC_REP, M0_HA_MSG_KEEPALIVE_REQ, M0_HA_MSG_KEEPALIVE_REP, M0_HA_MSG_EVENT_PROCESS,
  M0_HA_MSG_EVENT_SERVICE, M0_HA_MSG_EVENT_RPC, M0_HA_MSG_BE_IO_ERR, M0_HA_MSG_SNS_ERR
}
 
enum  m0_ha_msg_qitem_delivery_state { M0_HA_MSG_QITEM_NOT_DELIVERED, M0_HA_MSG_QITEM_DELIVERED }
 
enum  { HA_UT_ENTRYPOINT_USECASE_CONFD_NR = 0x101 }
 
enum  { M0_HA_UT_MAX_RPCS_IN_FLIGHT = 2 }
 
enum  { HA_UT_THREAD_PAIR_NR = 0x10, HA_UT_MSG_PER_THREAD = 0x20 }
 
enum  { HA_UT_LINK_RECONNECT_MULTIPLE_NR_LINKS = 0x2 }
 
enum  { HA_UT_MSG_QUEUE_NR = 0x1000 }
 

Functions

M0_INTERNAL void m0_ha_cookie_init (struct m0_ha_cookie *hc)
 
M0_INTERNAL void m0_ha_cookie_fini (struct m0_ha_cookie *hc)
 
M0_INTERNAL void m0_ha_cookie_record (struct m0_ha_cookie *hc)
 
M0_INTERNAL bool m0_ha_cookie_is_eq (const struct m0_ha_cookie *a, const struct m0_ha_cookie *b)
 
M0_INTERNAL void m0_ha_cookie_from_xc (struct m0_ha_cookie *hc, const struct m0_ha_cookie_xc *hc_xc)
 
M0_INTERNAL void m0_ha_cookie_to_xc (const struct m0_ha_cookie *hc, struct m0_ha_cookie_xc *hc_xc)
 
struct m0_ha_cookie_xc M0_XCA_DOMAIN (rpc)
 
int main (int argc, char *argv[])
 
static struct ha_entrypoint_serviceha_entrypoint_service_container (struct m0_reqh_service *service)
 
static void ha_entrypoint_service_init (struct m0_reqh_service *service)
 
static void ha_entrypoint_service_fini (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_start (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_fop_accept (struct m0_reqh_service *service, struct m0_fop *fop)
 
static void ha_entrypoint_service_stop (struct m0_reqh_service *service)
 
static int ha_entrypoint_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
M0_INTERNAL int m0_ha_entrypoint_service_init (struct m0_reqh_service **service, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_ha_entrypoint_service_fini (struct m0_reqh_service *he_service)
 
 M0_TL_DESCR_DEFINE (hes_req, "m0_ha_entrypoint_server::hes_requests", static, struct ha_entrypoint_server_fom, esf_tlink, esf_magic, 10, 11)
 
 M0_TL_DEFINE (hes_req, static, struct ha_entrypoint_server_fom)
 
M0_INTERNAL int m0_ha_entrypoint_server_init (struct m0_ha_entrypoint_server *hes, struct m0_ha_entrypoint_server_cfg *hes_cfg)
 
M0_INTERNAL void m0_ha_entrypoint_server_fini (struct m0_ha_entrypoint_server *hes)
 
M0_INTERNAL void m0_ha_entrypoint_server_start (struct m0_ha_entrypoint_server *hes)
 
M0_INTERNAL void m0_ha_entrypoint_server_stop (struct m0_ha_entrypoint_server *hes)
 
static struct ha_entrypoint_server_fomha_entrypoint_server_find (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id)
 
static void ha_entrypoint_server_register (struct m0_ha_entrypoint_server *hes, struct ha_entrypoint_server_fom *server_fom)
 
static void ha_entrypoint_server_deregister (struct m0_ha_entrypoint_server *hes, struct ha_entrypoint_server_fom *server_fom)
 
M0_INTERNAL void m0_ha_entrypoint_server_reply (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id, const struct m0_ha_entrypoint_rep *rep)
 
M0_INTERNAL const struct m0_ha_entrypoint_reqm0_ha_entrypoint_server_request_find (struct m0_ha_entrypoint_server *hes, const struct m0_uint128 *req_id)
 
static bool ha_entrypoint_client_rlink_cb (struct m0_clink *clink)
 
M0_INTERNAL int m0_ha_entrypoint_client_init (struct m0_ha_entrypoint_client *ecl, const char *ep, struct m0_ha_entrypoint_client_cfg *ecl_cfg)
 
M0_INTERNAL void m0_ha_entrypoint_client_fini (struct m0_ha_entrypoint_client *ecl)
 
static void ha_entrypoint_client_replied (struct m0_rpc_item *item)
 
static void ha_entrypoint_client_fop_release (struct m0_ref *ref)
 
static int ha_entrypoint_client_fom_tick (struct m0_fom *fom)
 
static void ha_entrypoint_client_fom_fini (struct m0_fom *fom)
 
static size_t ha_entrypoint_client_fom_locality (const struct m0_fom *fom)
 
M0_INTERNAL void m0_ha_entrypoint_client_request (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL void m0_ha_entrypoint_client_start (struct m0_ha_entrypoint_client *ecl)
 
static bool ha_entrypoint_client_start_check (struct m0_clink *clink)
 
static bool ha_entrypoint_client_stop_check (struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_entrypoint_client_start_sync (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL void m0_ha_entrypoint_client_stop (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL struct m0_chanm0_ha_entrypoint_client_chan (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL enum m0_ha_entrypoint_client_state m0_ha_entrypoint_client_state_get (struct m0_ha_entrypoint_client *ecl)
 
M0_INTERNAL int m0_ha_entrypoint_mod_init (void)
 
M0_INTERNAL void m0_ha_entrypoint_mod_fini (void)
 
static size_t ha_entrypoint_home_locality (const struct m0_fom *fom)
 
static void ha_entrypoint_fom_fini (struct m0_fom *fom)
 
static int ha_entrypoint_get_fom_tick (struct m0_fom *fom)
 
static int ha_entrypoint_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_ha_entrypoint_fops_init (void)
 
M0_INTERNAL void m0_ha_entrypoint_fops_fini (void)
 
M0_INTERNAL int m0_ha_entrypoint_req2fop (const struct m0_ha_entrypoint_req *req, struct m0_ha_entrypoint_req_fop *req_fop)
 
M0_INTERNAL int m0_ha_entrypoint_fop2req (const struct m0_ha_entrypoint_req_fop *req_fop, const char *rpc_endpoint, struct m0_ha_entrypoint_req *req)
 
M0_INTERNAL int m0_ha_entrypoint_fop2rep (const struct m0_ha_entrypoint_rep_fop *rep_fop, struct m0_ha_entrypoint_rep *rep)
 
M0_INTERNAL int m0_ha_entrypoint_rep2fop (const struct m0_ha_entrypoint_rep *rep, struct m0_ha_entrypoint_rep_fop *rep_fop)
 
M0_INTERNAL void m0_ha_entrypoint_rep_free (struct m0_ha_entrypoint_rep *rep)
 
M0_INTERNAL void m0_ha_entrypoint_req_free (struct m0_ha_entrypoint_req *req)
 
M0_INTERNAL int m0_ha_entrypoint_rep_copy (struct m0_ha_entrypoint_rep *to, struct m0_ha_entrypoint_rep *from)
 
 M0_TL_DESCR_DEFINE (hg_client, "ha global clients list", static, struct ha_client, hc_link, hc_magic, M0_HA_CLIENT_MAGIC, M0_HA_CLIENT_HEAD_MAGIC)
 
 M0_TL_DEFINE (hg_client, static, struct ha_client)
 
 M0_TL_DESCR_DEFINE (ham, "ha epoch monitor", static, struct m0_ha_epoch_monitor, hem_linkage, hem_magix, M0_HA_EPOCH_MONITOR_MAGIC, M0_HA_DOMAIN_MAGIC)
 
 M0_TL_DEFINE (ham, static, struct m0_ha_epoch_monitor)
 
static int default_mon_future (struct m0_ha_epoch_monitor *self, uint64_t epoch, const struct m0_rpc_item *item)
 
M0_INTERNAL void m0_ha_domain_init (struct m0_ha_domain *dom, uint64_t epoch)
 
M0_INTERNAL void m0_ha_domain_fini (struct m0_ha_domain *dom)
 
M0_INTERNAL void m0_ha_domain_monitor_add (struct m0_ha_domain *dom, struct m0_ha_epoch_monitor *mon)
 
M0_INTERNAL void m0_ha_domain_monitor_del (struct m0_ha_domain *dom, struct m0_ha_epoch_monitor *mon)
 
M0_INTERNAL uint64_t m0_ha_domain_get_read (struct m0_ha_domain *dom)
 
M0_INTERNAL void m0_ha_domain_put_read (struct m0_ha_domain *dom)
 
M0_INTERNAL uint64_t m0_ha_domain_get_write (struct m0_ha_domain *dom)
 
M0_INTERNAL void m0_ha_domain_put_write (struct m0_ha_domain *dom, uint64_t epoch)
 
M0_INTERNAL int m0_ha_global_init (void)
 
M0_INTERNAL void m0_ha_global_fini (void)
 
static void ha_global_lock (struct ha_global *hg)
 
static void ha_global_unlock (struct ha_global *hg)
 
static void ha_client_release (struct m0_ref *ref)
 
M0_INTERNAL int m0_ha_client_add (struct m0_confc *confc)
 
M0_INTERNAL int m0_ha_client_del (struct m0_confc *confc)
 
M0_INTERNAL void m0_ha_clients_iterate (m0_ha_client_cb_t iter, const void *data, uint64_t data2)
 
M0_INTERNAL int m0_ha_epoch_check (const struct m0_rpc_item *item)
 
 M0_TL_DESCR_DEFINE (ha_links, "m0_ha::h_links_{incoming,outgoing}", static, struct ha_link_ctx, hlx_tlink, hlx_magic, 7, 8)
 
 M0_TL_DEFINE (ha_links, static, struct ha_link_ctx)
 
static bool ha_link_event_cb (struct m0_clink *clink)
 
static struct ha_link_ctxha_link_incoming_find (struct m0_ha *ha, const struct m0_ha_link_params *lp)
 
static bool ha_link_stop_cb (struct m0_clink *clink)
 
static int ha_link_ctx_init (struct m0_ha *ha, struct ha_link_ctx *hlx, struct m0_ha_link_cfg *hl_cfg, const struct m0_ha_link_conn_cfg *hl_conn_cfg, const struct m0_fid *process_fid, enum ha_link_ctx_type hlx_type)
 
static void ha_link_ctx_fini (struct m0_ha *ha, struct ha_link_ctx *hlx)
 
static uint64_t ha_generation_next (struct m0_ha *ha)
 
static void ha_request_received_cb (struct m0_ha_entrypoint_server *hes, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void ha_link_conn_cfg_make (struct m0_ha_link_conn_cfg *hl_conn_cfg, const char *rpc_endpoint)
 
static bool ha_entrypoint_state_cb (struct m0_clink *clink)
 
static int ha_level_enter (struct m0_module *module)
 
static void ha_level_leave (struct m0_module *module)
 
M0_INTERNAL int m0_ha_init (struct m0_ha *ha, struct m0_ha_cfg *ha_cfg)
 
M0_INTERNAL int m0_ha_start (struct m0_ha *ha)
 
M0_INTERNAL void m0_ha_stop (struct m0_ha *ha)
 
M0_INTERNAL void m0_ha_fini (struct m0_ha *ha)
 
M0_INTERNAL struct m0_ha_linkm0_ha_connect (struct m0_ha *ha)
 
M0_INTERNAL void m0_ha_disconnect (struct m0_ha *ha)
 
M0_INTERNAL void m0_ha_disconnect_incoming (struct m0_ha *ha, struct m0_ha_link *hl)
 
static void ha_link_id_next (struct m0_ha *ha, struct m0_uint128 *id)
 
static int ha_link_incoming_create (struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, struct m0_ha_link_conn_cfg *hl_conn_cfg, struct ha_link_ctx **hlx_ptr)
 
static void ha_link_handle (struct m0_ha *ha, const struct m0_uint128 *req_id, const struct m0_ha_entrypoint_req *req, struct m0_ha_entrypoint_rep *rep, struct m0_ha_link **hl_ptr)
 
void m0_ha_entrypoint_reply (struct m0_ha *ha, const struct m0_uint128 *req_id, const struct m0_ha_entrypoint_rep *rep, struct m0_ha_link **hl_ptr)
 
M0_INTERNAL void m0_ha_send (struct m0_ha *ha, struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t *tag)
 
M0_INTERNAL void m0_ha_delivered (struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg)
 
static int ha_mod_level_enter (struct m0_module *module)
 
static void ha_mod_level_leave (struct m0_module *module)
 
M0_INTERNAL void m0_ha_flush (struct m0_ha *ha, struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_process_failed (struct m0_ha *ha, const struct m0_fid *process_fid)
 
M0_INTERNAL struct m0_ha_linkm0_ha_outgoing_link (struct m0_ha *ha)
 
M0_INTERNAL struct m0_rpc_sessionm0_ha_outgoing_session (struct m0_ha *ha)
 
M0_INTERNAL void m0_ha_rpc_endpoint (struct m0_ha *ha, struct m0_ha_link *hl, char *buf, m0_bcount_t buf_len)
 
M0_INTERNAL int m0_ha_mod_init (void)
 
M0_INTERNAL void m0_ha_mod_fini (void)
 
 M0_BOB_DEFINE (static, &halon_interface_bob_type, m0_halon_interface_internal)
 
static bool halon_interface_is_compatible (struct m0_halon_interface *hi, const char *build_git_rev_id, const char *build_configure_opts, bool disable_compat_check)
 
static void halon_interface_parse_debug_options (struct m0_halon_interface *hi, const char *debug_options)
 
static struct m0_halon_interface_internalhalon_interface_ha2hii (struct m0_ha *ha)
 
static void halon_interface_process_failure_check (struct m0_halon_interface_internal *hii, struct m0_ha_msg *msg)
 
static void halon_interface_entrypoint_request_cb (struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void halon_interface_entrypoint_replied_cb (struct m0_ha *ha, struct m0_ha_entrypoint_rep *rep)
 
static void halon_interface_msg_received_cb (struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
 
static void halon_interface_msg_is_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void halon_interface_msg_is_not_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void halon_interface_link_connected_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void halon_interface_link_reused_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void halon_interface_link_absent_cb (struct m0_ha *ha, const struct m0_uint128 *req_id)
 
static void halon_interface_link_is_disconnecting_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
static void halon_interface_link_disconnected_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
int m0_halon_interface_init (struct m0_halon_interface **hi_out, const char *build_git_rev_id, const char *build_configure_opts, const char *debug_options, const char *node_uuid)
 
void m0_halon_interface_fini (struct m0_halon_interface *hi)
 
static void halon_interface_process_event (struct m0_halon_interface_internal *hii, enum m0_conf_ha_process_event event)
 
static void halon_interface_service_event (struct m0_halon_interface_internal *hii, enum m0_conf_ha_service_event event)
 
static int halon_interface_level_enter (struct m0_module *module)
 
static void halon_interface_level_leave (struct m0_module *module)
 
int m0_halon_interface_start (struct m0_halon_interface *hi, const char *local_rpc_endpoint, const struct m0_fid *process_fid, const struct m0_fid *ha_service_fid, const struct m0_fid *rm_service_fid, void(*entrypoint_request_cb)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, const char *remote_rpc_endpoint, const struct m0_fid *process_fid, const char *git_rev_id, uint64_t pid, bool first_request), void(*msg_received_cb)(struct m0_halon_interface *hi, struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t tag), void(*msg_is_delivered_cb)(struct m0_halon_interface *hi, struct m0_ha_link *hl, uint64_t tag), void(*msg_is_not_delivered_cb)(struct m0_halon_interface *hi, struct m0_ha_link *hl, uint64_t tag), void(*link_connected_cb)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, struct m0_ha_link *link), void(*link_reused_cb)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, struct m0_ha_link *link), void(*link_absent_cb)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id), void(*link_is_disconnecting_cb)(struct m0_halon_interface *hi, struct m0_ha_link *link), void(*link_disconnected_cb)(struct m0_halon_interface *hi, struct m0_ha_link *link))
 
void m0_halon_interface_stop (struct m0_halon_interface *hi)
 
void m0_halon_interface_entrypoint_reply (struct m0_halon_interface *hi, const struct m0_uint128 *req_id, int rc, uint32_t confd_nr, const struct m0_fid *confd_fid_data, const char **confd_eps_data, uint32_t confd_quorum, const struct m0_fid *rm_fid, const char *rm_eps)
 
void m0_halon_interface_send (struct m0_halon_interface *hi, struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t *tag)
 
void m0_halon_interface_delivered (struct m0_halon_interface *hi, struct m0_ha_link *hl, const struct m0_ha_msg *msg)
 
void m0_halon_interface_disconnect (struct m0_halon_interface *hi, struct m0_ha_link *hl)
 
static bool halon_interface_is_working (struct m0_halon_interface_internal *hii)
 
struct m0_rpc_machinem0_halon_interface_rpc_machine (struct m0_halon_interface *hi)
 
struct m0_reqhm0_halon_interface_reqh (struct m0_halon_interface *hi)
 
struct m0_spielm0_halon_interface_spiel (struct m0_halon_interface *hi)
 
M0_INTERNAL int m0_halon_interface_thread_adopt (struct m0_halon_interface *hi, struct m0_thread *thread)
 
M0_INTERNAL void m0_halon_interface_thread_shun (void)
 
 M0_BASSERT (ARRAY_SIZE(ha_link_sm_states)==M0_HA_LINK_STATE_NR)
 
static void ha_link_outgoing_fom_wakeup (struct m0_ha_link *hl)
 
static bool ha_link_rpc_wait_cb (struct m0_clink *clink)
 
static bool ha_link_quiesce_wait_cb (struct m0_clink *clink)
 
M0_INTERNAL int m0_ha_link_init (struct m0_ha_link *hl, struct m0_ha_link_cfg *hl_cfg)
 
M0_INTERNAL void m0_ha_link_fini (struct m0_ha_link *hl)
 
static int ha_link_conn_cfg_copy (struct m0_ha_link_conn_cfg *dst, const struct m0_ha_link_conn_cfg *src)
 
static void ha_link_conn_cfg_free (struct m0_ha_link_conn_cfg *hl_conn_cfg)
 
static void ha_link_tags_apply (struct m0_ha_link *hl, const struct m0_ha_link_params *lp)
 
M0_INTERNAL void m0_ha_link_start (struct m0_ha_link *hl, struct m0_ha_link_conn_cfg *hl_conn_cfg)
 
M0_INTERNAL void m0_ha_link_stop (struct m0_ha_link *hl, struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_link_reconnect_begin (struct m0_ha_link *hl, struct m0_ha_link_params *lp)
 
M0_INTERNAL void m0_ha_link_reconnect_end (struct m0_ha_link *hl, const struct m0_ha_link_conn_cfg *hl_conn_cfg)
 
M0_INTERNAL void m0_ha_link_reconnect_cancel (struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_reconnect_params (const struct m0_ha_link_params *lp_alive, struct m0_ha_link_params *lp_alive_new, struct m0_ha_link_params *lp_dead_new, const struct m0_uint128 *id_alive, const struct m0_uint128 *id_dead, const struct m0_uint128 *id_connection)
 
M0_INTERNAL struct m0_chanm0_ha_link_chan (struct m0_ha_link *hl)
 
M0_INTERNAL enum m0_ha_link_state m0_ha_link_state_get (struct m0_ha_link *hl)
 
M0_INTERNAL const char * m0_ha_link_state_name (enum m0_ha_link_state state)
 
M0_INTERNAL void m0_ha_link_send (struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t *tag)
 
M0_INTERNAL struct m0_ha_msgm0_ha_link_recv (struct m0_ha_link *hl, uint64_t *tag)
 
M0_INTERNAL void m0_ha_link_delivered (struct m0_ha_link *hl, struct m0_ha_msg *msg)
 
M0_INTERNAL bool m0_ha_link_msg_is_delivered (struct m0_ha_link *hl, uint64_t tag)
 
M0_INTERNAL uint64_t m0_ha_link_delivered_consume (struct m0_ha_link *hl)
 
M0_INTERNAL uint64_t m0_ha_link_not_delivered_consume (struct m0_ha_link *hl)
 
static void ha_link_wait (struct ha_link_wait_ctx *wait_ctx, bool(*check)(struct m0_clink *clink))
 
static bool ha_link_wait_delivery_check (struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_link_wait_delivery (struct m0_ha_link *hl, uint64_t tag)
 
static bool ha_link_wait_arrival_check (struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_link_wait_arrival (struct m0_ha_link *hl)
 
static bool ha_link_wait_confirmation_check (struct m0_clink *clink)
 
M0_INTERNAL void m0_ha_link_wait_confirmation (struct m0_ha_link *hl, uint64_t tag)
 
M0_INTERNAL void m0_ha_link_flush (struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_cb_disconnecting (struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_cb_reused (struct m0_ha_link *hl)
 
static void ha_link_tags_update (struct m0_ha_link *hl, uint64_t out_next, uint64_t in_delivered)
 
static void ha_link_tags_in_out (struct m0_ha_link *hl, uint64_t *out_next, uint64_t *in_delivered)
 
static void ha_link_msg_received (struct m0_ha_link *hl, const struct m0_ha_msg *msg)
 
static void ha_link_msg_recv_or_delivery_broadcast (struct m0_ha_link *hl)
 
static struct ha_link_incoming_fomha_link_incoming_fom_container (struct m0_fom *fom)
 
static int ha_link_incoming_fom_tick (struct m0_fom *fom)
 
static void ha_link_incoming_fom_fini (struct m0_fom *fom)
 
static size_t ha_link_incoming_fom_locality (const struct m0_fom *fom)
 
static int ha_link_incoming_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
static void ha_link_outgoing_item_sent (struct m0_rpc_item *item)
 
static void ha_link_outgoing_item_replied (struct m0_rpc_item *item)
 
static void ha_link_outgoing_fop_release (struct m0_ref *ref)
 
static int ha_link_outgoing_fop_send (struct m0_ha_link *hl)
 
static bool ha_link_backoff_check (struct m0_ha_link *hl, int rc, uint64_t *nr, int *old_rc, uint64_t *old_nr)
 
static int ha_link_outgoing_fop_replied (struct m0_ha_link *hl)
 
static bool ha_link_q_in_confirm_all (struct m0_ha_link *hl)
 
static void ha_link_cb_disconnecting_reused (struct m0_ha_link *hl)
 
static void ha_link_outgoing_reconnect_timeout (struct m0_sm_timer *timer)
 
static int ha_link_outgoing_fom_tick (struct m0_fom *fom)
 
static void ha_link_outgoing_fom_wakeup_ast (struct m0_sm_group *gr, struct m0_sm_ast *ast)
 
static void ha_link_outgoing_fom_fini (struct m0_fom *fom)
 
static size_t ha_link_outgoing_fom_locality (const struct m0_fom *fom)
 
static int ha_link_outgoing_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
M0_INTERNAL struct m0_rpc_sessionm0_ha_link_rpc_session (struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_rpc_endpoint (struct m0_ha_link *hl, char *buf, m0_bcount_t buf_len)
 
M0_INTERNAL int m0_ha_link_mod_init (void)
 
M0_INTERNAL void m0_ha_link_mod_fini (void)
 
M0_INTERNAL void m0_ha_link_quiesce (struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_tags_initial (struct m0_ha_link_tags *tags, bool tag_even)
 
M0_INTERNAL bool m0_ha_link_tags_eq (const struct m0_ha_link_tags *tags1, const struct m0_ha_link_tags *tags2)
 
M0_INTERNAL void m0_ha_link_params_invert (struct m0_ha_link_params *dst, const struct m0_ha_link_params *src)
 
M0_INTERNAL int m0_ha_link_fops_init (void)
 
M0_INTERNAL void m0_ha_link_fops_fini (void)
 
 M0_TL_DESCR_DEFINE (ha_link_svc, "ha_link_service::hls_links", static, struct m0_ha_link, hln_service_link, hln_service_magic, M0_HA_LINK_SERVICE_LINK_MAGIC, M0_HA_LINK_SERVICE_HEAD_MAGIC)
 
 M0_TL_DEFINE (ha_link_svc, static, struct m0_ha_link)
 
 M0_BOB_DEFINE (static inline, &ha_link_service_bob_type, ha_link_service)
 
static struct ha_link_serviceha_link_service_container (struct m0_reqh_service *service)
 
static void ha_link_service_init (struct m0_reqh_service *service)
 
static void ha_link_service_fini (struct m0_reqh_service *service)
 
static int ha_link_service_start (struct m0_reqh_service *service)
 
static int ha_link_service_fop_accept (struct m0_reqh_service *service, struct m0_fop *fop)
 
static void ha_link_service_stop (struct m0_reqh_service *service)
 
static struct m0_ha_linkha_link_service_find (struct ha_link_service *hl_service, const struct m0_uint128 *link_id, struct m0_uint128 *connection_id)
 
static void ha_link_service_get (struct ha_link_service *hl_service, struct m0_ha_link *hl)
 
M0_INTERNAL struct m0_ha_linkm0_ha_link_service_find_get (struct m0_reqh_service *service, const struct m0_uint128 *link_id, struct m0_uint128 *connection_id)
 
M0_INTERNAL void m0_ha_link_service_put (struct m0_reqh_service *service, struct m0_ha_link *hl)
 
M0_INTERNAL void m0_ha_link_service_quiesce (struct m0_reqh_service *service, struct m0_ha_link *hl, struct m0_chan *chan)
 
M0_INTERNAL void m0_ha_link_service_register (struct m0_reqh_service *service, struct m0_ha_link *hl, const struct m0_uint128 *link_id, const struct m0_uint128 *connection_id)
 
M0_INTERNAL void m0_ha_link_service_deregister (struct m0_reqh_service *service, struct m0_ha_link *hl)
 
static int ha_link_service_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
M0_INTERNAL int m0_ha_link_service_init (struct m0_reqh_service **hl_service, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_ha_link_service_fini (struct m0_reqh_service *hl_service)
 
M0_INTERNAL int m0_ha_link_service_mod_init (void)
 
M0_INTERNAL void m0_ha_link_service_mod_fini (void)
 
static bool ha_lq_tags_invariant (const struct m0_ha_link_tags *tags)
 
M0_INTERNAL bool m0_ha_lq_invariant (const struct m0_ha_lq *lq)
 
M0_INTERNAL void m0_ha_lq_init (struct m0_ha_lq *lq, const struct m0_ha_lq_cfg *lq_cfg)
 
M0_INTERNAL void m0_ha_lq_fini (struct m0_ha_lq *lq)
 
M0_INTERNAL void m0_ha_lq_tags_get (const struct m0_ha_lq *lq, struct m0_ha_link_tags *tags)
 
M0_INTERNAL void m0_ha_lq_tags_set (struct m0_ha_lq *lq, const struct m0_ha_link_tags *tags)
 
M0_INTERNAL bool m0_ha_lq_has_tag (const struct m0_ha_lq *lq, uint64_t tag)
 
M0_INTERNAL struct m0_ha_msgm0_ha_lq_msg (struct m0_ha_lq *lq, uint64_t tag)
 
M0_INTERNAL struct m0_ha_msgm0_ha_lq_msg_next (struct m0_ha_lq *lq, const struct m0_ha_msg *cur)
 
M0_INTERNAL struct m0_ha_msgm0_ha_lq_msg_prev (struct m0_ha_lq *lq, const struct m0_ha_msg *cur)
 
M0_INTERNAL bool m0_ha_lq_has_next (const struct m0_ha_lq *lq)
 
M0_INTERNAL bool m0_ha_lq_is_delivered (const struct m0_ha_lq *lq, uint64_t tag)
 
M0_INTERNAL uint64_t m0_ha_lq_tag_assign (const struct m0_ha_lq *lq)
 
M0_INTERNAL uint64_t m0_ha_lq_tag_next (const struct m0_ha_lq *lq)
 
M0_INTERNAL uint64_t m0_ha_lq_tag_delivered (const struct m0_ha_lq *lq)
 
M0_INTERNAL uint64_t m0_ha_lq_tag_confirmed (const struct m0_ha_lq *lq)
 
M0_INTERNAL uint64_t m0_ha_lq_enqueue (struct m0_ha_lq *lq, const struct m0_ha_msg *msg)
 
M0_INTERNAL struct m0_ha_msgm0_ha_lq_next (struct m0_ha_lq *lq)
 
M0_INTERNAL bool m0_ha_lq_try_unnext (struct m0_ha_lq *lq)
 
M0_INTERNAL void m0_ha_lq_mark_delivered (struct m0_ha_lq *lq, uint64_t tag)
 
M0_INTERNAL uint64_t m0_ha_lq_dequeue (struct m0_ha_lq *lq)
 
M0_INTERNAL uint64_t m0_ha_msg_tag (const struct m0_ha_msg *msg)
 
M0_INTERNAL enum m0_ha_msg_type m0_ha_msg_type_get (const struct m0_ha_msg *msg)
 
M0_INTERNAL bool m0_ha_msg_eq (const struct m0_ha_msg *msg1, const struct m0_ha_msg *msg2)
 
M0_INTERNAL void m0_ha_msg_debug_print (const struct m0_ha_msg *msg, const char *prefix)
 
 M0_TL_DESCR_DEFINE (ha_mq, "m0_ha_msg_queue::mq_queue", static, struct m0_ha_msg_qitem, hmq_link, hmq_magic, M0_HA_MSG_QITEM_MAGIC, M0_HA_MSG_QUEUE_HEAD_MAGIC)
 
 M0_TL_DEFINE (ha_mq, static, struct m0_ha_msg_qitem)
 
M0_INTERNAL void m0_ha_msg_queue_init (struct m0_ha_msg_queue *mq, struct m0_ha_msg_queue_cfg *cfg)
 
M0_INTERNAL void m0_ha_msg_queue_fini (struct m0_ha_msg_queue *mq)
 
M0_INTERNAL struct m0_ha_msg_qitemm0_ha_msg_queue_alloc (struct m0_ha_msg_queue *mq)
 
M0_INTERNAL void m0_ha_msg_queue_free (struct m0_ha_msg_queue *mq, struct m0_ha_msg_qitem *qitem)
 
M0_INTERNAL void m0_ha_msg_queue_enqueue (struct m0_ha_msg_queue *mq, struct m0_ha_msg_qitem *qitem)
 
M0_INTERNAL struct m0_ha_msg_qitemm0_ha_msg_queue_dequeue (struct m0_ha_msg_queue *mq)
 
M0_INTERNAL void m0_ha_msg_queue_push_front (struct m0_ha_msg_queue *mq, struct m0_ha_msg_qitem *qitem)
 
M0_INTERNAL bool m0_ha_msg_queue_is_empty (struct m0_ha_msg_queue *mq)
 
M0_INTERNAL struct m0_ha_msg_qitemm0_ha_msg_queue_find (struct m0_ha_msg_queue *mq, uint64_t tag)
 
M0_INTERNAL struct m0_ha_msg_qitemm0_ha_msg_queue_next (struct m0_ha_msg_queue *mq, const struct m0_ha_msg_qitem *cur)
 
M0_INTERNAL struct m0_ha_msg_qitemm0_ha_msg_queue_prev (struct m0_ha_msg_queue *mq, const struct m0_ha_msg_qitem *cur)
 
void m0_ha_ut_cookie (void)
 
static void ha_ut_entrypoint_request_arrived (struct m0_ha_entrypoint_server *hes, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void ha_ut_entrypoint_reply_init (struct ha_ut_entrypoint_usecase_ctx *uctx)
 
static void ha_ut_entrypoint_reply_fini (struct ha_ut_entrypoint_usecase_ctx *uctx)
 
static void ha_ut_entrypoint_reply_check (struct ha_ut_entrypoint_usecase_ctx *uctx, struct m0_ha_entrypoint_rep *rep)
 
static void ha_ut_entrypoint_server_start (struct ha_ut_entrypoint_usecase_ctx *uctx, struct m0_ha_ut_rpc_ctx *ctx, struct m0_ha_entrypoint_server *esr)
 
static void ha_ut_entrypoint_server_stop (struct ha_ut_entrypoint_usecase_ctx *uctx, struct m0_ha_entrypoint_server *esr)
 
static void ha_ut_entrypoint_client_start (struct ha_ut_entrypoint_usecase_ctx *uctx, struct m0_ha_ut_rpc_ctx *ctx, struct m0_ha_entrypoint_client *ecl)
 
static void ha_ut_entrypoint_client_stop (struct ha_ut_entrypoint_usecase_ctx *uctx, struct m0_ha_entrypoint_client *ecl)
 
void m0_ha_ut_entrypoint_usecase (void)
 
static bool ha_ut_entrypoint_client_cb (struct m0_clink *clink)
 
void m0_ha_ut_entrypoint_client (void)
 
static struct ha_ut_usecase_ctxha_ut_ha2usecase_ctx (struct m0_ha *ha)
 
static void ha_ut_usecase_link_check (struct ha_ut_usecase_ctx *huc, struct m0_ha_link *hl)
 
static void ha_ut_usecase_entrypoint_request (struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void ha_ut_usecase_entrypoint_replied (struct m0_ha *ha, struct m0_ha_entrypoint_rep *rep)
 
static void ha_ut_usecase_msg_received (struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
 
static void ha_ut_usecase_msg_is_delivered (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void ha_ut_usecase_msg_is_not_delivered (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void ha_ut_usecase_link_connected (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void ha_ut_usecase_link_reused (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void ha_ut_usecase_link_is_disconnecting (struct m0_ha *ha, struct m0_ha_link *hl)
 
static void ha_ut_usecase_link_disconnected (struct m0_ha *ha, struct m0_ha_link *hl)
 
static bool ha_ut_ha_wait_available (struct m0_clink *clink)
 
void m0_ha_ut_ha_usecase (void)
 
M0_INTERNAL void m0_ha_ut_rpc_ctx_init (struct m0_ha_ut_rpc_ctx *ctx)
 
M0_INTERNAL void m0_ha_ut_rpc_ctx_fini (struct m0_ha_ut_rpc_ctx *ctx)
 
M0_INTERNAL void m0_ha_ut_rpc_session_ctx_init (struct m0_ha_ut_rpc_session_ctx *sctx, struct m0_ha_ut_rpc_ctx *ctx)
 
M0_INTERNAL void m0_ha_ut_rpc_session_ctx_fini (struct m0_ha_ut_rpc_session_ctx *sctx)
 
static void ha_ut_link_conn_cfg_create (struct m0_ha_link_conn_cfg *hl_conn_cfg, struct m0_uint128 *id_local, struct m0_uint128 *id_remote, struct m0_uint128 *id_connection, bool tag_even, const char *ep)
 
static void ha_ut_link_cfg_create (struct m0_ha_link_cfg *hl_cfg, struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service)
 
static void ha_ut_link_conn_cfg_free (struct m0_ha_link_conn_cfg *hl_conn_cfg)
 
static void ha_ut_link_init (struct ha_ut_link_ctx *link_ctx, struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service, struct m0_uint128 *id_local, struct m0_uint128 *id_remote, struct m0_uint128 *id_connection, bool tag_even, bool start)
 
static void ha_ut_link_fini (struct ha_ut_link_ctx *link_ctx)
 
static void ha_ut_link_set_some_msg (struct m0_ha_msg *msg)
 
void m0_ha_ut_link_usecase (void)
 
static void ha_ut_link_mt_thread (void *param)
 
 M0_UT_THREADS_DEFINE (ha_ut_link_mt, &ha_ut_link_mt_thread)
 
void m0_ha_ut_link_multithreaded (void)
 
static void ha_ut_links_init (struct m0_ha_ut_rpc_ctx **rpc_ctx, struct m0_reqh_service **hl_service, int nr_links, struct ha_ut_link_ctx ***ctx, struct m0_ha_link ***hl, struct m0_uint128 *id1, struct m0_uint128 *id2, struct m0_uint128 *id, int *tag_even, bool start)
 
static void ha_ut_links_fini (struct m0_ha_ut_rpc_ctx *rpc_ctx, struct m0_reqh_service *hl_service, int nr_links, struct ha_ut_link_ctx **ctx, struct m0_ha_link **hl)
 
static void ha_ut_link_msg_transfer (struct m0_ha_link *hl1, struct m0_ha_link *hl2)
 
void m0_ha_ut_link_reconnect_simple (void)
 
void m0_ha_ut_link_reconnect_multiple (void)
 
void m0_ha_ut_lq (void)
 
void m0_ha_ut_lq_mark_delivered (void)
 
void m0_ha_ut_msg_queue (void)
 

Variables

const struct m0_ha_cookie m0_ha_cookie_no_record
 
const struct m0_ha_cookie m0_ha_cookie_no_record
 
static const struct m0_reqh_service_ops ha_entrypoint_service_ops
 
static const struct m0_reqh_service_type_ops ha_entrypoint_stype_ops
 
struct m0_reqh_service_type m0_ha_entrypoint_service_type
 
static struct m0_sm_state_descr ha_entrypoint_server_fom_states []
 
struct m0_sm_conf m0_ha_entrypoint_server_fom_states_conf
 
static struct m0_sm_state_descr ha_entrypoint_client_states []
 
static struct m0_sm_conf ha_entrypoint_client_states_conf
 
static struct m0_sm_state_descr ha_entrypoint_client_fom_states []
 
static struct m0_sm_conf ha_entrypoint_client_fom_states_conf
 
static struct m0_rpc_item_ops ha_entrypoint_client_item_ops
 
static struct m0_fom_type ha_entrypoint_client_fom_type
 
static const struct m0_fom_type_ops ha_entrypoint_client_fom_type_ops
 
static const struct m0_fom_ops ha_entrypoint_client_fom_ops
 
const struct m0_fom_ops ha_entrypoint_get_fom_ops
 
const struct m0_fom_type_ops m0_ha_entrypoint_fom_type_ops
 
const struct m0_fom_type_ops m0_ha_entrypoint_fom_type_ops
 
struct m0_reqh_service_type m0_ha_entrypoint_service_type
 
struct m0_sm_conf m0_ha_entrypoint_server_fom_states_conf
 
struct m0_fop_type m0_ha_entrypoint_req_fopt
 
struct m0_fop_type m0_ha_entrypoint_rep_fopt
 
struct m0_ha_entrypoint_req M0_XCA_DOMAIN
 
struct m0_fop_type m0_ha_entrypoint_req_fopt
 
struct m0_fop_type m0_ha_entrypoint_rep_fopt
 
M0_INTERNAL const uint64_t M0_HA_EPOCH_NONE = 0ULL
 
M0_EXTERN const uint64_t M0_HA_EPOCH_NONE
 
static const struct m0_modlev ha_levels []
 
static const struct m0_modlev ha_mod_levels []
 
static const struct m0_bob_type halon_interface_bob_type
 
static const struct m0_ha_ops halon_interface_ha_ops
 
static struct m0_sm_state_descr halon_interface_states []
 
static struct m0_sm_conf halon_interface_sm_conf
 
static const struct m0_modlev halon_interface_levels []
 
static struct m0_sm_state_descr ha_link_sm_states []
 
static struct m0_sm_conf ha_link_sm_conf
 
static struct m0_fom_type ha_link_outgoing_fom_type
 
const struct m0_fom_ops ha_link_outgoing_fom_ops
 
const struct m0_fom_ops ha_link_incoming_fom_ops
 
const struct m0_fom_type_ops m0_ha_link_incoming_fom_type_ops
 
static struct m0_sm_state_descr ha_link_outgoing_fom_states [HA_LINK_OUTGOING_STATE_NR]
 
static const struct m0_sm_conf ha_link_outgoing_fom_conf
 
static const struct m0_rpc_item_ops ha_link_outgoing_item_ops
 
const struct m0_fom_type_ops m0_ha_link_outgoing_fom_type_ops
 
const struct m0_fom_type_ops m0_ha_link_incoming_fom_type_ops
 
const struct m0_fom_type_ops m0_ha_link_outgoing_fom_type_ops
 
struct m0_fop_type m0_ha_link_msg_fopt
 
struct m0_fop_type m0_ha_link_msg_rep_fopt
 
struct m0_fop_type m0_ha_link_msg_fopt
 
struct m0_fop_type m0_ha_link_msg_rep_fopt
 
struct ha_link_service M0_XCA_DOMAIN
 
static const struct m0_bob_type ha_link_service_bob_type
 
static const struct m0_reqh_service_ops ha_link_service_ops
 
static const struct m0_reqh_service_type_ops ha_link_stype_ops
 
struct m0_reqh_service_type m0_ha_link_service_type
 
struct m0_reqh_service_type m0_ha_link_service_type
 
enum { ... }  M0_XCA_DOMAIN
 
static const struct m0_ha_ops ha_ut_usecase_ha_ops
 
struct m0_ut_suite ha_ut
 

Detailed Description

client

constraints

HA epoch module.

High-availability (HA) sub-system defines "an HA epoch" as a maximal interval in the system history through which no failures are agreed upon.

(Note that the word "epoch" has other meanings.)

When a new failure is detected or previous failure eliminated, the process of developing a consensus about the change in failure state is initiated within the HA sub-system. This process, if successful, culminates in transition to a new epoch.

An epoch is identified by "an epoch number", which is a 64-bit integer. A later epoch has greater number.

Motr operations that depend on failures are tagged by epoch numbers. Typically, rpc items, sent as part of an operation, carry as a field the number of the epoch in which the operation was initiated. If receiver receives a message from an epoch different from the epoch known to the receiver, it has to handle it specially. Possible options include:

- ignore the epoch number difference and process the operation as usual,

- move the receiver to the item's epoch (this is only possible if the
  item's epoch is greater than the receiver epoch, because epoch numbers
  must increase monotonically),

- drop the item on the floor,

- send "wrong epoch" reply to the sender.

HA notifies the system about transition to the new epoch by broadcasting special item to all nodes. This item is always processed by moving its receivers to the item's epoch.

State transition rules

I. Processes and Services

I.a Process and Service States

  1. There are 3 process/service states: FAILED, TRANSIENT and ONLINE.
  2. The only allowed state transitions for processes/services are FAILED <-> TRANSIENT <-> ONLINE, ONLINE -> FAILED.
  3. At the start every process/service is in FAILED state.
  4. When process/service starts it's moved to TRANSIENT state and then to ONLINE state.
  5. When there are signs that process/service is not ONLINE then it's moved to TRANSIENT state.
  6. When the decision is made that process/service is dead it's moved to FAILED state.
  7. When a process is permanently removed from the cluster it's going to FAILED state before it's removed from the configuration.

I.b Events

  1. Processes and services send event messages when they are starting and stopping.
  2. Before process/service is started it sends STARTING event.
  3. After process/service is started it sends STARTED event.
  4. Before process/service initiates stop sequence it sends STOPPING event.
  5. After process/service initiates stop sequence it sends STOPPED event.
  6. Events for the same process/service are always sent in the same order: STARTING -> STARTED -> STOPPING -> STOPPED.

I.c Correlation between events and states

  1. Before process/service is started it should be in FAILED state.
  2. If process/service dies it's moved to FAILED state.
  3. After <...> event is sent the process/service is moved to <...> state: STARTING - TRANSIENT STARTED - ONLINE STOPPING - TRANSIENT STOPPED - FAILED.

I.d Use cases

  1. Process/service start STARTING STARTED FAILED -------—> TRANSIENT -----—> ONLINE
  2. Process/service stop STOPPING STOPPED ONLINE ---------—> TRANSIENT -------—> FAILED
  3. Process/service crash the decision has been made that the process crashed ONLINE -------------------------—> FAILED
  4. Temporary process/service timeout decision that process decision that process may be dead is alive ONLINE --------------------—> TRANSIENT --------------------—> ONLINE
  5. Permanent process/servise timeout decision that process decision that process may be dead is dead ONLINE --------------------—> TRANSIENT --------------------—> FAILED

I.e Handling process/service state transitions in rpc

  1. If a process/service is ONLINE the connect timeout is M0_TIME_NEVER and the number of resends is unlimited.
  2. If a process/service is in TRANSIENT state the connect timeout and the number of resends are limited.
  3. If a process/service is in FAILED state then no attempt is made to communicate with the process/service and all existing rpc sessions/connections are dropped without timeout.

Reconnect protocol

Source structure

entrypoint request handling

m0_ha_link management

m0_ha_msg handling

error handling

use cases

Design Highlights

Logical Specification

Message Handling

There are 2 kinds of messages: received and sent. Each message is received or sent in context of m0_ha_link.

When a message arrives the msg_received_cb() is executed. The user should call m0_halon_interface_delivered() for each received message. The call means that the message shouldn't be sent again if the current process restarts.

To send a message user calls m0_halon_interface_send(). For each message sent in this way either msg_is_delivered_cb() or msg_is_not_delivered_cb() is called. Exactly one of this functions is called exactly once for each message sent.

msg_is_delivered_cb() means that the message has been successfully delivered to the destination and it is not going to be resent if the destination restarts. msg_is_not_delivered_cb() is called if the message can't be delivered. It may be delivered already but there is no confirmation that it has been delivered.

Message Handling

Each message has a tag. The tag has uint64_t type and it's assigned internally when user tries to send a message (m0_halon_interface_send(), for example). Tag value is unique for all the messages sent or received over a single m0_ha_link. No other assumption about tag value should be used.

Tag is used for message identification when struct m0_ha_msg is not available.

Entrypoint Request ID

Each entrypoint request has an ID. The ID is m0_uint128 and it's assigned internally when a new entrypoint request is received.

Request ID is used to make a mapping between entrypoint request and m0_ha_link.

Lifetime and Ownership

State machines

m0_halon_interface

*
*      UNINITIALISED
*          |   ^
*   init() |   | fini()
*          v   |
*       INITIALISED
*          |    ^
*  start() |    | stop()
*          v    |
*         WORKING
*
* 

Entrypoint requrest/reply

*
*                                      UNINITIALISED
*                                            |
*                   entrypoint_request_cb()  |
*                                            v
*                                        REQUESTED
*                                            |
*     m0_halon_interface_entrypoint_reply()  |
*                                            v
*                                         REPLIED
*                                            |
*                       v--------------------v--------------------v
*                       |                    |                    |
*   link_connected_cb() |   link_reused_cb() |   link_absent_cb() |
*                       |                    |                    |
*                       >--------------------v--------------------<
*                                            |
*                                            v
*                                          DONE
*
* 

m0_ha_link

*
*                                  UNINITIALISED
*                                    ^      |
*                                    |      | link_connected_cb()
*            link_disconnected_cb()  |      |
*                                    |      |  +---+
*                                    |      v  v   |
*                           DISCONNECTED   ACTIVE  | link_reused_cb()
*                                    |      |  |   |
*                                    |      |  +---+
*    m0_halon_interface_disconnect() |      |
*                                    |      | link_is_disconnecting_cb()
*                                    |      v
*                                  DISCONNECTING
*
* 

m0_ha_msg send

*
*                     UNINITIALISED
*                          |
*                          | m0_halon_interface_send()
*                          v
*                       SENDING
*                        |  |
*  msg_is_delivered_cb() |  | msg_is_not_delivered_cb()
*                        v  v
*                        DONE
*
* 

m0_ha_msg recv

*
*   UNINITIALISED
*        |
*        | msg_received_cb()
*        v
*     HANDLING
*        |
*        | m0_halon_interface_delivered()
*        v
*       DONE
*
* 

Threading and Concurrency Model

*                     INIT --> FINI
*                       v       ^
*                     START -> STOP
*                         v    ^
*   +--------------------< IDLE <----------------------------------------<+
*   |                      VVVV>--------------------------------+         |
*   |                      |||+---------------------+           |         |
*   |           +----------+|+---------+            |           |         |
*   v           v           v          v            v           v         |
*  RECV     DELIVERY    RPC_FAILED LINK_FAILED LINK_REUSED DISCONNECTING  |
*   v           v           v          v            v           v         ^
*   >----------->----------->---------->------------>----------->---------+
*
* 
See also
m0_ha_link::hln_sm, ha_link_sm_states, ha_link_sm_conf

HA link queue maintains the queue of m0_ha_msg along with tags. The tags are "pointers" inside the tags range for the queue.

This structure is added to support basic queue operations and to support m0_ha_msg pre-allocation for OOM cases (when it's needed).

User is responsible for locking.

TODO static struct m0_sm_trans_descr ha_entrypoint_client_state_trans[] TODO transit to a failed state if rc != 0 in ha_entrypoint_client_replied() TODO handle errors TODO make magics for hes_req tlist TODO print the sm .dot representation to some file in UT for all SMs TODO fix memory leak in m0_ha_entrypoint_req2fop()

TODO handle memory allocation errors;

TODO remove m0_ha_outgoing_session() TODO handle memory allocation errors TODO handle all errors TODO add magics for ha_links TODO take hlcc_rpc_service_fid for incoming connections from HA TODO deal with locking in ha_link_incoming_find() TODO s/container_of/bob_of/g TODO deal with race: m0_ha_connect() with entrypoint client state TODO use ml_name everywhere in ha/ TODO enable process fid assert in m0_ha_process_failed() TODO check fid types

TODO log m0_halon_interface_entrypoint_reply() parameters without SIGSEGV TODO handle const/non-const m0_halon_interface_entrypoint_reply() parameters TODO fix 80 chars in line TODO replace m0_halon_interface_internal with m0_halon_interface TODO fix a race between m0_ha_flush() and m0_ha_disconnect() (rpc can send notification between these calls). TODO refactor common code in accessors TODO change M0_WARN to M0_INFO and make M0_INFO visible

TODO bob_of in ha_link_rpc_wait_cb TODO handle rpc failures in incoming fom (for reply) TODO use m0_module in m0_ha_link TODO reconsider localities for incoming/outgoing foms TODO handle rpc error in HA_LINK_OUTGOING_STATE_CONNECTING state TODO m0_ha_link_cb_disconnecting() and m0_ha_link_cb_reused() - copy-paste

*
*              INIT  FINISH
*                 v  ^
*     RPC_LINK_INIT  RPC_LINK_FINI
*                 v  ^
*             NOT_CONNECTED
*                 v  ^
*           CONNECT  DISCONNECTING
*                 v  ^
* INCOMING_REGISTER  INCOMING_DEREGISTER
*                 v  ^
*                 v  INCOMING_QUIESCE_WAIT
*                 v  ^
*                 v  INCOMING_QUIESCE
*                 v  ^
*        CONNECTING  DISCONNECT
*                 v  ^
*                 IDLE <------+
*                  v          |
*                 SEND        |
*                  v          |
*             WAIT_REPLY      |
*                  v          |
*             WAIT_RELEASE >--+
*
* 

Macro Definition Documentation

◆ HACO_F

#define HACO_F
Value:
"(pid=%" PRIu64 " time_start="TIME_F" uptime="TIME_F" " \
"uuid="U128X_F")"
#define TIME_F
Definition: time.h:44
#define PRIu64
Definition: types.h:58
#define U128X_F
Definition: types.h:42

Definition at line 47 of file cookie.c.

◆ HACO_P

#define HACO_P (   _hc)
Value:
(_hc)->hc_pid, \
TIME_P((_hc)->hc_time_start), \
TIME_P((_hc)->hc_uptime), \
U128_P(&(_hc)->hc_uuid)
#define TIME_P(t)
Definition: time.h:45
#define U128_P(x)
Definition: types.h:45

Definition at line 49 of file cookie.c.

◆ HLTAGS_F

#define HLTAGS_F
Value:
"(confirmed=%" PRIu64 " delivered=%" PRIu64 \
" next=%" PRIu64 " assign=%" PRIu64 ")"
#define PRIu64
Definition: types.h:58

Definition at line 75 of file link_fops.h.

◆ HLTAGS_P

#define HLTAGS_P (   _tags)
Value:
(_tags)->hlt_confirmed, (_tags)->hlt_delivered, \
(_tags)->hlt_next, (_tags)->hlt_assign

Definition at line 77 of file link_fops.h.

◆ M0_TRACE_SUBSYSTEM [1/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 29 of file cookie.c.

◆ M0_TRACE_SUBSYSTEM [2/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 29 of file main.c.

◆ M0_TRACE_SUBSYSTEM [3/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 29 of file msg.c.

◆ M0_TRACE_SUBSYSTEM [4/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 29 of file cookie.c.

◆ M0_TRACE_SUBSYSTEM [5/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 29 of file lq.c.

◆ M0_TRACE_SUBSYSTEM [6/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 29 of file lq.c.

◆ M0_TRACE_SUBSYSTEM [7/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 30 of file helper.c.

◆ M0_TRACE_SUBSYSTEM [8/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 30 of file msg_queue.c.

◆ M0_TRACE_SUBSYSTEM [9/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 30 of file entrypoint.c.

◆ M0_TRACE_SUBSYSTEM [10/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 30 of file ha.c.

◆ M0_TRACE_SUBSYSTEM [11/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 30 of file link_fops.c.

◆ M0_TRACE_SUBSYSTEM [12/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 30 of file link.c.

◆ M0_TRACE_SUBSYSTEM [13/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_UT

Definition at line 30 of file msg_queue.c.

◆ M0_TRACE_SUBSYSTEM [14/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 30 of file link_service.c.

◆ M0_TRACE_SUBSYSTEM [15/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_OTHER

Definition at line 31 of file epoch.c.

◆ M0_TRACE_SUBSYSTEM [16/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 32 of file entrypoint_fops.c.

◆ M0_TRACE_SUBSYSTEM [17/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 37 of file entrypoint.c.

◆ M0_TRACE_SUBSYSTEM [18/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 38 of file interface.c.

◆ M0_TRACE_SUBSYSTEM [19/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 42 of file ha.c.

◆ M0_TRACE_SUBSYSTEM [20/20]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 67 of file link.c.

Typedef Documentation

◆ m0_ha_client_cb_t

typedef void(* m0_ha_client_cb_t) (void *client, const void *data, uint64_t data2)

Callback used during global HA client list iteration

Definition at line 236 of file epoch.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ECL_TIMEOUT 
ECL_MAX_RPCS_IN_FLIGHT 

Definition at line 67 of file entrypoint.c.

◆ anonymous enum

anonymous enum
Enumerator
HEC_FOM_INIT 
HEC_FOM_FINI 

Definition at line 398 of file entrypoint.c.

◆ anonymous enum

anonymous enum
Enumerator
HA_MAX_RPCS_IN_FLIGHT 
HA_DISCONNECT_TIMEOUT 
HA_RESEND_INTERVAL 
HA_RECONNECT_INTERVAL 
HA_NR_SENT_MAX 

Definition at line 62 of file ha.c.

◆ anonymous enum

anonymous enum
Enumerator
HALON_INTERFACE_EP_BUF 
HALON_INTERFACE_NVEC_SIZE_MAX 

Definition at line 80 of file interface.c.

◆ anonymous enum

anonymous enum
Enumerator
HA_LINK_SUPPRESS_START_NR 

If incoming HA link fop arrives and the link it's supposed to arrive to is not there the code emits a warning. The problem here is that it might be a case when the link is going to be created shortly after, so the warning is a false positive. This parameter allows to suppress a number of first messages for the link.

The normal case:

* remote                               local
*   <--------------------------------- sends entrypoint request
* makes local and remote
* link parameters
* creates the link
* sends the entrypoint reply ----------->
*                                      creates the link
* sends the first message -------------->
*                                      the message arrives,
*                                      everything is fine, no warning.
* 

If the first message from remote is sent before local creates the link, then the message arrives for non-existent link which leads to the false positive warning.

Definition at line 89 of file link.c.

◆ anonymous enum

anonymous enum
Enumerator
M0_HA_MSG_FAILURE_VEC_LIMIT 

Definition at line 63 of file msg.h.

◆ anonymous enum

anonymous enum
Enumerator
M0_HA_MSG_TAG_UNKNOWN 
M0_HA_MSG_TAG_INVALID 

Definition at line 67 of file msg.h.

◆ anonymous enum

anonymous enum
Enumerator
HA_UT_ENTRYPOINT_USECASE_CONFD_NR 

Definition at line 44 of file entrypoint.c.

◆ anonymous enum

anonymous enum
Enumerator
M0_HA_UT_MAX_RPCS_IN_FLIGHT 

Definition at line 41 of file helper.h.

◆ anonymous enum

anonymous enum
Enumerator
HA_UT_THREAD_PAIR_NR 
HA_UT_MSG_PER_THREAD 

Definition at line 214 of file link.c.

◆ anonymous enum

anonymous enum
Enumerator
HA_UT_LINK_RECONNECT_MULTIPLE_NR_LINKS 

Definition at line 577 of file link.c.

◆ anonymous enum

anonymous enum
Enumerator
HA_UT_MSG_QUEUE_NR 

Definition at line 40 of file msg_queue.c.

◆ ha_link_ctx_type

Enumerator
HLX_INCOMING 
HLX_OUTGOING 

Definition at line 74 of file ha.c.

◆ ha_link_outgoing_fom_state

Enumerator
HA_LINK_OUTGOING_STATE_INIT 
HA_LINK_OUTGOING_STATE_FINISH 
HA_LINK_OUTGOING_STATE_INCOMING_REGISTER 
HA_LINK_OUTGOING_STATE_INCOMING_DEREGISTER 
HA_LINK_OUTGOING_STATE_INCOMING_QUIESCE 
HA_LINK_OUTGOING_STATE_INCOMING_QUIESCE_WAIT 
HA_LINK_OUTGOING_STATE_RPC_LINK_INIT 
HA_LINK_OUTGOING_STATE_RPC_LINK_FINI 
HA_LINK_OUTGOING_STATE_NOT_CONNECTED 
HA_LINK_OUTGOING_STATE_CONNECT 
HA_LINK_OUTGOING_STATE_CONNECTING 
HA_LINK_OUTGOING_STATE_DISCONNECT 
HA_LINK_OUTGOING_STATE_DISCONNECTING 
HA_LINK_OUTGOING_STATE_IDLE 
HA_LINK_OUTGOING_STATE_SEND 
HA_LINK_OUTGOING_STATE_WAIT_REPLY 
HA_LINK_OUTGOING_STATE_WAIT_RELEASE 
HA_LINK_OUTGOING_STATE_NR 

Definition at line 1060 of file link.c.

◆ ha_link_send_type

Enumerator
HA_LINK_SEND_QUERY 
HA_LINK_SEND_POST 
HA_LINK_SEND_REPLY 

Definition at line 550 of file link.c.

◆ m0_ha_entrypoint_client_state

Enumerator
M0_HEC_INIT 
M0_HEC_STOPPED 
M0_HEC_UNAVAILABLE 
M0_HEC_CONNECT 
M0_HEC_CONNECT_WAIT 
M0_HEC_FILL 
M0_HEC_SEND 
M0_HEC_SEND_WAIT 
M0_HEC_DISCONNECT 
M0_HEC_DISCONNECT_WAIT 
M0_HEC_AVAILABLE 
M0_HEC_FINI 

Definition at line 86 of file entrypoint.h.

◆ m0_ha_entrypoint_control

Command passed to the entrypoint consumer side to control entrypoint request flow. Producer side may request consumer to keep querying entrypoint, or stop querying and force process to quit.

Enumerator
M0_HA_ENTRYPOINT_CONSUME 

Entrypoint is good to be consumed

M0_HA_ENTRYPOINT_QUIT 

Remote consumer requested to quit

M0_HA_ENTRYPOINT_QUERY 

Remote consumer must query again

Definition at line 56 of file entrypoint_fops.h.

◆ m0_ha_entrypoint_server_fom_state

Enumerator
M0_HES_INIT 
M0_HES_FINI 
M0_HES_REPLY_WAIT 

Definition at line 62 of file entrypoint.h.

◆ m0_ha_epoch_outcome

Possible return values of m0_ha_epoch_monitor::hem_{past,future}().

Enumerator
M0_HEO_CONTINUE 

This monitor made no decision, call the next monitor. If all monitors return M0_HEO_CONTINUE, M0_HEO_ERROR is assumed.

M0_HEO_OK 

The item should be processed ignoring the difference in epoch.

M0_HEO_OBEY 

The receiver should transit to the item's epoch.

M0_HEO_DROP 

Don't deliver the item.

M0_HEO_ERROR 

If the item expects a reply, send "wrong epoch" reply to the sender. Otherwise as in M0_HEO_DROP.

Definition at line 129 of file epoch.h.

◆ m0_ha_level

Enumerator
M0_HA_LEVEL_ASSIGNS 
M0_HA_LEVEL_ADDR_STRDUP 
M0_HA_LEVEL_LINK_SERVICE 
M0_HA_LEVEL_ENTRYPOINT_SERVER_INIT 
M0_HA_LEVEL_ENTRYPOINT_CLIENT_INIT 
M0_HA_LEVEL_INIT 
M0_HA_LEVEL_ENTRYPOINT_SERVER_START 
M0_HA_LEVEL_INCOMING_LINKS 
M0_HA_LEVEL_START 
M0_HA_LEVEL_LINK_CTX_ALLOC 
M0_HA_LEVEL_LINK_CTX_INIT 
M0_HA_LEVEL_ENTRYPOINT_CLIENT_START 
M0_HA_LEVEL_ENTRYPOINT_CLIENT_WAIT 
M0_HA_LEVEL_LINK_ASSIGN 
M0_HA_LEVEL_CONNECT 

Definition at line 221 of file ha.h.

◆ m0_ha_link_state

Enumerator
M0_HA_LINK_STATE_INIT 
M0_HA_LINK_STATE_FINI 
M0_HA_LINK_STATE_START 
M0_HA_LINK_STATE_STOP 
M0_HA_LINK_STATE_IDLE 
M0_HA_LINK_STATE_RECV 
M0_HA_LINK_STATE_DELIVERY 
M0_HA_LINK_STATE_RPC_FAILED 
M0_HA_LINK_STATE_LINK_FAILED 
M0_HA_LINK_STATE_LINK_REUSED 
M0_HA_LINK_STATE_DISCONNECTING 
M0_HA_LINK_STATE_NR 

Definition at line 143 of file link.h.

◆ m0_ha_mod_level

Enumerator
M0_HA_MOD_LEVEL_ASSIGNS 
M0_HA_MOD_LEVEL_LINK_SERVICE 
M0_HA_MOD_LEVEL_LINK 
M0_HA_MOD_LEVEL_ENTRYPOINT 
M0_HA_MOD_LEVEL_STARTED 

Definition at line 877 of file ha.c.

◆ m0_ha_msg_qitem_delivery_state

Enumerator
M0_HA_MSG_QITEM_NOT_DELIVERED 
M0_HA_MSG_QITEM_DELIVERED 

Definition at line 43 of file msg_queue.h.

◆ m0_ha_msg_type

Enumerator
M0_HA_MSG_INVALID 
M0_HA_MSG_STOB_IOQ 
M0_HA_MSG_NVEC 
M0_HA_MSG_FAILURE_VEC_REQ 
M0_HA_MSG_FAILURE_VEC_REP 
M0_HA_MSG_KEEPALIVE_REQ 
M0_HA_MSG_KEEPALIVE_REP 
M0_HA_MSG_EVENT_PROCESS 
M0_HA_MSG_EVENT_SERVICE 
M0_HA_MSG_EVENT_RPC 
M0_HA_MSG_BE_IO_ERR 
M0_HA_MSG_SNS_ERR 

Definition at line 72 of file msg.h.

◆ m0_halon_interface_level

Enumerator
M0_HALON_INTERFACE_LEVEL_ASSIGNS 
M0_HALON_INTERFACE_LEVEL_NET_DOMAIN 
M0_HALON_INTERFACE_LEVEL_NET_BUFFER_POOL 
M0_HALON_INTERFACE_LEVEL_REQH_INIT 
M0_HALON_INTERFACE_LEVEL_REQH_START 
M0_HALON_INTERFACE_LEVEL_RPC_MACHINE 
M0_HALON_INTERFACE_LEVEL_HA_INIT 
M0_HALON_INTERFACE_LEVEL_DISPATCHER 
M0_HALON_INTERFACE_LEVEL_HA_START 
M0_HALON_INTERFACE_LEVEL_HA_CONNECT 
M0_HALON_INTERFACE_LEVEL_INSTANCE_SET 
M0_HALON_INTERFACE_LEVEL_EVENTS_STARTING 
M0_HALON_INTERFACE_LEVEL_RM_SETUP 
M0_HALON_INTERFACE_LEVEL_SPIEL_INIT 
M0_HALON_INTERFACE_LEVEL_SNS_CM_TRIGGER_FOPS 
M0_HALON_INTERFACE_LEVEL_EVENTS_STARTED 
M0_HALON_INTERFACE_LEVEL_STARTED 

Definition at line 144 of file interface.c.

◆ m0_halon_interface_state

Enumerator
M0_HALON_INTERFACE_STATE_UNINITIALISED 
M0_HALON_INTERFACE_STATE_INITIALISED 
M0_HALON_INTERFACE_STATE_WORKING 
M0_HALON_INTERFACE_STATE_FINALISED 

Definition at line 164 of file interface.c.

Function Documentation

◆ default_mon_future()

static int default_mon_future ( struct m0_ha_epoch_monitor self,
uint64_t  epoch,
const struct m0_rpc_item item 
)
static

Definition at line 79 of file epoch.c.

Here is the caller graph for this function:

◆ ha_client_release()

static void ha_client_release ( struct m0_ref ref)
static
Todo:
: Is it possible to move {m0}_ha_client_* functions to ha/note.[ch] files? Seems that functionality is related to HA notifications.

ha_client::hc_ref release callback

Definition at line 182 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_client_fom_fini()

static void ha_entrypoint_client_fom_fini ( struct m0_fom fom)
static

Definition at line 662 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_client_fom_locality()

static size_t ha_entrypoint_client_fom_locality ( const struct m0_fom fom)
static

Definition at line 690 of file entrypoint.c.

◆ ha_entrypoint_client_fom_tick()

static int ha_entrypoint_client_fom_tick ( struct m0_fom fom)
static

Definition at line 514 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_client_fop_release()

static void ha_entrypoint_client_fop_release ( struct m0_ref ref)
static

Definition at line 501 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_client_replied()

static void ha_entrypoint_client_replied ( struct m0_rpc_item item)
static

Definition at line 476 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_client_rlink_cb()

static bool ha_entrypoint_client_rlink_cb ( struct m0_clink clink)
static

Definition at line 422 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_client_start_check()

static bool ha_entrypoint_client_start_check ( struct m0_clink clink)
static

Definition at line 738 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_client_stop_check()

static bool ha_entrypoint_client_stop_check ( struct m0_clink clink)
static

Definition at line 754 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_fom_create()

static int ha_entrypoint_fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 920 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_fom_fini()

static void ha_entrypoint_fom_fini ( struct m0_fom fom)
static

Definition at line 861 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_get_fom_tick()

static int ha_entrypoint_get_fom_tick ( struct m0_fom fom)
static

Definition at line 872 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_home_locality()

static size_t ha_entrypoint_home_locality ( const struct m0_fom fom)
static

Definition at line 856 of file entrypoint.c.

◆ ha_entrypoint_server_deregister()

static void ha_entrypoint_server_deregister ( struct m0_ha_entrypoint_server hes,
struct ha_entrypoint_server_fom server_fom 
)
static

Definition at line 294 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_server_find()

static struct ha_entrypoint_server_fom* ha_entrypoint_server_find ( struct m0_ha_entrypoint_server hes,
const struct m0_uint128 req_id 
)
static

Definition at line 264 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_server_register()

static void ha_entrypoint_server_register ( struct m0_ha_entrypoint_server hes,
struct ha_entrypoint_server_fom server_fom 
)
static

Definition at line 280 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_service_allocate()

static int ha_entrypoint_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 143 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_service_container()

static struct ha_entrypoint_service* ha_entrypoint_service_container ( struct m0_reqh_service service)
static

Definition at line 74 of file entrypoint.c.

Here is the caller graph for this function:

◆ ha_entrypoint_service_fini()

static void ha_entrypoint_service_fini ( struct m0_reqh_service service)
static

Definition at line 89 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_service_fop_accept()

static int ha_entrypoint_service_fop_accept ( struct m0_reqh_service service,
struct m0_fop fop 
)
static

Definition at line 107 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_service_init()

static void ha_entrypoint_service_init ( struct m0_reqh_service service)
static

Definition at line 79 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_entrypoint_service_start()

static int ha_entrypoint_service_start ( struct m0_reqh_service service)
static

Definition at line 101 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_service_stop()

static void ha_entrypoint_service_stop ( struct m0_reqh_service service)
static

Definition at line 114 of file entrypoint.c.

Here is the call graph for this function:

◆ ha_entrypoint_state_cb()

static bool ha_entrypoint_state_cb ( struct m0_clink clink)
static

Definition at line 281 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_generation_next()

static uint64_t ha_generation_next ( struct m0_ha ha)
static

Definition at line 244 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_global_lock()

static void ha_global_lock ( struct ha_global hg)
inlinestatic

Definition at line 167 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_global_unlock()

static void ha_global_unlock ( struct ha_global hg)
inlinestatic

Definition at line 172 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_level_enter()

static int ha_level_enter ( struct m0_module module)
static

Definition at line 365 of file ha.c.

Here is the call graph for this function:

◆ ha_level_leave()

static void ha_level_leave ( struct m0_module module)
static

Definition at line 469 of file ha.c.

Here is the call graph for this function:

◆ ha_link_backoff_check()

static bool ha_link_backoff_check ( struct m0_ha_link hl,
int  rc,
uint64_t *  nr,
int *  old_rc,
uint64_t *  old_nr 
)
static

Definition at line 1237 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_cb_disconnecting_reused()

static void ha_link_cb_disconnecting_reused ( struct m0_ha_link hl)
static

Definition at line 1306 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_conn_cfg_copy()

static int ha_link_conn_cfg_copy ( struct m0_ha_link_conn_cfg dst,
const struct m0_ha_link_conn_cfg src 
)
static

Definition at line 298 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_conn_cfg_free()

static void ha_link_conn_cfg_free ( struct m0_ha_link_conn_cfg hl_conn_cfg)
static

Definition at line 310 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_conn_cfg_make()

static void ha_link_conn_cfg_make ( struct m0_ha_link_conn_cfg hl_conn_cfg,
const char *  rpc_endpoint 
)
static

Definition at line 266 of file ha.c.

Here is the caller graph for this function:

◆ ha_link_ctx_fini()

static void ha_link_ctx_fini ( struct m0_ha ha,
struct ha_link_ctx hlx 
)
static

Definition at line 225 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_ctx_init()

static int ha_link_ctx_init ( struct m0_ha ha,
struct ha_link_ctx hlx,
struct m0_ha_link_cfg hl_cfg,
const struct m0_ha_link_conn_cfg hl_conn_cfg,
const struct m0_fid process_fid,
enum ha_link_ctx_type  hlx_type 
)
static

Definition at line 185 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_event_cb()

static bool ha_link_event_cb ( struct m0_clink clink)
static

Definition at line 99 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_handle()

static void ha_link_handle ( struct m0_ha ha,
const struct m0_uint128 req_id,
const struct m0_ha_entrypoint_req req,
struct m0_ha_entrypoint_rep rep,
struct m0_ha_link **  hl_ptr 
)
static

Definition at line 762 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_id_next()

static void ha_link_id_next ( struct m0_ha ha,
struct m0_uint128 id 
)
static

Definition at line 729 of file ha.c.

Here is the caller graph for this function:

◆ ha_link_incoming_create()

static int ha_link_incoming_create ( struct m0_ha ha,
const struct m0_ha_entrypoint_req req,
struct m0_ha_link_conn_cfg hl_conn_cfg,
struct ha_link_ctx **  hlx_ptr 
)
static

Definition at line 736 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_incoming_find()

static struct ha_link_ctx* ha_link_incoming_find ( struct m0_ha ha,
const struct m0_ha_link_params lp 
)
static

Definition at line 164 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_incoming_fom_container()

static struct ha_link_incoming_fom* ha_link_incoming_fom_container ( struct m0_fom fom)
static

Definition at line 910 of file link.c.

Here is the caller graph for this function:

◆ ha_link_incoming_fom_create()

static int ha_link_incoming_fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 1019 of file link.c.

Here is the call graph for this function:

◆ ha_link_incoming_fom_fini()

static void ha_link_incoming_fom_fini ( struct m0_fom fom)
static

Definition at line 998 of file link.c.

Here is the call graph for this function:

◆ ha_link_incoming_fom_locality()

static size_t ha_link_incoming_fom_locality ( const struct m0_fom fom)
static

Definition at line 1008 of file link.c.

◆ ha_link_incoming_fom_tick()

static int ha_link_incoming_fom_tick ( struct m0_fom fom)
static

Definition at line 916 of file link.c.

Here is the call graph for this function:

◆ ha_link_msg_received()

static void ha_link_msg_received ( struct m0_ha_link hl,
const struct m0_ha_msg msg 
)
static

Definition at line 852 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_msg_recv_or_delivery_broadcast()

static void ha_link_msg_recv_or_delivery_broadcast ( struct m0_ha_link hl)
static

Definition at line 868 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_fom_create()

static int ha_link_outgoing_fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 1687 of file link.c.

Here is the call graph for this function:

◆ ha_link_outgoing_fom_fini()

static void ha_link_outgoing_fom_fini ( struct m0_fom fom)
static

Definition at line 1665 of file link.c.

Here is the call graph for this function:

◆ ha_link_outgoing_fom_locality()

static size_t ha_link_outgoing_fom_locality ( const struct m0_fom fom)
static

Definition at line 1676 of file link.c.

◆ ha_link_outgoing_fom_tick()

static int ha_link_outgoing_fom_tick ( struct m0_fom fom)
static

Definition at line 1346 of file link.c.

Here is the call graph for this function:

◆ ha_link_outgoing_fom_wakeup()

static void ha_link_outgoing_fom_wakeup ( struct m0_ha_link hl)
static

Definition at line 1647 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_fom_wakeup_ast()

static void ha_link_outgoing_fom_wakeup_ast ( struct m0_sm_group gr,
struct m0_sm_ast ast 
)
static

Definition at line 1631 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_fop_release()

static void ha_link_outgoing_fop_release ( struct m0_ref ref)
static

Definition at line 1169 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_fop_replied()

static int ha_link_outgoing_fop_replied ( struct m0_ha_link hl)
static

Definition at line 1255 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_fop_send()

static int ha_link_outgoing_fop_send ( struct m0_ha_link hl)
static

Definition at line 1187 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_outgoing_item_replied()

static void ha_link_outgoing_item_replied ( struct m0_rpc_item item)
static

Definition at line 1144 of file link.c.

Here is the call graph for this function:

◆ ha_link_outgoing_item_sent()

static void ha_link_outgoing_item_sent ( struct m0_rpc_item item)
static

Definition at line 1133 of file link.c.

Here is the call graph for this function:

◆ ha_link_outgoing_reconnect_timeout()

static void ha_link_outgoing_reconnect_timeout ( struct m0_sm_timer timer)
static

Definition at line 1334 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_q_in_confirm_all()

static bool ha_link_q_in_confirm_all ( struct m0_ha_link hl)
static

Definition at line 1296 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_quiesce_wait_cb()

static bool ha_link_quiesce_wait_cb ( struct m0_clink clink)
static

Definition at line 211 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_rpc_wait_cb()

static bool ha_link_rpc_wait_cb ( struct m0_clink clink)
static

Definition at line 197 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_service_allocate()

static int ha_link_service_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Definition at line 270 of file link_service.c.

Here is the call graph for this function:

◆ ha_link_service_container()

static struct ha_link_service* ha_link_service_container ( struct m0_reqh_service service)
static

Definition at line 73 of file link_service.c.

Here is the caller graph for this function:

◆ ha_link_service_find()

static struct m0_ha_link* ha_link_service_find ( struct ha_link_service hl_service,
const struct m0_uint128 link_id,
struct m0_uint128 connection_id 
)
static

Definition at line 124 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_service_fini()

static void ha_link_service_fini ( struct m0_reqh_service service)
static

Definition at line 90 of file link_service.c.

Here is the call graph for this function:

◆ ha_link_service_fop_accept()

static int ha_link_service_fop_accept ( struct m0_reqh_service service,
struct m0_fop fop 
)
static

Definition at line 110 of file link_service.c.

Here is the call graph for this function:

◆ ha_link_service_get()

static void ha_link_service_get ( struct ha_link_service hl_service,
struct m0_ha_link hl 
)
static

Definition at line 143 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_service_init()

static void ha_link_service_init ( struct m0_reqh_service service)
static

Definition at line 79 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_service_start()

static int ha_link_service_start ( struct m0_reqh_service service)
static

Definition at line 104 of file link_service.c.

Here is the call graph for this function:

◆ ha_link_service_stop()

static void ha_link_service_stop ( struct m0_reqh_service service)
static

Definition at line 117 of file link_service.c.

Here is the call graph for this function:

◆ ha_link_stop_cb()

static bool ha_link_stop_cb ( struct m0_clink clink)
static

Definition at line 176 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_tags_apply()

static void ha_link_tags_apply ( struct m0_ha_link hl,
const struct m0_ha_link_params lp 
)
static

Definition at line 316 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_tags_in_out()

static void ha_link_tags_in_out ( struct m0_ha_link hl,
uint64_t *  out_next,
uint64_t *  in_delivered 
)
static

Definition at line 840 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_tags_update()

static void ha_link_tags_update ( struct m0_ha_link hl,
uint64_t  out_next,
uint64_t  in_delivered 
)
static

Definition at line 809 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_wait()

static void ha_link_wait ( struct ha_link_wait_ctx wait_ctx,
bool(*)(struct m0_clink *clink check 
)
static

Definition at line 638 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_wait_arrival_check()

static bool ha_link_wait_arrival_check ( struct m0_clink clink)
static

Definition at line 685 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_wait_confirmation_check()

static bool ha_link_wait_confirmation_check ( struct m0_clink clink)
static

Definition at line 727 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_link_wait_delivery_check()

static bool ha_link_wait_delivery_check ( struct m0_clink clink)
static

Definition at line 655 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_lq_tags_invariant()

static bool ha_lq_tags_invariant ( const struct m0_ha_link_tags tags)
static

Definition at line 39 of file lq.c.

Here is the caller graph for this function:

◆ ha_mod_level_enter()

static int ha_mod_level_enter ( struct m0_module module)
static

Definition at line 887 of file ha.c.

Here is the call graph for this function:

◆ ha_mod_level_leave()

static void ha_mod_level_leave ( struct m0_module module)
static

Definition at line 913 of file ha.c.

Here is the call graph for this function:

◆ ha_request_received_cb()

static void ha_request_received_cb ( struct m0_ha_entrypoint_server hes,
const struct m0_ha_entrypoint_req req,
const struct m0_uint128 req_id 
)
static

Definition at line 255 of file ha.c.

Here is the caller graph for this function:

◆ ha_ut_entrypoint_client_cb()

static bool ha_ut_entrypoint_client_cb ( struct m0_clink clink)
static

Definition at line 235 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_client_start()

static void ha_ut_entrypoint_client_start ( struct ha_ut_entrypoint_usecase_ctx uctx,
struct m0_ha_ut_rpc_ctx ctx,
struct m0_ha_entrypoint_client ecl 
)
static

Definition at line 173 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_client_stop()

static void ha_ut_entrypoint_client_stop ( struct ha_ut_entrypoint_usecase_ctx uctx,
struct m0_ha_entrypoint_client ecl 
)
static

Definition at line 192 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_reply_check()

static void ha_ut_entrypoint_reply_check ( struct ha_ut_entrypoint_usecase_ctx uctx,
struct m0_ha_entrypoint_rep rep 
)
static

Definition at line 128 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_reply_fini()

static void ha_ut_entrypoint_reply_fini ( struct ha_ut_entrypoint_usecase_ctx uctx)
static

Definition at line 116 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_reply_init()

static void ha_ut_entrypoint_reply_init ( struct ha_ut_entrypoint_usecase_ctx uctx)
static

Definition at line 90 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_request_arrived()

static void ha_ut_entrypoint_request_arrived ( struct m0_ha_entrypoint_server hes,
const struct m0_ha_entrypoint_req req,
const struct m0_uint128 req_id 
)
static

Definition at line 62 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_server_start()

static void ha_ut_entrypoint_server_start ( struct ha_ut_entrypoint_usecase_ctx uctx,
struct m0_ha_ut_rpc_ctx ctx,
struct m0_ha_entrypoint_server esr 
)
static

Definition at line 147 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_entrypoint_server_stop()

static void ha_ut_entrypoint_server_stop ( struct ha_ut_entrypoint_usecase_ctx uctx,
struct m0_ha_entrypoint_server esr 
)
static

Definition at line 165 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_ha2usecase_ctx()

static struct ha_ut_usecase_ctx* ha_ut_ha2usecase_ctx ( struct m0_ha ha)
static

Definition at line 66 of file ha.c.

Here is the caller graph for this function:

◆ ha_ut_ha_wait_available()

static bool ha_ut_ha_wait_available ( struct m0_clink clink)
static

Definition at line 193 of file ha.c.

Here is the caller graph for this function:

◆ ha_ut_link_cfg_create()

static void ha_ut_link_cfg_create ( struct m0_ha_link_cfg hl_cfg,
struct m0_ha_ut_rpc_ctx rpc_ctx,
struct m0_reqh_service hl_service 
)
static

Definition at line 81 of file link.c.

Here is the caller graph for this function:

◆ ha_ut_link_conn_cfg_create()

static void ha_ut_link_conn_cfg_create ( struct m0_ha_link_conn_cfg hl_conn_cfg,
struct m0_uint128 id_local,
struct m0_uint128 id_remote,
struct m0_uint128 id_connection,
bool  tag_even,
const char *  ep 
)
static

Definition at line 53 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_link_conn_cfg_free()

static void ha_ut_link_conn_cfg_free ( struct m0_ha_link_conn_cfg hl_conn_cfg)
static

Definition at line 94 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_link_fini()

static void ha_ut_link_fini ( struct ha_ut_link_ctx link_ctx)
static

Definition at line 122 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_link_init()

static void ha_ut_link_init ( struct ha_ut_link_ctx link_ctx,
struct m0_ha_ut_rpc_ctx rpc_ctx,
struct m0_reqh_service hl_service,
struct m0_uint128 id_local,
struct m0_uint128 id_remote,
struct m0_uint128 id_connection,
bool  tag_even,
bool  start 
)
static

Definition at line 99 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_link_msg_transfer()

static void ha_ut_link_msg_transfer ( struct m0_ha_link hl1,
struct m0_ha_link hl2 
)
static

Definition at line 459 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_link_mt_thread()

static void ha_ut_link_mt_thread ( void *  param)
static

Definition at line 235 of file link.c.

Here is the call graph for this function:

◆ ha_ut_link_set_some_msg()

static void ha_ut_link_set_some_msg ( struct m0_ha_msg msg)
static

Definition at line 131 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_links_fini()

static void ha_ut_links_fini ( struct m0_ha_ut_rpc_ctx rpc_ctx,
struct m0_reqh_service hl_service,
int  nr_links,
struct ha_ut_link_ctx **  ctx,
struct m0_ha_link **  hl 
)
static

Definition at line 440 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_links_init()

static void ha_ut_links_init ( struct m0_ha_ut_rpc_ctx **  rpc_ctx,
struct m0_reqh_service **  hl_service,
int  nr_links,
struct ha_ut_link_ctx ***  ctx,
struct m0_ha_link ***  hl,
struct m0_uint128 id1,
struct m0_uint128 id2,
struct m0_uint128 id,
int *  tag_even,
bool  start 
)
static

Definition at line 407 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_usecase_entrypoint_replied()

static void ha_ut_usecase_entrypoint_replied ( struct m0_ha ha,
struct m0_ha_entrypoint_rep rep 
)
static

Definition at line 113 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_entrypoint_request()

static void ha_ut_usecase_entrypoint_request ( struct m0_ha ha,
const struct m0_ha_entrypoint_req req,
const struct m0_uint128 req_id 
)
static

Definition at line 88 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_link_check()

static void ha_ut_usecase_link_check ( struct ha_ut_usecase_ctx huc,
struct m0_ha_link hl 
)
static

Definition at line 71 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ha_ut_usecase_link_connected()

static void ha_ut_usecase_link_connected ( struct m0_ha ha,
const struct m0_uint128 req_id,
struct m0_ha_link hl 
)
static

Definition at line 145 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_link_disconnected()

static void ha_ut_usecase_link_disconnected ( struct m0_ha ha,
struct m0_ha_link hl 
)
static

Definition at line 178 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_link_is_disconnecting()

static void ha_ut_usecase_link_is_disconnecting ( struct m0_ha ha,
struct m0_ha_link hl 
)
static

Definition at line 167 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_link_reused()

static void ha_ut_usecase_link_reused ( struct m0_ha ha,
const struct m0_uint128 req_id,
struct m0_ha_link hl 
)
static

Definition at line 156 of file ha.c.

Here is the call graph for this function:

◆ ha_ut_usecase_msg_is_delivered()

static void ha_ut_usecase_msg_is_delivered ( struct m0_ha ha,
struct m0_ha_link hl,
uint64_t  tag 
)
static

Definition at line 133 of file ha.c.

◆ ha_ut_usecase_msg_is_not_delivered()

static void ha_ut_usecase_msg_is_not_delivered ( struct m0_ha ha,
struct m0_ha_link hl,
uint64_t  tag 
)
static

Definition at line 139 of file ha.c.

◆ ha_ut_usecase_msg_received()

static void ha_ut_usecase_msg_received ( struct m0_ha ha,
struct m0_ha_link hl,
struct m0_ha_msg msg,
uint64_t  tag 
)
static

Definition at line 126 of file ha.c.

◆ halon_interface_entrypoint_replied_cb()

static void halon_interface_entrypoint_replied_cb ( struct m0_ha ha,
struct m0_ha_entrypoint_rep rep 
)
static

Definition at line 378 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_entrypoint_request_cb()

static void halon_interface_entrypoint_request_cb ( struct m0_ha ha,
const struct m0_ha_entrypoint_req req,
const struct m0_uint128 req_id 
)
static

Definition at line 347 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_ha2hii()

static struct m0_halon_interface_internal* halon_interface_ha2hii ( struct m0_ha ha)
static

Definition at line 245 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_is_compatible()

static bool halon_interface_is_compatible ( struct m0_halon_interface hi,
const char *  build_git_rev_id,
const char *  build_configure_opts,
bool  disable_compat_check 
)
static

Definition at line 201 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_is_working()

static bool halon_interface_is_working ( struct m0_halon_interface_internal hii)
static

Definition at line 1177 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_level_enter()

static int halon_interface_level_enter ( struct m0_module module)
static

Definition at line 669 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_level_leave()

static void halon_interface_level_leave ( struct m0_module module)
static

Definition at line 791 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_link_absent_cb()

static void halon_interface_link_absent_cb ( struct m0_ha ha,
const struct m0_uint128 req_id 
)
static

Definition at line 497 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_link_connected_cb()

static void halon_interface_link_connected_cb ( struct m0_ha ha,
const struct m0_uint128 req_id,
struct m0_ha_link hl 
)
static

Definition at line 457 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_link_disconnected_cb()

static void halon_interface_link_disconnected_cb ( struct m0_ha ha,
struct m0_ha_link hl 
)
static

Definition at line 527 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_link_is_disconnecting_cb()

static void halon_interface_link_is_disconnecting_cb ( struct m0_ha ha,
struct m0_ha_link hl 
)
static

Definition at line 512 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_link_reused_cb()

static void halon_interface_link_reused_cb ( struct m0_ha ha,
const struct m0_uint128 req_id,
struct m0_ha_link hl 
)
static

Definition at line 477 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_msg_is_delivered_cb()

static void halon_interface_msg_is_delivered_cb ( struct m0_ha ha,
struct m0_ha_link hl,
uint64_t  tag 
)
static

Definition at line 421 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_msg_is_not_delivered_cb()

static void halon_interface_msg_is_not_delivered_cb ( struct m0_ha ha,
struct m0_ha_link hl,
uint64_t  tag 
)
static

Definition at line 439 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_msg_received_cb()

static void halon_interface_msg_received_cb ( struct m0_ha ha,
struct m0_ha_link hl,
struct m0_ha_msg msg,
uint64_t  tag 
)
static

Definition at line 391 of file interface.c.

Here is the call graph for this function:

◆ halon_interface_parse_debug_options()

static void halon_interface_parse_debug_options ( struct m0_halon_interface hi,
const char *  debug_options 
)
static

Definition at line 229 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_process_event()

static void halon_interface_process_event ( struct m0_halon_interface_internal hii,
enum m0_conf_ha_process_event  event 
)
static

Definition at line 646 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_process_failure_check()

static void halon_interface_process_failure_check ( struct m0_halon_interface_internal hii,
struct m0_ha_msg msg 
)
static

Definition at line 256 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ halon_interface_service_event()

static void halon_interface_service_event ( struct m0_halon_interface_internal hii,
enum m0_conf_ha_service_event  event 
)
static

Definition at line 656 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_BASSERT()

◆ M0_BOB_DEFINE() [1/2]

M0_BOB_DEFINE ( static  inline,
ha_link_service_bob_type,
ha_link_service   
)

◆ M0_BOB_DEFINE() [2/2]

M0_BOB_DEFINE ( static  ,
halon_interface_bob_type,
m0_halon_interface_internal   
)

◆ m0_ha_client_add()

M0_INTERNAL int m0_ha_client_add ( struct m0_confc confc)

Adds new HA client record to HA global context, or increments client's reference counter in case client record already exists.

With this registration the client side is allowed to provide any arbitrary confc instance having cache filled with the conf objects which HA state changes the client side wants to be notified of.

In its turn, HA is to apply recieved HA notifications to every registered confc instance. (see m0_ha_state_accept() implementation)

Precondition
confc->cc_cache.ca_lock != NULL
Note
Any client is allowed to register any confc instance that suits client's needs in HA subscriptions, taking no care about the instance origins, i.e. no matter if the instance were already registered previously by some other client or not.

Definition at line 191 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_client_del()

M0_INTERNAL int m0_ha_client_del ( struct m0_confc confc)

Decrements HA client record reference counter, and deletes the record from global HA list when the counter reaches zero value.

Definition at line 232 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_clients_iterate()

M0_INTERNAL void m0_ha_clients_iterate ( m0_ha_client_cb_t  iter,
const void *  data,
uint64_t  data2 
)

Global HA client list iteration. Calling back occurs on per-client context basis. Caller provides callback along with data the caller side is to process. Data is to remain non-modified during iteration.

Note
Global HA context mutex is expected to be locked in the course of client list iteration.

Definition at line 251 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_connect()

M0_INTERNAL struct m0_ha_link * m0_ha_connect ( struct m0_ha ha)

Definition at line 687 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_cookie_fini()

M0_INTERNAL void m0_ha_cookie_fini ( struct m0_ha_cookie hc)

Definition at line 62 of file cookie.c.

Here is the caller graph for this function:

◆ m0_ha_cookie_from_xc()

M0_INTERNAL void m0_ha_cookie_from_xc ( struct m0_ha_cookie hc,
const struct m0_ha_cookie_xc hc_xc 
)

Definition at line 90 of file cookie.c.

Here is the caller graph for this function:

◆ m0_ha_cookie_init()

M0_INTERNAL void m0_ha_cookie_init ( struct m0_ha_cookie hc)

Definition at line 55 of file cookie.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_cookie_is_eq()

M0_INTERNAL bool m0_ha_cookie_is_eq ( const struct m0_ha_cookie a,
const struct m0_ha_cookie b 
)

Definition at line 79 of file cookie.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_cookie_record()

M0_INTERNAL void m0_ha_cookie_record ( struct m0_ha_cookie hc)

Definition at line 67 of file cookie.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_cookie_to_xc()

M0_INTERNAL void m0_ha_cookie_to_xc ( const struct m0_ha_cookie hc,
struct m0_ha_cookie_xc hc_xc 
)

Definition at line 101 of file cookie.c.

Here is the caller graph for this function:

◆ m0_ha_delivered()

M0_INTERNAL void m0_ha_delivered ( struct m0_ha ha,
struct m0_ha_link hl,
struct m0_ha_msg msg 
)

Definition at line 870 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_disconnect()

M0_INTERNAL void m0_ha_disconnect ( struct m0_ha ha)

Definition at line 707 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_disconnect_incoming()

M0_INTERNAL void m0_ha_disconnect_incoming ( struct m0_ha ha,
struct m0_ha_link hl 
)

Definition at line 714 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_fini()

M0_INTERNAL void m0_ha_domain_fini ( struct m0_ha_domain dom)

Definition at line 96 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_get_read()

M0_INTERNAL uint64_t m0_ha_domain_get_read ( struct m0_ha_domain dom)

Acquires read lock on the domain and returns known epoch.

The known epoch cannot be changed until the lock is released by calling m0_ha_domain_put_read().

Definition at line 119 of file epoch.c.

Here is the call graph for this function:

◆ m0_ha_domain_get_write()

M0_INTERNAL uint64_t m0_ha_domain_get_write ( struct m0_ha_domain dom)

Acquires the write lock and returns the known epoch.

The known epoch can be neither modified nor queried until the lock is released by m0_ha_domain_put_write().

Definition at line 130 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_init()

M0_INTERNAL void m0_ha_domain_init ( struct m0_ha_domain dom,
uint64_t  epoch 
)

Initialise the domain, with the given epoch number.

Definition at line 85 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_monitor_add()

M0_INTERNAL void m0_ha_domain_monitor_add ( struct m0_ha_domain dom,
struct m0_ha_epoch_monitor mon 
)

Definition at line 103 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_monitor_del()

M0_INTERNAL void m0_ha_domain_monitor_del ( struct m0_ha_domain dom,
struct m0_ha_epoch_monitor mon 
)

Definition at line 111 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_domain_put_read()

M0_INTERNAL void m0_ha_domain_put_read ( struct m0_ha_domain dom)

Releases the lock acquired by m0_ha_domain_get_read().

Definition at line 125 of file epoch.c.

Here is the call graph for this function:

◆ m0_ha_domain_put_write()

M0_INTERNAL void m0_ha_domain_put_write ( struct m0_ha_domain dom,
uint64_t  epoch 
)

Releases the lock acquired by m0_ha_domain_get_write() and sets the new known epoch.

HA sub-system uses this function to move to the next epoch.

Message receivers use this function to handle M0_HEO_OBEY return from m0_ha_epoch_monitor::hem_future() method.

Precondition
epoch >= dom->hdo_epoch

Definition at line 136 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_chan()

M0_INTERNAL struct m0_chan * m0_ha_entrypoint_client_chan ( struct m0_ha_entrypoint_client ecl)

Definition at line 823 of file entrypoint.c.

Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_fini()

M0_INTERNAL void m0_ha_entrypoint_client_fini ( struct m0_ha_entrypoint_client ecl)

Definition at line 464 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_init()

M0_INTERNAL int m0_ha_entrypoint_client_init ( struct m0_ha_entrypoint_client ecl,
const char *  ep,
struct m0_ha_entrypoint_client_cfg ecl_cfg 
)

Definition at line 434 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_request()

M0_INTERNAL void m0_ha_entrypoint_client_request ( struct m0_ha_entrypoint_client ecl)

Definition at line 708 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_start()

M0_INTERNAL void m0_ha_entrypoint_client_start ( struct m0_ha_entrypoint_client ecl)

Definition at line 727 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_start_sync()

M0_INTERNAL void m0_ha_entrypoint_client_start_sync ( struct m0_ha_entrypoint_client ecl)

Definition at line 772 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_state_get()

M0_INTERNAL enum m0_ha_entrypoint_client_state m0_ha_entrypoint_client_state_get ( struct m0_ha_entrypoint_client ecl)
Precondition
m0_sm_group_is_locked(&ecl->ecl_sm_group)
Note
Use m0_sm_state_name() to convert m0_ha_entrypoint_client_state to string.
M0_LOG(M0_DEBUG, "state=%s", m0_sm_state_name(&ecl->ecl_sm, state));

Definition at line 829 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_client_stop()

M0_INTERNAL void m0_ha_entrypoint_client_stop ( struct m0_ha_entrypoint_client ecl)

Definition at line 785 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_fop2rep()

M0_INTERNAL int m0_ha_entrypoint_fop2rep ( const struct m0_ha_entrypoint_rep_fop rep_fop,
struct m0_ha_entrypoint_rep rep 
)

Definition at line 123 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_fop2req()

M0_INTERNAL int m0_ha_entrypoint_fop2req ( const struct m0_ha_entrypoint_req_fop req_fop,
const char *  rpc_endpoint,
struct m0_ha_entrypoint_req req 
)

Definition at line 96 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_fops_fini()

M0_INTERNAL void m0_ha_entrypoint_fops_fini ( void  )

Definition at line 68 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_fops_init()

M0_INTERNAL void m0_ha_entrypoint_fops_init ( void  )

Definition at line 50 of file entrypoint_fops.c.

Here is the caller graph for this function:

◆ m0_ha_entrypoint_mod_fini()

M0_INTERNAL void m0_ha_entrypoint_mod_fini ( void  )

Definition at line 850 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_mod_init()

M0_INTERNAL int m0_ha_entrypoint_mod_init ( void  )

Definition at line 835 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_rep2fop()

M0_INTERNAL int m0_ha_entrypoint_rep2fop ( const struct m0_ha_entrypoint_rep rep,
struct m0_ha_entrypoint_rep_fop rep_fop 
)

Definition at line 160 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_rep_copy()

M0_INTERNAL int m0_ha_entrypoint_rep_copy ( struct m0_ha_entrypoint_rep to,
struct m0_ha_entrypoint_rep from 
)

Definition at line 219 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_rep_free()

M0_INTERNAL void m0_ha_entrypoint_rep_free ( struct m0_ha_entrypoint_rep rep)

Definition at line 205 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_reply()

M0_INTERNAL void m0_ha_entrypoint_reply ( struct m0_ha ha,
const struct m0_uint128 req_id,
const struct m0_ha_entrypoint_rep rep,
struct m0_ha_link **  hl_ptr 
)

Definition at line 844 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_req2fop()

M0_INTERNAL int m0_ha_entrypoint_req2fop ( const struct m0_ha_entrypoint_req req,
struct m0_ha_entrypoint_req_fop req_fop 
)

Definition at line 75 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_req_free()

M0_INTERNAL void m0_ha_entrypoint_req_free ( struct m0_ha_entrypoint_req req)

Definition at line 212 of file entrypoint_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_fini()

M0_INTERNAL void m0_ha_entrypoint_server_fini ( struct m0_ha_entrypoint_server hes)

Definition at line 234 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_init()

M0_INTERNAL int m0_ha_entrypoint_server_init ( struct m0_ha_entrypoint_server hes,
struct m0_ha_entrypoint_server_cfg hes_cfg 
)

Definition at line 220 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_reply()

M0_INTERNAL void m0_ha_entrypoint_server_reply ( struct m0_ha_entrypoint_server hes,
const struct m0_uint128 req_id,
const struct m0_ha_entrypoint_rep rep 
)

Definition at line 306 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_request_find()

M0_INTERNAL const struct m0_ha_entrypoint_req * m0_ha_entrypoint_server_request_find ( struct m0_ha_entrypoint_server hes,
const struct m0_uint128 req_id 
)

Definition at line 322 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_start()

M0_INTERNAL void m0_ha_entrypoint_server_start ( struct m0_ha_entrypoint_server hes)

Definition at line 241 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_server_stop()

M0_INTERNAL void m0_ha_entrypoint_server_stop ( struct m0_ha_entrypoint_server hes)

Definition at line 258 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_service_fini()

M0_INTERNAL void m0_ha_entrypoint_service_fini ( struct m0_reqh_service he_service)

Definition at line 207 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_entrypoint_service_init()

M0_INTERNAL int m0_ha_entrypoint_service_init ( struct m0_reqh_service **  service,
struct m0_reqh reqh 
)

Definition at line 197 of file entrypoint.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_epoch_check()

M0_INTERNAL int m0_ha_epoch_check ( const struct m0_rpc_item item)

Definition at line 266 of file epoch.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_fini()

M0_INTERNAL void m0_ha_fini ( struct m0_ha ha)

Definition at line 679 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_flush()

M0_INTERNAL void m0_ha_flush ( struct m0_ha ha,
struct m0_ha_link hl 
)

Definition at line 966 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_global_fini()

M0_INTERNAL void m0_ha_global_fini ( void  )

Definition at line 157 of file epoch.c.

Here is the call graph for this function:

◆ m0_ha_global_init()

M0_INTERNAL int m0_ha_global_init ( void  )

Definition at line 144 of file epoch.c.

Here is the call graph for this function:

◆ m0_ha_init()

M0_INTERNAL int m0_ha_init ( struct m0_ha ha,
struct m0_ha_cfg ha_cfg 
)

Definition at line 641 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_cb_disconnecting()

M0_INTERNAL void m0_ha_link_cb_disconnecting ( struct m0_ha_link hl)

Definition at line 787 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_cb_reused()

M0_INTERNAL void m0_ha_link_cb_reused ( struct m0_ha_link hl)

Definition at line 798 of file link.c.

Here is the call graph for this function:

◆ m0_ha_link_chan()

M0_INTERNAL struct m0_chan * m0_ha_link_chan ( struct m0_ha_link hl)

Definition at line 532 of file link.c.

Here is the caller graph for this function:

◆ m0_ha_link_delivered()

M0_INTERNAL void m0_ha_link_delivered ( struct m0_ha_link hl,
struct m0_ha_msg msg 
)

Definition at line 584 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_delivered_consume()

M0_INTERNAL uint64_t m0_ha_link_delivered_consume ( struct m0_ha_link hl)

Returns M0_HA_MSG_TAG_INVALID if there is nothing to consume

Definition at line 606 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_fini()

M0_INTERNAL void m0_ha_link_fini ( struct m0_ha_link hl)

Definition at line 269 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_flush()

M0_INTERNAL void m0_ha_link_flush ( struct m0_ha_link hl)

Waits until all messages are sent and delivered. Also waits until all messages received are consumend and delivery is confirmed.

Definition at line 767 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_fops_fini()

M0_INTERNAL void m0_ha_link_fops_fini ( void  )

Definition at line 98 of file link_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_fops_init()

M0_INTERNAL int m0_ha_link_fops_init ( void  )

Definition at line 79 of file link_fops.c.

Here is the caller graph for this function:

◆ m0_ha_link_init()

M0_INTERNAL int m0_ha_link_init ( struct m0_ha_link hl,
struct m0_ha_link_cfg hl_cfg 
)

Definition at line 225 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_mod_fini()

M0_INTERNAL void m0_ha_link_mod_fini ( void  )

Definition at line 1738 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_mod_init()

M0_INTERNAL int m0_ha_link_mod_init ( void  )

Definition at line 1726 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_msg_is_delivered()

M0_INTERNAL bool m0_ha_link_msg_is_delivered ( struct m0_ha_link hl,
uint64_t  tag 
)

Definition at line 595 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_not_delivered_consume()

M0_INTERNAL uint64_t m0_ha_link_not_delivered_consume ( struct m0_ha_link hl)

Definition at line 618 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_params_invert()

M0_INTERNAL void m0_ha_link_params_invert ( struct m0_ha_link_params dst,
const struct m0_ha_link_params src 
)

Definition at line 67 of file link_fops.c.

Here is the caller graph for this function:

◆ m0_ha_link_quiesce()

M0_INTERNAL void m0_ha_link_quiesce ( struct m0_ha_link hl)

◆ m0_ha_link_reconnect_begin()

M0_INTERNAL void m0_ha_link_reconnect_begin ( struct m0_ha_link hl,
struct m0_ha_link_params lp 
)

Definition at line 422 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_reconnect_cancel()

M0_INTERNAL void m0_ha_link_reconnect_cancel ( struct m0_ha_link hl)

Definition at line 479 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_reconnect_end()

M0_INTERNAL void m0_ha_link_reconnect_end ( struct m0_ha_link hl,
const struct m0_ha_link_conn_cfg hl_conn_cfg 
)

Definition at line 441 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_reconnect_params()

M0_INTERNAL void m0_ha_link_reconnect_params ( const struct m0_ha_link_params lp_alive,
struct m0_ha_link_params lp_alive_new,
struct m0_ha_link_params lp_dead_new,
const struct m0_uint128 id_alive,
const struct m0_uint128 id_dead,
const struct m0_uint128 id_connection 
)

Definition at line 486 of file link.c.

Here is the caller graph for this function:

◆ m0_ha_link_recv()

M0_INTERNAL struct m0_ha_msg * m0_ha_link_recv ( struct m0_ha_link hl,
uint64_t *  tag 
)

Definition at line 568 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_rpc_endpoint()

M0_INTERNAL void m0_ha_link_rpc_endpoint ( struct m0_ha_link hl,
char *  buf,
m0_bcount_t  buf_len 
)

Definition at line 1716 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_rpc_session()

M0_INTERNAL struct m0_rpc_session * m0_ha_link_rpc_session ( struct m0_ha_link hl)

Definition at line 1711 of file link.c.

Here is the caller graph for this function:

◆ m0_ha_link_send()

M0_INTERNAL void m0_ha_link_send ( struct m0_ha_link hl,
const struct m0_ha_msg msg,
uint64_t *  tag 
)

Definition at line 556 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_deregister()

M0_INTERNAL void m0_ha_link_service_deregister ( struct m0_reqh_service service,
struct m0_ha_link hl 
)

Definition at line 235 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_find_get()

M0_INTERNAL struct m0_ha_link * m0_ha_link_service_find_get ( struct m0_reqh_service service,
const struct m0_uint128 link_id,
struct m0_uint128 connection_id 
)

Find link by link id and increase the link reference counter

Definition at line 157 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_fini()

M0_INTERNAL void m0_ha_link_service_fini ( struct m0_reqh_service hl_service)

Definition at line 298 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_init()

M0_INTERNAL int m0_ha_link_service_init ( struct m0_reqh_service **  hl_service,
struct m0_reqh reqh 
)

Definition at line 290 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_mod_fini()

M0_INTERNAL void m0_ha_link_service_mod_fini ( void  )

Definition at line 310 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_mod_init()

M0_INTERNAL int m0_ha_link_service_mod_init ( void  )

Definition at line 305 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_put()

M0_INTERNAL void m0_ha_link_service_put ( struct m0_reqh_service service,
struct m0_ha_link hl 
)

Definition at line 176 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_quiesce()

M0_INTERNAL void m0_ha_link_service_quiesce ( struct m0_reqh_service service,
struct m0_ha_link hl,
struct m0_chan chan 
)

Definition at line 197 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_service_register()

M0_INTERNAL void m0_ha_link_service_register ( struct m0_reqh_service service,
struct m0_ha_link hl,
const struct m0_uint128 link_id,
const struct m0_uint128 connection_id 
)

Definition at line 215 of file link_service.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_start()

M0_INTERNAL void m0_ha_link_start ( struct m0_ha_link hl,
struct m0_ha_link_conn_cfg hl_conn_cfg 
)

Definition at line 382 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_state_get()

M0_INTERNAL enum m0_ha_link_state m0_ha_link_state_get ( struct m0_ha_link hl)

Definition at line 537 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_state_name()

M0_INTERNAL const char * m0_ha_link_state_name ( enum m0_ha_link_state  state)

Definition at line 543 of file link.c.

Here is the caller graph for this function:

◆ m0_ha_link_stop()

M0_INTERNAL void m0_ha_link_stop ( struct m0_ha_link hl,
struct m0_clink clink 
)

Definition at line 412 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_tags_eq()

M0_INTERNAL bool m0_ha_link_tags_eq ( const struct m0_ha_link_tags tags1,
const struct m0_ha_link_tags tags2 
)

Definition at line 57 of file link_fops.c.

Here is the caller graph for this function:

◆ m0_ha_link_tags_initial()

M0_INTERNAL void m0_ha_link_tags_initial ( struct m0_ha_link_tags tags,
bool  tag_even 
)

Definition at line 44 of file link_fops.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_wait_arrival()

M0_INTERNAL void m0_ha_link_wait_arrival ( struct m0_ha_link hl)

Definition at line 709 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_wait_confirmation()

M0_INTERNAL void m0_ha_link_wait_confirmation ( struct m0_ha_link hl,
uint64_t  tag 
)

Definition at line 753 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_link_wait_delivery()

M0_INTERNAL void m0_ha_link_wait_delivery ( struct m0_ha_link hl,
uint64_t  tag 
)

Definition at line 669 of file link.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_dequeue()

M0_INTERNAL uint64_t m0_ha_lq_dequeue ( struct m0_ha_lq lq)

Definition at line 256 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_enqueue()

M0_INTERNAL uint64_t m0_ha_lq_enqueue ( struct m0_ha_lq lq,
const struct m0_ha_msg msg 
)

Definition at line 180 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_fini()

M0_INTERNAL void m0_ha_lq_fini ( struct m0_ha_lq lq)

Definition at line 67 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_has_next()

M0_INTERNAL bool m0_ha_lq_has_next ( const struct m0_ha_lq lq)

Definition at line 141 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_has_tag()

M0_INTERNAL bool m0_ha_lq_has_tag ( const struct m0_ha_lq lq,
uint64_t  tag 
)

Definition at line 101 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_init()

M0_INTERNAL void m0_ha_lq_init ( struct m0_ha_lq lq,
const struct m0_ha_lq_cfg lq_cfg 
)

Definition at line 58 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_invariant()

M0_INTERNAL bool m0_ha_lq_invariant ( const struct m0_ha_lq lq)

Definition at line 53 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_is_delivered()

M0_INTERNAL bool m0_ha_lq_is_delivered ( const struct m0_ha_lq lq,
uint64_t  tag 
)

Definition at line 148 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_mark_delivered()

M0_INTERNAL void m0_ha_lq_mark_delivered ( struct m0_ha_lq lq,
uint64_t  tag 
)

Definition at line 228 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_msg()

M0_INTERNAL struct m0_ha_msg * m0_ha_lq_msg ( struct m0_ha_lq lq,
uint64_t  tag 
)

Definition at line 109 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_msg_next()

M0_INTERNAL struct m0_ha_msg * m0_ha_lq_msg_next ( struct m0_ha_lq lq,
const struct m0_ha_msg cur 
)

Definition at line 119 of file lq.c.

Here is the call graph for this function:

◆ m0_ha_lq_msg_prev()

M0_INTERNAL struct m0_ha_msg * m0_ha_lq_msg_prev ( struct m0_ha_lq lq,
const struct m0_ha_msg cur 
)

Definition at line 130 of file lq.c.

Here is the call graph for this function:

◆ m0_ha_lq_next()

M0_INTERNAL struct m0_ha_msg * m0_ha_lq_next ( struct m0_ha_lq lq)

Definition at line 203 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tag_assign()

M0_INTERNAL uint64_t m0_ha_lq_tag_assign ( const struct m0_ha_lq lq)

Definition at line 156 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tag_confirmed()

M0_INTERNAL uint64_t m0_ha_lq_tag_confirmed ( const struct m0_ha_lq lq)

Definition at line 174 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tag_delivered()

M0_INTERNAL uint64_t m0_ha_lq_tag_delivered ( const struct m0_ha_lq lq)

Definition at line 168 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tag_next()

M0_INTERNAL uint64_t m0_ha_lq_tag_next ( const struct m0_ha_lq lq)

Definition at line 162 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tags_get()

M0_INTERNAL void m0_ha_lq_tags_get ( const struct m0_ha_lq lq,
struct m0_ha_link_tags tags 
)

Definition at line 80 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_tags_set()

M0_INTERNAL void m0_ha_lq_tags_set ( struct m0_ha_lq lq,
const struct m0_ha_link_tags tags 
)

Definition at line 87 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_lq_try_unnext()

M0_INTERNAL bool m0_ha_lq_try_unnext ( struct m0_ha_lq lq)

Definition at line 216 of file lq.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_mod_fini()

M0_INTERNAL void m0_ha_mod_fini ( void  )

Definition at line 1052 of file ha.c.

Here is the call graph for this function:

◆ m0_ha_mod_init()

M0_INTERNAL int m0_ha_mod_init ( void  )

Definition at line 1032 of file ha.c.

Here is the call graph for this function:

◆ m0_ha_msg_debug_print()

M0_INTERNAL void m0_ha_msg_debug_print ( const struct m0_ha_msg msg,
const char *  prefix 
)

Prints message content. Useful for debugging.

Definition at line 63 of file msg.c.

Here is the caller graph for this function:

◆ m0_ha_msg_eq()

M0_INTERNAL bool m0_ha_msg_eq ( const struct m0_ha_msg msg1,
const struct m0_ha_msg msg2 
)

Compares 2 m0_ha_msg. It's useful in tests.

Definition at line 46 of file msg.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_msg_queue_alloc()

M0_INTERNAL struct m0_ha_msg_qitem * m0_ha_msg_queue_alloc ( struct m0_ha_msg_queue mq)

Definition at line 54 of file msg_queue.c.

Here is the caller graph for this function:

◆ m0_ha_msg_queue_dequeue()

M0_INTERNAL struct m0_ha_msg_qitem * m0_ha_msg_queue_dequeue ( struct m0_ha_msg_queue mq)

Definition at line 75 of file msg_queue.c.

Here is the caller graph for this function:

◆ m0_ha_msg_queue_enqueue()

M0_INTERNAL void m0_ha_msg_queue_enqueue ( struct m0_ha_msg_queue mq,
struct m0_ha_msg_qitem qitem 
)

Definition at line 68 of file msg_queue.c.

Here is the caller graph for this function:

◆ m0_ha_msg_queue_find()

M0_INTERNAL struct m0_ha_msg_qitem * m0_ha_msg_queue_find ( struct m0_ha_msg_queue mq,
uint64_t  tag 
)

Definition at line 97 of file msg_queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_msg_queue_fini()

M0_INTERNAL void m0_ha_msg_queue_fini ( struct m0_ha_msg_queue mq)

Definition at line 48 of file msg_queue.c.

Here is the caller graph for this function:

◆ m0_ha_msg_queue_free()

M0_INTERNAL void m0_ha_msg_queue_free ( struct m0_ha_msg_queue mq,
struct m0_ha_msg_qitem qitem 
)

Definition at line 62 of file msg_queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_msg_queue_init()

M0_INTERNAL void m0_ha_msg_queue_init ( struct m0_ha_msg_queue mq,
struct m0_ha_msg_queue_cfg cfg 
)

Definition at line 42 of file msg_queue.c.

Here is the caller graph for this function:

◆ m0_ha_msg_queue_is_empty()

M0_INTERNAL bool m0_ha_msg_queue_is_empty ( struct m0_ha_msg_queue mq)

Definition at line 91 of file msg_queue.c.

◆ m0_ha_msg_queue_next()

M0_INTERNAL struct m0_ha_msg_qitem * m0_ha_msg_queue_next ( struct m0_ha_msg_queue mq,
const struct m0_ha_msg_qitem cur 
)

Definition at line 105 of file msg_queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_msg_queue_prev()

M0_INTERNAL struct m0_ha_msg_qitem * m0_ha_msg_queue_prev ( struct m0_ha_msg_queue mq,
const struct m0_ha_msg_qitem cur 
)

Definition at line 113 of file msg_queue.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_msg_queue_push_front()

M0_INTERNAL void m0_ha_msg_queue_push_front ( struct m0_ha_msg_queue mq,
struct m0_ha_msg_qitem qitem 
)

Definition at line 85 of file msg_queue.c.

◆ m0_ha_msg_tag()

M0_INTERNAL uint64_t m0_ha_msg_tag ( const struct m0_ha_msg msg)

Returns m0_ha_msg tag.

Definition at line 36 of file msg.c.

Here is the caller graph for this function:

◆ m0_ha_msg_type_get()

M0_INTERNAL enum m0_ha_msg_type m0_ha_msg_type_get ( const struct m0_ha_msg msg)

Returns m0_ha_msg type

Definition at line 41 of file msg.c.

Here is the caller graph for this function:

◆ m0_ha_outgoing_link()

M0_INTERNAL struct m0_ha_link * m0_ha_outgoing_link ( struct m0_ha ha)

Definition at line 1006 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_outgoing_session()

M0_INTERNAL struct m0_rpc_session * m0_ha_outgoing_session ( struct m0_ha ha)

Definition at line 1016 of file ha.c.

Here is the call graph for this function:

◆ m0_ha_process_failed()

M0_INTERNAL void m0_ha_process_failed ( struct m0_ha ha,
const struct m0_fid process_fid 
)

Definition at line 972 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_rpc_endpoint()

M0_INTERNAL void m0_ha_rpc_endpoint ( struct m0_ha ha,
struct m0_ha_link hl,
char *  buf,
m0_bcount_t  buf_len 
)

Definition at line 1024 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_send()

M0_INTERNAL void m0_ha_send ( struct m0_ha ha,
struct m0_ha_link hl,
const struct m0_ha_msg msg,
uint64_t *  tag 
)

Definition at line 862 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_start()

M0_INTERNAL int m0_ha_start ( struct m0_ha ha)

Definition at line 659 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_stop()

M0_INTERNAL void m0_ha_stop ( struct m0_ha ha)

Definition at line 672 of file ha.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_ut_cookie()

void m0_ha_ut_cookie ( void  )

Definition at line 38 of file cookie.c.

Here is the call graph for this function:

◆ m0_ha_ut_entrypoint_client()

void m0_ha_ut_entrypoint_client ( void  )

Definition at line 253 of file entrypoint.c.

Here is the call graph for this function:

◆ m0_ha_ut_entrypoint_usecase()

void m0_ha_ut_entrypoint_usecase ( void  )

Definition at line 199 of file entrypoint.c.

Here is the call graph for this function:

◆ m0_ha_ut_ha_usecase()

void m0_ha_ut_ha_usecase ( void  )

Definition at line 213 of file ha.c.

Here is the call graph for this function:

◆ m0_ha_ut_link_multithreaded()

void m0_ha_ut_link_multithreaded ( void  )

Definition at line 299 of file link.c.

Here is the call graph for this function:

◆ m0_ha_ut_link_reconnect_multiple()

void m0_ha_ut_link_reconnect_multiple ( void  )

Definition at line 581 of file link.c.

Here is the call graph for this function:

◆ m0_ha_ut_link_reconnect_simple()

void m0_ha_ut_link_reconnect_simple ( void  )

Definition at line 483 of file link.c.

Here is the call graph for this function:

◆ m0_ha_ut_link_usecase()

void m0_ha_ut_link_usecase ( void  )

Definition at line 148 of file link.c.

Here is the call graph for this function:

◆ m0_ha_ut_lq()

void m0_ha_ut_lq ( void  )

Definition at line 40 of file lq.c.

Here is the call graph for this function:

◆ m0_ha_ut_lq_mark_delivered()

void m0_ha_ut_lq_mark_delivered ( void  )

Definition at line 133 of file lq.c.

Here is the call graph for this function:

◆ m0_ha_ut_msg_queue()

void m0_ha_ut_msg_queue ( void  )

Definition at line 44 of file msg_queue.c.

Here is the call graph for this function:

◆ m0_ha_ut_rpc_ctx_fini()

M0_INTERNAL void m0_ha_ut_rpc_ctx_fini ( struct m0_ha_ut_rpc_ctx ctx)

Definition at line 73 of file helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_ut_rpc_ctx_init()

M0_INTERNAL void m0_ha_ut_rpc_ctx_init ( struct m0_ha_ut_rpc_ctx ctx)

Definition at line 41 of file helper.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_ha_ut_rpc_session_ctx_fini()

M0_INTERNAL void m0_ha_ut_rpc_session_ctx_fini ( struct m0_ha_ut_rpc_session_ctx sctx)

Definition at line 98 of file helper.c.

Here is the call graph for this function:

◆ m0_ha_ut_rpc_session_ctx_init()

M0_INTERNAL void m0_ha_ut_rpc_session_ctx_init ( struct m0_ha_ut_rpc_session_ctx sctx,
struct m0_ha_ut_rpc_ctx ctx 
)

Definition at line 84 of file helper.c.

Here is the call graph for this function:

◆ m0_halon_interface_delivered()

void m0_halon_interface_delivered ( struct m0_halon_interface hi,
struct m0_ha_link hl,
const struct m0_ha_msg msg 
)

Notifies remote side that the message is delivered. The remote side will not resend the message if Halon crashes and then m0d reconnects again after this call.

  • this function should be called for all messages received in msg_received_cb();
  • this function can be called from the msg_received_cb() callback.

Definition at line 1125 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_disconnect()

void m0_halon_interface_disconnect ( struct m0_halon_interface hi,
struct m0_ha_link hl 
)

Notifies m0_halon_interface that no m0_halon_interface_send() will be called for this link.

The function should be called after link_is_disconnecting_cb() is called.

Definition at line 1159 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_entrypoint_reply()

void m0_halon_interface_entrypoint_reply ( struct m0_halon_interface hi,
const struct m0_uint128 req_id,
int  rc,
uint32_t  confd_nr,
const struct m0_fid confd_fid_data,
const char **  confd_eps_data,
uint32_t  confd_quorum,
const struct m0_fid rm_fid,
const char *  rm_eps 
)

Sends entrypoint reply.

Parameters
req_idrequest id received in the entrypoint_request_cb()
rcreturn code for the entrypoint. It's delivered to the user
confd_nrnumber of confds
confd_fid_dataarray of confd fids
confd_eps_dataarray of confd endpoints
confd_quorumconfd quorum for rconfc.
See also
m0_rconfc::rc_quorum
Parameters
rm_fidActive RM fid
rp_epsActive RM endpoint
Note
This function can be called from entrypoint_request_cb().

Definition at line 1059 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_fini()

void m0_halon_interface_fini ( struct m0_halon_interface hi)

Finalises everything has been initialised during the init() call. Motr functions shouldn't be used after this call.

Note
This function should be called from the exactly the same thread init() has been called.
See also
m0_halon_interface_init()

Definition at line 627 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_halon_interface_init()

int m0_halon_interface_init ( struct m0_halon_interface **  hi_out,
const char *  build_git_rev_id,
const char *  build_configure_opts,
const char *  debug_options,
const char *  node_uuid 
)

Motr is ready to work after the call.

This function also compares given version against current library version. It detects if the given version is compatible with the current version.

Parameters
hithis structure should be zeroed.
build_git_rev_id
See also
m0_build_info::bi_git_rev_id
Parameters
build_configure_opts
See also
m0_build_info::bi_configure_opts
Parameters
debug_optionsoptions that affect debugging. See below.
node_uuidnode UUID string.
See also
lib/uuid.h.

Debug options (double quotes here are only for clarification):

  • "disable-compatibility-check" Don't verify compatibility of Motr and Halon versions.
  • "log-entrypoint" Log steps of entrypoint request/reply processing (M0_WARN logging level).
  • "log-link" Log life cycle of m0_ha_link (M0_WARN level).
  • "log-msg" Log info about sent/received messages, including delivery status (M0_WARN level).

The options can appear anywhere in the string, the code checks if the option is present with strstr(). Example: "log-link, log-msg".

Definition at line 583 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_halon_interface_reqh()

struct m0_reqh * m0_halon_interface_reqh ( struct m0_halon_interface hi)

Returns request handler created during m0_halon_interface_start(). Returns NULL if m0_halon_interface is not in WORKING state.

The reqh should not be used after m0_halon_interface_stop() is called.

Note
This function may be removed in the future. It exists only to make m0_reqh available for Spiel.
See also
m0_halon_interface_rpc_machine()

Definition at line 1204 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_rpc_machine()

struct m0_rpc_machine * m0_halon_interface_rpc_machine ( struct m0_halon_interface hi)

Returns rpc machine created during m0_halon_interface_start(). Returns NULL if m0_halon_interface is not in WORKING state.

The rpc machine should not be used after m0_halon_interface_stop() is called.

Note
This function may be removed in the future. It exists only to make m0_rpc_machine available for Spiel.

Definition at line 1188 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_send()

void m0_halon_interface_send ( struct m0_halon_interface hi,
struct m0_ha_link hl,
const struct m0_ha_msg msg,
uint64_t *  tag 
)

Send m0_ha_msg using m0_ha_link.

Parameters
hlm0_ha_link to send
msgmsg to send
tagmessage tag is returned here.

Definition at line 1099 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_spiel()

struct m0_spiel * m0_halon_interface_spiel ( struct m0_halon_interface hi)

Returns spiel instance initialised during m0_halon_interface_start(). Returns NULL if m0_halon_interface is not in WORKING state.

The spiel instance should not be used after m0_halon_interface_stop() is called.

Definition at line 1220 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_start()

int m0_halon_interface_start ( struct m0_halon_interface hi,
const char *  local_rpc_endpoint,
const struct m0_fid process_fid,
const struct m0_fid ha_service_fid,
const struct m0_fid rm_service_fid,
void(*)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, const char *remote_rpc_endpoint, const struct m0_fid *process_fid, const char *git_rev_id, uint64_t pid, bool first_request)  entrypoint_request_cb,
void(*)(struct m0_halon_interface *hi, struct m0_ha_link *hl, const struct m0_ha_msg *msg, uint64_t tag msg_received_cb,
void(*)(struct m0_halon_interface *hi, struct m0_ha_link *hl, uint64_t tag msg_is_delivered_cb,
void(*)(struct m0_halon_interface *hi, struct m0_ha_link *hl, uint64_t tag msg_is_not_delivered_cb,
void(*)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, struct m0_ha_link *link)  link_connected_cb,
void(*)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id, struct m0_ha_link *link)  link_reused_cb,
void(*)(struct m0_halon_interface *hi, const struct m0_uint128 *req_id)  link_absent_cb,
void(*)(struct m0_halon_interface *hi, struct m0_ha_link *link)  link_is_disconnecting_cb,
void(*)(struct m0_halon_interface *hi, struct m0_ha_link *link)  link_disconnected_cb 
)

Starts everything needed to handle entrypoint requests and m0_ha_msg send/recv.

Parameters
local_rpc_endpointthe function creates local rpc machine with this endpoint in the current process. All network communications using this m0_halon_interface uses this rpc machine.
process_fidprocess fid of the current process
ha_service_fidHA service fid inside the current process
rm_service_fidRM service fid inside the current process
entrypoint_request_cbthis callback is executed when entrypoint request arrives.
msg_received_cbthis callback is executed when a new message arrives.
  • entrypoint_request_cb()
  • msg_received_cb()
  • msg_is_delivered_cb()
    • it's called when the message is delivered to the destination;
  • msg_is_not_delivered_cb()
    • it's called when the message is not guaranteed to be delivered to the destination.
  • link_connected_cb()
    • it's called when a new link is established;
  • link_reused_cb()
    • it's called when an existing link is reused for the entrypoint request made with req_id;
  • link_is_disconnecting_cb()
    • it's called when link is starting to disconnect from the opposite endpoint. After m0_halon_interface_disconnect() is called for the link and msg_is_delivered_cb() or msg_is_not_delivered_cb() is called for the each message sent over the link link_is_disconnected_cb() is executed;
  • link_is_disconnected_cb()
    • it's called at the end of m0_ha_link lifetime. m0_halon_interface_send() shouldn't be called for the link after this callback is executed. msg_received_cb(), msg_is_delivered_cb() and msg_is_not_delivered_cb() are not going to be called for the link after the callback is executed.

Definition at line 948 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_halon_interface_stop()

void m0_halon_interface_stop ( struct m0_halon_interface hi)

Stops sending/receiving messages and entrypoint requests.

Definition at line 1040 of file interface.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_halon_interface_thread_adopt()

M0_INTERNAL int m0_halon_interface_thread_adopt ( struct m0_halon_interface hi,
struct m0_thread thread 
)

Definition at line 1236 of file interface.c.

Here is the call graph for this function:

◆ m0_halon_interface_thread_shun()

M0_INTERNAL void m0_halon_interface_thread_shun ( void  )

Definition at line 1250 of file interface.c.

Here is the call graph for this function:

◆ M0_TL_DEFINE() [1/6]

M0_TL_DEFINE ( ha_mq  ,
static  ,
struct m0_ha_msg_qitem   
)

◆ M0_TL_DEFINE() [2/6]

M0_TL_DEFINE ( ha_link_svc  ,
static  ,
struct m0_ha_link   
)

◆ M0_TL_DEFINE() [3/6]

M0_TL_DEFINE ( hg_client  ,
static  ,
struct ha_client   
)

◆ M0_TL_DEFINE() [4/6]

M0_TL_DEFINE ( ham  ,
static  ,
struct m0_ha_epoch_monitor   
)

◆ M0_TL_DEFINE() [5/6]

M0_TL_DEFINE ( ha_links  ,
static  ,
struct ha_link_ctx   
)

◆ M0_TL_DEFINE() [6/6]

M0_TL_DEFINE ( hes_req  ,
static  ,
struct ha_entrypoint_server_fom   
)

◆ M0_TL_DESCR_DEFINE() [1/6]

M0_TL_DESCR_DEFINE ( ha_mq  ,
"m0_ha_msg_queue::mq_queue"  ,
static  ,
struct m0_ha_msg_qitem  ,
hmq_link  ,
hmq_magic  ,
M0_HA_MSG_QITEM_MAGIC  ,
M0_HA_MSG_QUEUE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [2/6]

M0_TL_DESCR_DEFINE ( ha_link_svc  ,
"ha_link_service::hls_links"  ,
static  ,
struct m0_ha_link  ,
hln_service_link  ,
hln_service_magic  ,
M0_HA_LINK_SERVICE_LINK_MAGIC  ,
M0_HA_LINK_SERVICE_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [3/6]

M0_TL_DESCR_DEFINE ( hg_client  ,
"ha global clients list ,
static  ,
struct ha_client  ,
hc_link  ,
hc_magic  ,
M0_HA_CLIENT_MAGIC  ,
M0_HA_CLIENT_HEAD_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [4/6]

M0_TL_DESCR_DEFINE ( ham  ,
"ha epoch monitor"  ,
static  ,
struct m0_ha_epoch_monitor  ,
hem_linkage  ,
hem_magix  ,
M0_HA_EPOCH_MONITOR_MAGIC  ,
M0_HA_DOMAIN_MAGIC   
)

◆ M0_TL_DESCR_DEFINE() [5/6]

M0_TL_DESCR_DEFINE ( ha_links  ,
"m0_ha::h_links_{incoming,outgoing}"  ,
static  ,
struct ha_link_ctx  ,
hlx_tlink  ,
hlx_magic  ,
,
 
)

◆ M0_TL_DESCR_DEFINE() [6/6]

M0_TL_DESCR_DEFINE ( hes_req  ,
"m0_ha_entrypoint_server::hes_requests"  ,
static  ,
struct ha_entrypoint_server_fom  ,
esf_tlink  ,
esf_magic  ,
10  ,
11   
)

◆ M0_UT_THREADS_DEFINE()

M0_UT_THREADS_DEFINE ( ha_ut_link_mt  ,
ha_ut_link_mt_thread 
)

◆ M0_XCA_DOMAIN()

struct m0_ha_cookie_xc M0_XCA_DOMAIN ( rpc  )

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 37 of file main.c.

Here is the call graph for this function:

Variable Documentation

◆ ha_entrypoint_client_fom_ops

const struct m0_fom_ops ha_entrypoint_client_fom_ops
static
Initial value:
= {
.fo_home_locality = ha_entrypoint_client_fom_locality,
}
static int ha_entrypoint_client_fom_tick(struct m0_fom *fom)
Definition: entrypoint.c:514
static void ha_entrypoint_client_fom_fini(struct m0_fom *fom)
Definition: entrypoint.c:662
static size_t ha_entrypoint_client_fom_locality(const struct m0_fom *fom)
Definition: entrypoint.c:690

Definition at line 701 of file entrypoint.c.

◆ ha_entrypoint_client_fom_states

struct m0_sm_state_descr ha_entrypoint_client_fom_states[]
static
Initial value:
= {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "HEC_FOM_INIT",
.sd_allowed = M0_BITS(HEC_FOM_FINI),
},
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "HEC_FOM_FINI",
.sd_allowed = 0,
},
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 403 of file entrypoint.c.

◆ ha_entrypoint_client_fom_states_conf

struct m0_sm_conf ha_entrypoint_client_fom_states_conf
static
Initial value:
= {
.scf_name = "entrypoint client fom",
}
static struct m0_sm_state_descr ha_entrypoint_client_fom_states[]
Definition: entrypoint.c:403
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 416 of file entrypoint.c.

◆ ha_entrypoint_client_fom_type

struct m0_fom_type ha_entrypoint_client_fom_type
static

Definition at line 695 of file entrypoint.c.

◆ ha_entrypoint_client_fom_type_ops

const struct m0_fom_type_ops ha_entrypoint_client_fom_type_ops
static
Initial value:
= {
.fto_create = NULL,
}
#define NULL
Definition: misc.h:38

Definition at line 697 of file entrypoint.c.

◆ ha_entrypoint_client_item_ops

struct m0_rpc_item_ops ha_entrypoint_client_item_ops
static
Initial value:
= {
}
static void ha_entrypoint_client_replied(struct m0_rpc_item *item)
Definition: entrypoint.c:476

Definition at line 497 of file entrypoint.c.

◆ ha_entrypoint_client_states

struct m0_sm_state_descr ha_entrypoint_client_states[]
static

Definition at line 328 of file entrypoint.c.

◆ ha_entrypoint_client_states_conf

struct m0_sm_conf ha_entrypoint_client_states_conf
static
Initial value:
= {
.scf_name = "m0_ha_entrypoint_client::ecl_sm",
}
static struct m0_sm_state_descr ha_entrypoint_client_states[]
Definition: entrypoint.c:328
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 392 of file entrypoint.c.

◆ ha_entrypoint_get_fom_ops

const struct m0_fom_ops ha_entrypoint_get_fom_ops
Initial value:
= {
.fo_home_locality = ha_entrypoint_home_locality,
}
static int ha_entrypoint_get_fom_tick(struct m0_fom *fom)
Definition: entrypoint.c:872
static size_t ha_entrypoint_home_locality(const struct m0_fom *fom)
Definition: entrypoint.c:856
static void ha_entrypoint_fom_fini(struct m0_fom *fom)
Definition: entrypoint.c:861

Definition at line 914 of file entrypoint.c.

◆ ha_entrypoint_server_fom_states

struct m0_sm_state_descr ha_entrypoint_server_fom_states[]
static
Initial value:
= {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "M0_HES_INIT",
.sd_allowed = M0_BITS(M0_HES_REPLY_WAIT),
},
.sd_flags = 0,
.sd_name = "M0_HES_REPLY_WAIT",
.sd_allowed = M0_BITS(M0_HES_FINI),
},
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "M0_HES_FINI",
.sd_allowed = 0,
},
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 170 of file entrypoint.c.

◆ ha_entrypoint_service_ops

const struct m0_reqh_service_ops ha_entrypoint_service_ops
static
Initial value:
= {
}
static int ha_entrypoint_service_start(struct m0_reqh_service *service)
Definition: entrypoint.c:101
static void ha_entrypoint_service_stop(struct m0_reqh_service *service)
Definition: entrypoint.c:114
static int ha_entrypoint_service_fop_accept(struct m0_reqh_service *service, struct m0_fop *fop)
Definition: entrypoint.c:107
static void ha_entrypoint_service_fini(struct m0_reqh_service *service)
Definition: entrypoint.c:89

Definition at line 120 of file entrypoint.c.

◆ ha_entrypoint_stype_ops

const struct m0_reqh_service_type_ops ha_entrypoint_stype_ops
static
Initial value:
= {
.rsto_service_allocate = ha_entrypoint_service_allocate,
}
static int ha_entrypoint_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: entrypoint.c:143

Definition at line 131 of file entrypoint.c.

◆ ha_levels

static const struct m0_modlev ha_levels
static

Definition at line 363 of file ha.c.

◆ ha_link_incoming_fom_ops

const struct m0_fom_ops ha_link_incoming_fom_ops
Initial value:
= {
.fo_home_locality = &ha_link_incoming_fom_locality,
}
static size_t ha_link_incoming_fom_locality(const struct m0_fom *fom)
Definition: link.c:1008
static void ha_link_incoming_fom_fini(struct m0_fom *fom)
Definition: link.c:998
static int ha_link_incoming_fom_tick(struct m0_fom *fom)
Definition: link.c:916

Definition at line 1013 of file link.c.

◆ ha_link_outgoing_fom_conf

const struct m0_sm_conf ha_link_outgoing_fom_conf
static
Initial value:
= {
.scf_name = "ha_link_outgoing_fom",
}
static struct m0_sm_state_descr ha_link_outgoing_fom_states[HA_LINK_OUTGOING_STATE_NR]
Definition: link.c:1082
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 1127 of file link.c.

◆ ha_link_outgoing_fom_ops

const struct m0_fom_ops ha_link_outgoing_fom_ops
Initial value:
= {
.fo_home_locality = &ha_link_outgoing_fom_locality,
}
static void ha_link_outgoing_fom_fini(struct m0_fom *fom)
Definition: link.c:1665
static size_t ha_link_outgoing_fom_locality(const struct m0_fom *fom)
Definition: link.c:1676
static int ha_link_outgoing_fom_tick(struct m0_fom *fom)
Definition: link.c:1346

Definition at line 1681 of file link.c.

◆ ha_link_outgoing_fom_states

struct m0_sm_state_descr ha_link_outgoing_fom_states[HA_LINK_OUTGOING_STATE_NR]
static

Definition at line 1082 of file link.c.

◆ ha_link_outgoing_fom_type

struct m0_fom_type ha_link_outgoing_fom_type
static

Definition at line 192 of file link.c.

◆ ha_link_outgoing_item_ops

const struct m0_rpc_item_ops ha_link_outgoing_item_ops
static
Initial value:
= {
}
static void ha_link_outgoing_item_sent(struct m0_rpc_item *item)
Definition: link.c:1133
static void ha_link_outgoing_item_replied(struct m0_rpc_item *item)
Definition: link.c:1144

Definition at line 1164 of file link.c.

◆ ha_link_service_bob_type

const struct m0_bob_type ha_link_service_bob_type
static
Initial value:
= {
.bt_name = "m0_ha_link_service",
.bt_magix_offset = M0_MAGIX_OFFSET(struct ha_link_service, hls_magic),
}
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 61 of file link_service.c.

◆ ha_link_service_ops

const struct m0_reqh_service_ops ha_link_service_ops
static
Initial value:
= {
.rso_start = ha_link_service_start,
.rso_fop_accept = ha_link_service_fop_accept,
.rso_stop = ha_link_service_stop,
.rso_fini = ha_link_service_fini,
}
static int ha_link_service_start(struct m0_reqh_service *service)
Definition: link_service.c:104
static void ha_link_service_fini(struct m0_reqh_service *service)
Definition: link_service.c:90
static void ha_link_service_stop(struct m0_reqh_service *service)
Definition: link_service.c:117
static int ha_link_service_fop_accept(struct m0_reqh_service *service, struct m0_fop *fop)
Definition: link_service.c:110

Definition at line 249 of file link_service.c.

◆ ha_link_sm_conf

struct m0_sm_conf ha_link_sm_conf
static
Initial value:
= {
.scf_name = "m0_ha_link::hln_sm",
.scf_nr_states = ARRAY_SIZE(ha_link_sm_states),
.scf_state = ha_link_sm_states,
}
static struct m0_sm_state_descr ha_link_sm_states[]
Definition: link.c:118
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 186 of file link.c.

◆ ha_link_sm_states

struct m0_sm_state_descr ha_link_sm_states[]
static

Definition at line 118 of file link.c.

◆ ha_link_stype_ops

const struct m0_reqh_service_type_ops ha_link_stype_ops
static
Initial value:
= {
.rsto_service_allocate = ha_link_service_allocate,
}
static int ha_link_service_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: link_service.c:270

Definition at line 259 of file link_service.c.

◆ ha_mod_levels

static const struct m0_modlev ha_mod_levels
static
Initial value:
= {
.ml_name = "M0_HA_MOD_LEVEL_ASSIGNS",
.ml_enter = ha_mod_level_enter,
.ml_leave = ha_mod_level_leave,
},
.ml_name = "M0_HA_MOD_LEVEL_LINK_SERVICE",
.ml_enter = ha_mod_level_enter,
.ml_leave = ha_mod_level_leave,
},
.ml_name = "M0_HA_MOD_LEVEL_LINK",
.ml_enter = ha_mod_level_enter,
.ml_leave = ha_mod_level_leave,
},
.ml_name = "M0_HA_MOD_LEVEL_ENTRYPOINT",
.ml_enter = ha_mod_level_enter,
.ml_leave = ha_mod_level_leave,
},
.ml_name = "M0_HA_MOD_LEVEL_STARTED",
},
}
static int ha_mod_level_enter(struct m0_module *module)
Definition: ha.c:887
static void ha_mod_level_leave(struct m0_module *module)
Definition: ha.c:913

Definition at line 885 of file ha.c.

◆ ha_ut

struct m0_ut_suite ha_ut
Initial value:
= {
.ts_name = "ha-ut",
.ts_init = NULL,
.ts_fini = NULL,
.ts_tests = {
{ "cookie", &m0_ha_ut_cookie },
{ "msg_queue", &m0_ha_ut_msg_queue },
{ "lq", &m0_ha_ut_lq },
{ "lq-mark_delivered", &m0_ha_ut_lq_mark_delivered },
{ "link-usecase", &m0_ha_ut_link_usecase },
{ "link-multithreaded", &m0_ha_ut_link_multithreaded },
{ "link-reconnect_simple", &m0_ha_ut_link_reconnect_simple },
{ "link-reconnect_multiple",&m0_ha_ut_link_reconnect_multiple },
{ "entrypoint-usecase", &m0_ha_ut_entrypoint_usecase },
{ "entrypoint-client", &m0_ha_ut_entrypoint_client },
{ "ha-usecase", &m0_ha_ut_ha_usecase },
{ NULL, NULL },
},
}
void m0_ha_ut_cookie(void)
Definition: cookie.c:38
#define NULL
Definition: misc.h:38
void m0_ha_ut_entrypoint_client(void)
Definition: entrypoint.c:253
void m0_ha_ut_msg_queue(void)
Definition: msg_queue.c:44
void m0_ha_ut_lq_mark_delivered(void)
Definition: lq.c:133
void m0_ha_ut_entrypoint_usecase(void)
Definition: entrypoint.c:199
void m0_ha_ut_lq(void)
Definition: lq.c:40
void m0_ha_ut_link_reconnect_simple(void)
Definition: link.c:483
void m0_ha_ut_link_multithreaded(void)
Definition: link.c:299
void m0_ha_ut_link_reconnect_multiple(void)
Definition: link.c:581
void m0_ha_ut_ha_usecase(void)
Definition: ha.c:213
void m0_ha_ut_link_usecase(void)
Definition: link.c:148

Definition at line 49 of file main.c.

◆ ha_ut_usecase_ha_ops

const struct m0_ha_ops ha_ut_usecase_ha_ops
static
Initial value:
= {
.hao_entrypoint_request = ha_ut_usecase_entrypoint_request,
.hao_entrypoint_replied = ha_ut_usecase_entrypoint_replied,
.hao_msg_received = ha_ut_usecase_msg_received,
.hao_msg_is_delivered = ha_ut_usecase_msg_is_delivered,
.hao_msg_is_not_delivered = ha_ut_usecase_msg_is_not_delivered,
.hao_link_connected = ha_ut_usecase_link_connected,
.hao_link_reused = ha_ut_usecase_link_reused,
.hao_link_is_disconnecting = ha_ut_usecase_link_is_disconnecting,
.hao_link_disconnected = ha_ut_usecase_link_disconnected,
}
static void ha_ut_usecase_link_disconnected(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: ha.c:178
static void ha_ut_usecase_msg_is_not_delivered(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: ha.c:139
static void ha_ut_usecase_msg_is_delivered(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: ha.c:133
static void ha_ut_usecase_entrypoint_replied(struct m0_ha *ha, struct m0_ha_entrypoint_rep *rep)
Definition: ha.c:113
static void ha_ut_usecase_link_reused(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: ha.c:156
static void ha_ut_usecase_link_connected(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: ha.c:145
static void ha_ut_usecase_entrypoint_request(struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
Definition: ha.c:88
static void ha_ut_usecase_link_is_disconnecting(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: ha.c:167
static void ha_ut_usecase_msg_received(struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
Definition: ha.c:126

Definition at line 201 of file ha.c.

◆ halon_interface_bob_type

const struct m0_bob_type halon_interface_bob_type
static
Initial value:
= {
.bt_name = "halon interface",
.bt_magix_offset = M0_MAGIX_OFFSET(struct m0_halon_interface_internal,
hii_magix),
}
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 192 of file interface.c.

◆ halon_interface_ha_ops

const struct m0_ha_ops halon_interface_ha_ops
static
Initial value:
= {
.hao_entrypoint_request = &halon_interface_entrypoint_request_cb,
.hao_entrypoint_replied = &halon_interface_entrypoint_replied_cb,
.hao_msg_received = &halon_interface_msg_received_cb,
.hao_msg_is_delivered = &halon_interface_msg_is_delivered_cb,
.hao_msg_is_not_delivered = &halon_interface_msg_is_not_delivered_cb,
.hao_link_connected = &halon_interface_link_connected_cb,
.hao_link_reused = &halon_interface_link_reused_cb,
.hao_link_absent = &halon_interface_link_absent_cb,
.hao_link_is_disconnecting = &halon_interface_link_is_disconnecting_cb,
.hao_link_disconnected = &halon_interface_link_disconnected_cb,
}
static void halon_interface_link_connected_cb(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: interface.c:457
static void halon_interface_link_is_disconnecting_cb(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: interface.c:512
static void halon_interface_msg_is_delivered_cb(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: interface.c:421
static void halon_interface_entrypoint_replied_cb(struct m0_ha *ha, struct m0_ha_entrypoint_rep *rep)
Definition: interface.c:378
static void halon_interface_link_disconnected_cb(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: interface.c:527
static void halon_interface_link_reused_cb(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: interface.c:477
static void halon_interface_msg_is_not_delivered_cb(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: interface.c:439
static void halon_interface_msg_received_cb(struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
Definition: interface.c:391
static void halon_interface_link_absent_cb(struct m0_ha *ha, const struct m0_uint128 *req_id)
Definition: interface.c:497
static void halon_interface_entrypoint_request_cb(struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
Definition: interface.c:347

Definition at line 542 of file interface.c.

◆ halon_interface_levels

static const struct m0_modlev halon_interface_levels
static

Definition at line 667 of file interface.c.

◆ halon_interface_sm_conf

struct m0_sm_conf halon_interface_sm_conf
static
Initial value:
= {
.scf_name = "m0_halon_interface_internal::hii_sm",
.scf_state = halon_interface_states,
}
static struct m0_sm_state_descr halon_interface_states[]
Definition: interface.c:555
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 577 of file interface.c.

◆ halon_interface_states

struct m0_sm_state_descr halon_interface_states[]
static
Initial value:
= {
.sd_flags = M0_SDF_INITIAL,
.sd_name = "M0_HALON_INTERFACE_STATE_UNINITIALISED",
},
.sd_name = "M0_HALON_INTERFACE_STATE_INITIALISED",
},
.sd_name = "M0_HALON_INTERFACE_STATE_WORKING",
},
.sd_flags = M0_SDF_TERMINAL,
.sd_name = "M0_HALON_INTERFACE_STATE_FINALISED",
.sd_allowed = 0,
},
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 555 of file interface.c.

◆ m0_ha_cookie_no_record [1/2]

const struct m0_ha_cookie m0_ha_cookie_no_record
Initial value:
= {
.hc_pid = UINT64_MAX,
.hc_time_start = UINT64_MAX,
.hc_uptime = UINT64_MAX,
}
#define UINT64_MAX
Definition: types.h:44
#define M0_UINT128(hi, lo)
Definition: types.h:40

Definition at line 40 of file cookie.c.

◆ m0_ha_cookie_no_record [2/2]

const struct m0_ha_cookie m0_ha_cookie_no_record

Definition at line 40 of file cookie.c.

◆ m0_ha_entrypoint_fom_type_ops [1/2]

const struct m0_fom_type_ops m0_ha_entrypoint_fom_type_ops

Definition at line 959 of file entrypoint.c.

◆ m0_ha_entrypoint_fom_type_ops [2/2]

const struct m0_fom_type_ops m0_ha_entrypoint_fom_type_ops
Initial value:
= {
.fto_create = &ha_entrypoint_fom_create,
}
static int ha_entrypoint_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: entrypoint.c:920

Definition at line 959 of file entrypoint.c.

◆ m0_ha_entrypoint_rep_fopt [1/2]

struct m0_fop_type m0_ha_entrypoint_rep_fopt

Definition at line 48 of file entrypoint_fops.c.

◆ m0_ha_entrypoint_rep_fopt [2/2]

struct m0_fop_type m0_ha_entrypoint_rep_fopt

Definition at line 48 of file entrypoint_fops.c.

◆ m0_ha_entrypoint_req_fopt [1/2]

struct m0_fop_type m0_ha_entrypoint_req_fopt

Definition at line 47 of file entrypoint_fops.c.

◆ m0_ha_entrypoint_req_fopt [2/2]

struct m0_fop_type m0_ha_entrypoint_req_fopt

Definition at line 47 of file entrypoint_fops.c.

◆ m0_ha_entrypoint_server_fom_states_conf [1/2]

struct m0_sm_conf m0_ha_entrypoint_server_fom_states_conf
Initial value:
= {
.scf_name = "entrypoint server fom",
}
static struct m0_sm_state_descr ha_entrypoint_server_fom_states[]
Definition: entrypoint.c:170
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 188 of file entrypoint.c.

◆ m0_ha_entrypoint_server_fom_states_conf [2/2]

struct m0_sm_conf m0_ha_entrypoint_server_fom_states_conf

Definition at line 188 of file entrypoint.c.

◆ m0_ha_entrypoint_service_type [1/2]

struct m0_reqh_service_type m0_ha_entrypoint_service_type
Initial value:
= {
.rst_name = "ha-entrypoint-service",
.rst_keep_alive = true,
}
static const struct m0_reqh_service_type_ops ha_entrypoint_stype_ops
Definition: entrypoint.c:131

Definition at line 135 of file entrypoint.c.

◆ m0_ha_entrypoint_service_type [2/2]

struct m0_reqh_service_type m0_ha_entrypoint_service_type

Definition at line 135 of file entrypoint.c.

◆ M0_HA_EPOCH_NONE [1/2]

M0_INTERNAL const uint64_t M0_HA_EPOCH_NONE = 0ULL

Definition at line 77 of file epoch.c.

◆ M0_HA_EPOCH_NONE [2/2]

M0_EXTERN const uint64_t M0_HA_EPOCH_NONE

Value used when epoch number is unknown or irrelevant.

Definition at line 157 of file epoch.h.

◆ m0_ha_link_incoming_fom_type_ops [1/2]

const struct m0_fom_type_ops m0_ha_link_incoming_fom_type_ops

Definition at line 1056 of file link.c.

◆ m0_ha_link_incoming_fom_type_ops [2/2]

const struct m0_fom_type_ops m0_ha_link_incoming_fom_type_ops
Initial value:
= {
}
static int ha_link_incoming_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: link.c:1019

Definition at line 1056 of file link.c.

◆ m0_ha_link_msg_fopt [1/2]

struct m0_fop_type m0_ha_link_msg_fopt

Definition at line 41 of file link_fops.c.

◆ m0_ha_link_msg_fopt [2/2]

struct m0_fop_type m0_ha_link_msg_fopt

Definition at line 41 of file link_fops.c.

◆ m0_ha_link_msg_rep_fopt [1/2]

struct m0_fop_type m0_ha_link_msg_rep_fopt

Definition at line 42 of file link_fops.c.

◆ m0_ha_link_msg_rep_fopt [2/2]

struct m0_fop_type m0_ha_link_msg_rep_fopt

Definition at line 42 of file link_fops.c.

◆ m0_ha_link_outgoing_fom_type_ops [1/2]

const struct m0_fom_type_ops m0_ha_link_outgoing_fom_type_ops

Definition at line 1707 of file link.c.

◆ m0_ha_link_outgoing_fom_type_ops [2/2]

const struct m0_fom_type_ops m0_ha_link_outgoing_fom_type_ops
Initial value:
= {
}
static int ha_link_outgoing_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: link.c:1687

Definition at line 1707 of file link.c.

◆ m0_ha_link_service_type [1/2]

struct m0_reqh_service_type m0_ha_link_service_type

Definition at line 263 of file link_service.c.

◆ m0_ha_link_service_type [2/2]

struct m0_reqh_service_type m0_ha_link_service_type
Initial value:
= {
.rst_name = "ha-link-service",
.rst_ops = &ha_link_stype_ops,
.rst_level = M0_HA_LINK_SVC_LEVEL,
.rst_keep_alive = true,
}
static const struct m0_reqh_service_type_ops ha_link_stype_ops
Definition: link_service.c:259

Definition at line 263 of file link_service.c.

◆ M0_XCA_DOMAIN [1/3]

enum { ... } M0_XCA_DOMAIN

◆ M0_XCA_DOMAIN [2/3]

struct ha_link_service M0_XCA_DOMAIN

◆ M0_XCA_DOMAIN [3/3]

struct m0_ha_entrypoint_req M0_XCA_DOMAIN