24 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_RM 53 .sd_name =
"Open_configuration",
58 .sd_name =
"Diter_search",
112 if (
svc->cs_type == M0_CST_RMS) {
113 ep =
svc->cs_endpoints;
213 M0_CONF_ROOT_NODES_FID,
214 M0_CONF_NODE_PROCESSES_FID,
215 M0_CONF_PROCESS_SERVICES_FID);
240 sbscr, !!confc_is_ready);
241 if (confc_is_ready) {
294 M0_CONF_ROOT_NODES_FID,
295 M0_CONF_NODE_PROCESSES_FID,
296 M0_CONF_PROCESS_SERVICES_FID);
306 if (
svc->cs_type != M0_CST_RMS)
308 ep =
svc->cs_endpoints;
447 #undef M0_TRACE_SUBSYSTEM const struct m0_conf_obj_type * m0_conf_obj_type(const struct m0_conf_obj *obj)
static int rm_remote_ep_to_rms_obj(struct m0_confc *confc, const char *rem_ep, struct m0_conf_obj **obj)
struct m0_conf_obj * cc_root
M0_INTERNAL void m0_sm_fail(struct m0_sm *mach, int fail_state, int32_t rc)
M0_INTERNAL void m0_rm_ha_unsubscribe_lock(struct m0_rm_ha_tracker *tracker)
struct m0_rm_ha_tracker * rhs_tracker
M0_INTERNAL int m0_rm_ha_subscriber_init(struct m0_rm_ha_subscriber *sbscr, struct m0_sm_group *grp, struct m0_confc *confc, const char *rem_ep, struct m0_rm_ha_tracker *tracker)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_clink_del(struct m0_clink *link)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
void(* sa_cb)(struct m0_sm_group *grp, struct m0_sm_ast *)
M0_INTERNAL struct m0_conf_obj * m0_confc_ctx_result(struct m0_confc_ctx *ctx)
static const struct m0_sm_conf rm_ha_sbscr_sm_conf
static struct m0_sm_group * grp
#define M0_LOG(level,...)
const struct m0_conf_obj_type M0_CONF_SERVICE_TYPE
M0_INTERNAL void m0_sm_ast_post(struct m0_sm_group *grp, struct m0_sm_ast *ast)
static void rm_ha_sbscr_fs_opened(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL int m0_conf_diter_next_sync(struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
M0_INTERNAL void m0_conf_obj_put(struct m0_conf_obj *obj)
static struct m0_sm_state_descr rm_ha_subscriber_states[]
static struct m0_rpc_client_ctx cctx
static struct m0_be_emap_cursor it
M0_INTERNAL const char * m0_sm_state_name(const struct m0_sm *mach, int state)
M0_INTERNAL int32_t m0_confc_ctx_error_lock(const struct m0_confc_ctx *ctx)
M0_INTERNAL bool m0_clink_is_armed(const struct m0_clink *link)
M0_INTERNAL void m0_chan_lock(struct m0_chan *ch)
#define container_of(ptr, type, member)
static bool rm_ha_sbscr_fs_open_cb(struct m0_clink *link)
#define m0_confc_open(ctx, origin,...)
struct m0_confc * rhs_confc
static struct m0_sm_ast ast[NR]
M0_INTERNAL void m0_conf_obj_get(struct m0_conf_obj *obj)
#define M0_RC_INFO(rc, fmt,...)
M0_INTERNAL void m0_rm_ha_subscribe(struct m0_rm_ha_subscriber *sbscr)
struct m0_conf_obj * rhs_dir_root
struct m0_confc_ctx rhs_cctx
M0_INTERNAL void m0_rm_ha_tracker_fini(struct m0_rm_ha_tracker *tracker)
struct m0_conf_root * root
return M0_ERR(-EOPNOTSUPP)
#define M0_AMB(obj, ptr, field)
M0_INTERNAL void m0_confc_ctx_fini(struct m0_confc_ctx *ctx)
static bool rm_ha_svc_filter(const struct m0_conf_obj *obj)
static struct m0_confc * confc
void m0_sm_state_set(struct m0_sm *mach, int state)
static void rm_ha_sbscr_diter_next_ast(struct m0_sm_group *grp, struct m0_sm_ast *ast)
M0_INTERNAL bool m0_confc_ctx_is_completed(const struct m0_confc_ctx *ctx)
M0_INTERNAL void m0_clink_cleanup_locked(struct m0_clink *link)
M0_INTERNAL int m0_confc_ctx_init(struct m0_confc_ctx *ctx, struct m0_confc *confc)
M0_INTERNAL void m0_conf_diter_wait_arm(struct m0_conf_diter *it, struct m0_clink *clink)
M0_INTERNAL struct m0_reqh * m0_conf_obj2reqh(const struct m0_conf_obj *obj)
M0_INTERNAL void m0_rm_ha_unsubscribe(struct m0_rm_ha_tracker *tracker)
struct m0_sm_group * sm_grp
struct m0_chan co_ha_chan
M0_INTERNAL int m0_conf_diter_next(struct m0_conf_diter *it, bool(*filter)(const struct m0_conf_obj *obj))
M0_INTERNAL int m0_rm_ha_subscribe_sync(struct m0_confc *confc, const char *rem_ep, struct m0_rm_ha_tracker *tracker)
struct m0_clink rhs_clink
#define M0_CONF_CAST(ptr, type)
static struct m0_clink clink[RDWR_REQUEST_MAX]
#define m0_confc_open_sync(result, origin,...)
M0_INTERNAL void m0_chan_unlock(struct m0_chan *ch)
bool(* m0_chan_cb_t)(struct m0_clink *link)
M0_INTERNAL void m0_conf_obj_get_lock(struct m0_conf_obj *obj)
enum m0_ha_obj_state rht_state
static bool rm_ha_conf_expired_cb(struct m0_clink *cl)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
M0_INTERNAL struct m0_conf_obj * m0_conf_diter_result(const struct m0_conf_diter *it)
#define m0_conf_diter_init(iter, confc, origin,...)
#define M0_FI_ENABLED(tag)
M0_INTERNAL void m0_sm_init(struct m0_sm *mach, const struct m0_sm_conf *conf, uint32_t state, struct m0_sm_group *grp)
M0_INTERNAL void m0_clink_add(struct m0_chan *chan, struct m0_clink *link)
M0_INTERNAL void m0_conf_diter_fini(struct m0_conf_diter *it)
static bool rm_ha_rms_is_located(struct m0_conf_obj *next, struct m0_rm_ha_subscriber *sbscr)
M0_INTERNAL void m0_rm_ha_subscriber_fini(struct m0_rm_ha_subscriber *sbscr)
static struct m0_net_test_service svc
static void rm_ha_sbscr_ast_post(struct m0_rm_ha_subscriber *sbscr, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
struct m0_clink rht_conf_exp
static void rm_ha_sbscr_fail(struct m0_rm_ha_subscriber *sbscr, int rc)
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
M0_INTERNAL void m0_rm_ha_tracker_init(struct m0_rm_ha_tracker *tracker, m0_chan_cb_t cb)
static void rm_ha_sbscr_diter_next(struct m0_rm_ha_subscriber *sbscr)
M0_INTERNAL void m0_conf_cache_lock(struct m0_conf_cache *cache)
static void rm_ha_conf_open(struct m0_sm_group *grp, struct m0_sm_ast *ast)
struct m0_clink rht_clink
M0_INTERNAL void m0_conf_cache_unlock(struct m0_conf_cache *cache)
static bool rm_ha_diter_cb(struct m0_clink *clink)
static void rm_ha_sbscr_state_set(struct m0_rm_ha_subscriber *sbscr, int state)
struct m0_conf_diter rhs_diter
M0_INTERNAL void m0_sm_fini(struct m0_sm *mach)