31 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_OTHER 87 dom->hdo_epoch = epoch;
89 ham_tlist_init(&
dom->hdo_monitors);
99 ham_tlist_fini(&
dom->hdo_monitors);
107 ham_tlink_init_at(mon, &
dom->hdo_monitors);
122 return dom->hdo_epoch;
133 return dom->hdo_epoch;
140 dom->hdo_epoch = epoch;
187 hg_client_tlink_del_fini(
client);
277 (
unsigned long)item_epoch);
287 if (epoch == item_epoch)
304 (
unsigned long)epoch,
305 (
unsigned long)item_epoch);
320 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
M0_INTERNAL void m0_ha_global_fini(void)
struct m0_ha_domain rh_hadom
struct m0_confc * hc_confc
#define M0_LOG(level,...)
M0_INTERNAL void m0_ha_domain_put_read(struct m0_ha_domain *dom)
M0_INTERNAL const uint64_t M0_HA_EPOCH_NONE
struct m0_mutex * ca_lock
M0_INTERNAL int m0_ha_client_del(struct m0_confc *confc)
M0_INTERNAL void m0_rwlock_write_lock(struct m0_rwlock *lock)
M0_TL_DEFINE(hg_client, static, struct ha_client)
M0_INTERNAL struct m0 * m0_get(void)
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL void m0_ha_clients_iterate(m0_ha_client_cb_t iter, const void *data, uint64_t data2)
static struct m0_rpc_item * item
M0_INTERNAL void m0_rwlock_init(struct m0_rwlock *lock)
M0_INTERNAL uint64_t m0_ha_domain_get_read(struct m0_ha_domain *dom)
M0_INTERNAL void m0_ha_domain_fini(struct m0_ha_domain *dom)
M0_INTERNAL void m0_ref_put(struct m0_ref *ref)
M0_INTERNAL int m0_ha_global_init(void)
void m0_ref_init(struct m0_ref *ref, int init_num, void(*release)(struct m0_ref *ref))
return M0_ERR(-EOPNOTSUPP)
M0_INTERNAL void m0_ref_get(struct m0_ref *ref)
void client(struct client_params *params)
static struct m0_confc * confc
static struct m0_stob_domain * dom
struct m0_conf_cache cc_cache
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
M0_INTERNAL int m0_ha_epoch_check(const struct m0_rpc_item *item)
M0_INTERNAL void m0_ha_domain_put_write(struct m0_ha_domain *dom, uint64_t epoch)
M0_INTERNAL void m0_ha_domain_init(struct m0_ha_domain *dom, uint64_t epoch)
M0_INTERNAL void m0_rwlock_write_unlock(struct m0_rwlock *lock)
static void ha_global_lock(struct ha_global *hg)
static int default_mon_future(struct m0_ha_epoch_monitor *self, uint64_t epoch, const struct m0_rpc_item *item)
int(* hem_past)(struct m0_ha_epoch_monitor *self, uint64_t epoch, const struct m0_rpc_item *item)
int(* hem_future)(struct m0_ha_epoch_monitor *self, uint64_t epoch, const struct m0_rpc_item *item)
#define M0_ALLOC_PTR(ptr)
void * i_moddata[M0_MODULE_NR]
static void ha_global_unlock(struct ha_global *hg)
static void ha_client_release(struct m0_ref *ref)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL void m0_rwlock_read_lock(struct m0_rwlock *lock)
M0_INTERNAL void m0_rwlock_fini(struct m0_rwlock *lock)
M0_INTERNAL int m0_ha_client_add(struct m0_confc *confc)
M0_INTERNAL uint64_t m0_ha_domain_get_write(struct m0_ha_domain *dom)
M0_INTERNAL void m0_rwlock_read_unlock(struct m0_rwlock *lock)
struct m0_rpc_machine * ri_rmachine
M0_INTERNAL void m0_ha_domain_monitor_del(struct m0_ha_domain *dom, struct m0_ha_epoch_monitor *mon)
#define m0_tl_find(name, var, head,...)
M0_INTERNAL void m0_ha_domain_monitor_add(struct m0_ha_domain *dom, struct m0_ha_epoch_monitor *mon)
#define m0_tl_for(name, head, obj)
void(* m0_ha_client_cb_t)(void *client, const void *data, uint64_t data2)
struct m0_tl hdo_monitors
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)