Motr  M0
Motr

Data Structures

struct  m0_motr_ha_cfg
 
struct  m0_motr_ha
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA
 

Enumerations

enum  motr_ha_level {
  MOTR_HA_LEVEL_HA_INIT, MOTR_HA_LEVEL_DISPATCHER, MOTR_HA_LEVEL_INITIALISED, MOTR_HA_LEVEL_HA_START,
  MOTR_HA_LEVEL_INSTANCE_SET_HA, MOTR_HA_LEVEL_STARTED, MOTR_HA_LEVEL_CONNECT, MOTR_HA_LEVEL_INSTANCE_SET_HA_LINK,
  MOTR_HA_LEVEL_CONNECTED
}
 

Functions

M0_INTERNAL void m0_motr_ha_cfg_make (struct m0_motr_ha_cfg *mha_cfg, struct m0_reqh *reqh, struct m0_rpc_machine *rmach, const char *addr)
 
static bool motr_ha_service_filter (const struct m0_conf_obj *obj)
 
static int confd_count (const struct m0_conf_service *service, struct m0_ha_entrypoint_rep *rep, uint32_t index)
 
static int confd_fill (const struct m0_conf_service *service, struct m0_ha_entrypoint_rep *rep, uint32_t index)
 
static int motr_ha_confd_iter (struct m0_confc *confc, struct m0_ha_entrypoint_rep *rep, int(*confd_iter)(const struct m0_conf_service *, struct m0_ha_entrypoint_rep *, uint32_t))
 
static void motr_ha_entrypoint_rep_confds_free (struct m0_ha_entrypoint_rep *rep)
 
static int motr_ha_entrypoint_rep_confds_fill (struct m0_confc *confc, struct m0_ha_entrypoint_rep *rep)
 
static bool motr_ha_online_service_filter (const struct m0_conf_obj *obj)
 
static int motr_ha_entrypoint_rep_rm_fill (struct m0_confc *confc, struct m0_fid *active_rm_fid, char **active_rm_ep)
 
M0_INTERNAL struct m0_confcm0_ha_entrypoint_confc_override (void)
 
