25 #ifndef __MOTR_CM_AG_H__ 26 #define __MOTR_CM_AG_H__ 30 #include "lib/types_xc.h" 54 #define M0_AG_F U128X_F "::" U128X_F 55 #define M0_AG_P(ag) U128_P(&((ag)->ai_hi)), U128_P(&((ag)->ai_lo)) 57 #define ID_LOG(prefix, id) M0_LOG(M0_DEBUG, prefix "=["M0_AG_F"]", M0_AG_P(id)) 58 #define ID_INCOMING_LOG(prefix, id, has_incoming) \ 59 M0_LOG(M0_DEBUG, prefix "=["M0_AG_F"] has incoming: %d", \ 60 M0_AG_P(id), !!(has_incoming)); 62 #define GRP_END_MARK_ID (struct m0_cm_ag_id) { \ 63 .ai_hi = M0_UINT128((uint64_t)-1, (uint64_t)-1), \ 64 .ai_lo = M0_UINT128((uint64_t)-1, (uint64_t)-1) \ M0_INTERNAL void m0_cm_ag_id_copy(struct m0_cm_ag_id *dst, const struct m0_cm_ag_id *src)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_ag_out_lo(const struct m0_cm *cm)
M0_INTERNAL void m0_cm_ag_unlock(struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_cm_ag_get(struct m0_cm_aggr_group *ag)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_ag_out_hi(const struct m0_cm *cm)
M0_INTERNAL void m0_cm_ag_cp_del(struct m0_cm_aggr_group *ag, struct m0_cm_cp *cp)
M0_INTERNAL bool m0_cm_ag_has_pending_cps(struct m0_cm_aggr_group *ag)
bool(* cago_is_frozen_on)(struct m0_cm_aggr_group *ag, struct m0_cm_proxy *proxy)
M0_INTERNAL bool m0_cm_ag_can_fini(struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_cm_aggr_group_add(struct m0_cm *cm, struct m0_cm_aggr_group *ag, bool has_incoming)
void(* cago_fini)(struct m0_cm_aggr_group *ag)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_ag_in_hi(const struct m0_cm *cm)
struct m0_cm_ag_id cag_id
M0_INTERNAL void m0_cm_ag_in_interval(const struct m0_cm *cm, struct m0_cm_sw *in_interval)
M0_INTERNAL bool m0_cm_ag_id_is_set(const struct m0_cm_ag_id *id)
uint64_t(* cago_local_cp_nr)(const struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_cm_aggr_group_init(struct m0_cm_aggr_group *ag, struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, const struct m0_cm_aggr_group_ops *ag_ops)
uint64_t cag_cp_global_nr
static struct m0_uint128 id0[UPDATE_NR *DTM_NR]
M0_INTERNAL void m0_cm_ag_cp_add(struct m0_cm_aggr_group *ag, struct m0_cm_cp *cp)
M0_INTERNAL bool m0_cm_ag_is_locked(struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_cm_ag_lock(struct m0_cm_aggr_group *ag)
M0_INTERNAL int m0_cm_ag_id_cmp(const struct m0_cm_ag_id *id0, const struct m0_cm_ag_id *id1)
struct m0_cm_aggr_group M0_XCA_DOMAIN
struct m0_bob_type aggr_grps_bob
M0_INTERNAL void m0_cm_ag_put(struct m0_cm_aggr_group *ag)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_aggr_group_locate(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming)
M0_INTERNAL struct m0_cm_aggr_group * m0_cm_ag_in_lo(const struct m0_cm *cm)
M0_TL_DESCR_DECLARE(aggr_grps_in, M0_EXTERN)
struct m0_sm_ast cag_fini_ast
uint64_t cag_transformed_cp_nr
bool(* cago_has_incoming_from)(struct m0_cm_aggr_group *ag, struct m0_cm_proxy *proxy)
M0_INTERNAL void m0_cm_aggr_group_fini(struct m0_cm_aggr_group *ag)
const struct m0_cm_aggr_group_ops * cag_ops
M0_INTERNAL void m0_cm_ag_out_interval(const struct m0_cm *cm, struct m0_cm_sw *out_interval)
M0_INTERNAL int m0_cm_ag_advance(struct m0_cm *cm)
M0_INTERNAL bool m0_cm_aggr_group_tlists_are_empty(struct m0_cm *cm)
M0_INTERNAL void m0_cm_ag_fini_post(struct m0_cm_aggr_group *ag)
struct m0_mutex cag_mutex
M0_INTERNAL int m0_cm_aggr_group_alloc(struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out)
M0_TL_DECLARE(aggr_grps_in, M0_INTERNAL, struct m0_cm_aggr_group)
bool(* cago_ag_can_fini)(const struct m0_cm_aggr_group *ag)
M0_INTERNAL void m0_cm_ag_cp_add_locked(struct m0_cm_aggr_group *ag, struct m0_cm_cp *cp)
struct m0_pdclust_src_addr src
M0_INTERNAL void m0_cm_aggr_group_fini_and_progress(struct m0_cm_aggr_group *ag)
struct m0_tlink cag_cm_out_linkage
struct m0_tlink cag_cm_in_linkage