static void motr_ha_entrypoint_request_cb (struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
 
static void motr_ha_entrypoint_replied_cb (struct m0_ha *ha, struct m0_ha_entrypoint_rep *hep)
 
static void motr_ha_msg_received_cb (struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
 
static void motr_ha_msg_is_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void motr_ha_msg_is_not_delivered_cb (struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
 
static void motr_ha_link_connected_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void motr_ha_link_reused_cb (struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
 
static void motr_ha_link_absent_cb (struct m0_ha *ha, const struct m0_uint128 *req_id)
 
static void motr_ha_link_is_disconnecting_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
static void motr_ha_link_disconnected_cb (struct m0_ha *ha, struct m0_ha_link *hl)
 
static int motr_ha_level_enter (struct m0_module *module)
 
static void motr_ha_level_leave (struct m0_module *module)
 
M0_INTERNAL int m0_motr_ha_init (struct m0_motr_ha *mha, struct m0_motr_ha_cfg *mha_cfg)
 
M0_INTERNAL void m0_motr_ha_fini (struct m0_motr_ha *mha)
 
M0_INTERNAL int m0_motr_ha_start (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_stop (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_connect (struct m0_motr_ha *mha)
 
M0_INTERNAL void m0_motr_ha_disconnect (struct m0_motr_ha *mha)
 

Variables

const struct m0_ha_ops m0_motr_ha_ops
 
static const struct m0_modlev motr_ha_levels []
 
const struct m0_ha_ops m0_motr_ha_ops
 

Detailed Description

TODO find include for M0_CONF_SERVICE_TYPE TODO add magics for motr_ha_handlers TODO s/container_of/bob_of/g TODO make a flag to forbid handler detach before stop() TODO don't panic if message handler doesn't exist

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_HA

Definition at line 36 of file ha.c.

Enumeration Type Documentation

◆ motr_ha_level

Enumerator
MOTR_HA_LEVEL_HA_INIT 
MOTR_HA_LEVEL_DISPATCHER 
MOTR_HA_LEVEL_INITIALISED 
MOTR_HA_LEVEL_HA_START 
MOTR_HA_LEVEL_INSTANCE_SET_HA 
MOTR_HA_LEVEL_STARTED 
MOTR_HA_LEVEL_CONNECT 
MOTR_HA_LEVEL_INSTANCE_SET_HA_LINK 
MOTR_HA_LEVEL_CONNECTED 

Definition at line 371 of file ha.c.

Function Documentation

◆ confd_count()

static int confd_count ( const struct m0_conf_service service,
struct m0_ha_entrypoint_rep rep,
uint32_t  index 
)
static

Definition at line 88 of file ha.c.

Here is the caller graph for this function:

◆ confd_fill()

static int confd_fill ( const struct m0_conf_service service,
struct m0_ha_entrypoint_rep rep,
uint32_t  index 
)
static

Definition at line 96 of file ha.c.

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

◆ m0_ha_entrypoint_confc_override()

M0_INTERNAL struct m0_confc* m0_ha_entrypoint_confc_override ( void  )

Private API for UT only. UT is responsible for loading test configuration to the confc instance prior the instance is put in use.

See also
test_cs_ut_rconfc_fail()

Definition at line 254 of file ha.c.

Here is the caller graph for this function:

◆ m0_motr_ha_cfg_make()

M0_INTERNAL void m0_motr_ha_cfg_make ( struct m0_motr_ha_cfg mha_cfg,
struct m0_reqh reqh,
struct m0_rpc_machine rmach,
const char *  addr 
)

Definition at line 61 of file ha.c.

Here is the call graph for this function:

◆ m0_motr_ha_connect()

M0_INTERNAL void m0_motr_ha_connect ( struct m0_motr_ha mha)

Definition at line 567 of file ha.c.

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

◆ m0_motr_ha_disconnect()

M0_INTERNAL void m0_motr_ha_disconnect ( struct m0_motr_ha mha)

Definition at line 578 of file ha.c.

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

◆ m0_motr_ha_fini()

M0_INTERNAL void m0_motr_ha_fini ( struct m0_motr_ha mha)

Definition at line 537 of file ha.c.

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

◆ m0_motr_ha_init()

M0_INTERNAL int m0_motr_ha_init ( struct m0_motr_ha mha,
struct m0_motr_ha_cfg mha_cfg 
)

Definition at line 509 of file ha.c.

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

◆ m0_motr_ha_start()

M0_INTERNAL int m0_motr_ha_start ( struct m0_motr_ha mha)

Definition at line 549 of file ha.c.

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

◆ m0_motr_ha_stop()

M0_INTERNAL void m0_motr_ha_stop ( struct m0_motr_ha mha)

Definition at line 560 of file ha.c.

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

◆ motr_ha_confd_iter()

static int motr_ha_confd_iter ( struct m0_confc confc,
struct m0_ha_entrypoint_rep rep,
int(*)(const struct m0_conf_service *, struct m0_ha_entrypoint_rep *, uint32_t)  confd_iter 
)
static

Definition at line 107 of file ha.c.

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

◆ motr_ha_entrypoint_rep_confds_fill()

static int motr_ha_entrypoint_rep_confds_fill ( struct m0_confc confc,
struct m0_ha_entrypoint_rep rep 
)
static

Definition at line 165 of file ha.c.

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

◆ motr_ha_entrypoint_rep_confds_free()

static void motr_ha_entrypoint_rep_confds_free ( struct m0_ha_entrypoint_rep rep)
static

Definition at line 154 of file ha.c.

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

◆ motr_ha_entrypoint_rep_rm_fill()

static int motr_ha_entrypoint_rep_rm_fill ( struct m0_confc confc,
struct m0_fid active_rm_fid,
char **  active_rm_ep 
)
static

Definition at line 199 of file ha.c.

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

◆ motr_ha_entrypoint_replied_cb()

static void motr_ha_entrypoint_replied_cb ( struct m0_ha ha,
struct m0_ha_entrypoint_rep hep 
)
static

Definition at line 300 of file ha.c.

◆ motr_ha_entrypoint_request_cb()

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

Definition at line 261 of file ha.c.

Here is the call graph for this function:

◆ motr_ha_level_enter()

static int motr_ha_level_enter ( struct m0_module module)
static

Definition at line 383 of file ha.c.

Here is the call graph for this function:

◆ motr_ha_level_leave()

static void motr_ha_level_leave ( struct m0_module module)
static

Definition at line 428 of file ha.c.

Here is the call graph for this function:

◆ motr_ha_link_absent_cb()

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

Definition at line 342 of file ha.c.

◆ motr_ha_link_connected_cb()

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

Definition at line 330 of file ha.c.

◆ motr_ha_link_disconnected_cb()

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

Definition at line 353 of file ha.c.

◆ motr_ha_link_is_disconnecting_cb()

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

Definition at line 347 of file ha.c.

Here is the call graph for this function:

◆ motr_ha_link_reused_cb()

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

Definition at line 336 of file ha.c.

◆ motr_ha_msg_is_delivered_cb()

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

Definition at line 318 of file ha.c.

◆ motr_ha_msg_is_not_delivered_cb()

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

Definition at line 324 of file ha.c.

◆ motr_ha_msg_received_cb()

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

Definition at line 306 of file ha.c.

Here is the call graph for this function:

◆ motr_ha_online_service_filter()

static bool motr_ha_online_service_filter ( const struct m0_conf_obj obj)
static

Definition at line 193 of file ha.c.

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

◆ motr_ha_service_filter()

static bool motr_ha_service_filter ( const struct m0_conf_obj obj)
static

Definition at line 83 of file ha.c.

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

Variable Documentation

◆ m0_motr_ha_ops [1/2]

const struct m0_ha_ops m0_motr_ha_ops

Definition at line 358 of file ha.c.

◆ m0_motr_ha_ops [2/2]

const struct m0_ha_ops m0_motr_ha_ops
Initial value:
= {
.hao_entrypoint_request = &motr_ha_entrypoint_request_cb,
.hao_entrypoint_replied = &motr_ha_entrypoint_replied_cb,
.hao_msg_received = &motr_ha_msg_received_cb,
.hao_msg_is_delivered = &motr_ha_msg_is_delivered_cb,
.hao_msg_is_not_delivered = &motr_ha_msg_is_not_delivered_cb,
.hao_link_connected = &motr_ha_link_connected_cb,
.hao_link_reused = &motr_ha_link_reused_cb,
.hao_link_absent = &motr_ha_link_absent_cb,
.hao_link_is_disconnecting = &motr_ha_link_is_disconnecting_cb,
.hao_link_disconnected = &motr_ha_link_disconnected_cb,
}
static void motr_ha_link_disconnected_cb(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: ha.c:353
static void motr_ha_msg_is_not_delivered_cb(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: ha.c:324
static void motr_ha_link_absent_cb(struct m0_ha *ha, const struct m0_uint128 *req_id)
Definition: ha.c:342
static void motr_ha_link_reused_cb(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: ha.c:336
static void motr_ha_entrypoint_replied_cb(struct m0_ha *ha, struct m0_ha_entrypoint_rep *hep)
Definition: ha.c:300
static void motr_ha_link_connected_cb(struct m0_ha *ha, const struct m0_uint128 *req_id, struct m0_ha_link *hl)
Definition: ha.c:330
static void motr_ha_msg_is_delivered_cb(struct m0_ha *ha, struct m0_ha_link *hl, uint64_t tag)
Definition: ha.c:318
static void motr_ha_msg_received_cb(struct m0_ha *ha, struct m0_ha_link *hl, struct m0_ha_msg *msg, uint64_t tag)
Definition: ha.c:306
static void motr_ha_entrypoint_request_cb(struct m0_ha *ha, const struct m0_ha_entrypoint_req *req, const struct m0_uint128 *req_id)
Definition: ha.c:261
static void motr_ha_link_is_disconnecting_cb(struct m0_ha *ha, struct m0_ha_link *hl)
Definition: ha.c:347

Definition at line 358 of file ha.c.

◆ motr_ha_levels

const struct m0_modlev motr_ha_levels[]
static

Definition at line 467 of file ha.c.