Motr
M0
|
![]() |
Modules | |
aggregtion group store fom | |
Data Structures | |
struct | m0_cm_ag_id |
struct | m0_cm_aggr_group |
struct | m0_cm_aggr_group_ops |
Macros | |
#define | M0_AG_F U128X_F "::" U128X_F |
#define | M0_AG_P(ag) U128_P(&((ag)->ai_hi)), U128_P(&((ag)->ai_lo)) |
#define | ID_LOG(prefix, id) M0_LOG(M0_DEBUG, prefix "=["M0_AG_F"]", M0_AG_P(id)) |
#define | ID_INCOMING_LOG(prefix, id, has_incoming) |
#define | GRP_END_MARK_ID |
Functions | |
struct m0_cm_ag_id | M0_XCA_DOMAIN (rpc) |
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) |
M0_INTERNAL void | m0_cm_aggr_group_fini (struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_cm_aggr_group_fini_and_progress (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) |
M0_INTERNAL void | m0_cm_ag_id_copy (struct m0_cm_ag_id *dst, const struct m0_cm_ag_id *src) |
M0_INTERNAL bool | m0_cm_ag_id_is_set (const struct m0_cm_ag_id *id) |
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 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_INTERNAL void | m0_cm_aggr_group_add (struct m0_cm *cm, struct m0_cm_aggr_group *ag, bool has_incoming) |
M0_INTERNAL struct m0_cm_aggr_group * | m0_cm_ag_in_hi (const struct m0_cm *cm) |
M0_INTERNAL struct m0_cm_aggr_group * | m0_cm_ag_in_lo (const struct m0_cm *cm) |
M0_INTERNAL struct m0_cm_aggr_group * | m0_cm_ag_out_hi (const struct m0_cm *cm) |
M0_INTERNAL struct m0_cm_aggr_group * | m0_cm_ag_out_lo (const struct m0_cm *cm) |
M0_INTERNAL void | m0_cm_ag_in_interval (const struct m0_cm *cm, struct m0_cm_sw *in_interval) |
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_lock (struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_cm_ag_unlock (struct m0_cm_aggr_group *ag) |
M0_INTERNAL bool | m0_cm_ag_is_locked (struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_cm_ag_get (struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_cm_ag_put (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) |
M0_INTERNAL void | m0_cm_ag_cp_add (struct m0_cm_aggr_group *ag, struct m0_cm_cp *cp) |
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) |
M0_INTERNAL void | m0_cm_ag_fini_post (struct m0_cm_aggr_group *ag) |
M0_INTERNAL bool | m0_cm_ag_can_fini (struct m0_cm_aggr_group *ag) |
M0_TL_DESCR_DECLARE (aggr_grps_in, M0_EXTERN) | |
M0_TL_DECLARE (aggr_grps_in, M0_INTERNAL, struct m0_cm_aggr_group) | |
M0_TL_DESCR_DECLARE (aggr_grps_out, M0_EXTERN) | |
M0_TL_DECLARE (aggr_grps_out, M0_INTERNAL, struct m0_cm_aggr_group) | |
Variables | |
struct m0_cm_aggr_group | M0_XCA_DOMAIN |
struct m0_bob_type | aggr_grps_bob |
#define GRP_END_MARK_ID |
M0_INTERNAL int m0_cm_ag_advance | ( | struct m0_cm * | cm | ) |
Advances the sliding window Hi as far as it can, by invoking m0_cm_ops:: cmo_ag_next() until it fails. For every next relevant (i.e. having incoming copy packets) aggregation group identifier an aggregation group is created and added to the m0_cm::cm_aggr_group_in list.
Definition at line 377 of file ag.c.
M0_INTERNAL bool m0_cm_ag_can_fini | ( | struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL void m0_cm_ag_cp_add | ( | struct m0_cm_aggr_group * | ag, |
struct m0_cm_cp * | cp | ||
) |
M0_INTERNAL void m0_cm_ag_cp_add_locked | ( | struct m0_cm_aggr_group * | ag, |
struct m0_cm_cp * | cp | ||
) |
M0_INTERNAL void m0_cm_ag_cp_del | ( | struct m0_cm_aggr_group * | ag, |
struct m0_cm_cp * | cp | ||
) |
M0_INTERNAL void m0_cm_ag_fini_post | ( | struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL void m0_cm_ag_get | ( | struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL bool m0_cm_ag_has_pending_cps | ( | 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 | ||
) |
M0_INTERNAL void m0_cm_ag_id_copy | ( | struct m0_cm_ag_id * | dst, |
const struct m0_cm_ag_id * | src | ||
) |
M0_INTERNAL bool m0_cm_ag_id_is_set | ( | const struct m0_cm_ag_id * | id | ) |
M0_INTERNAL struct m0_cm_aggr_group* m0_cm_ag_in_hi | ( | const struct m0_cm * | cm | ) |
M0_INTERNAL struct m0_cm_aggr_group* m0_cm_ag_in_lo | ( | const struct m0_cm * | cm | ) |
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 struct m0_cm_aggr_group* m0_cm_ag_out_hi | ( | const struct m0_cm * | cm | ) |
M0_INTERNAL struct m0_cm_aggr_group* m0_cm_ag_out_lo | ( | const struct m0_cm * | cm | ) |
M0_INTERNAL void m0_cm_ag_put | ( | struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL void m0_cm_ag_unlock | ( | 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 | ||
) |
Adds an aggregation group to a copy machine's, m0_cm::cm_aggr_groups_in or m0_cm::cm_aggr_groups_out list of aggregation groups depending on the given value of "has_incoming" parameter. Thus if "has_incoming == true" then the aggregation group is added to m0_cm::cm_aggr_groups_in, else to m0_cm:: cm_aggr_groups_out. Aggregation groups list are sorted lexicographically based on aggregation group ids.
Definition at line 301 of file ag.c.
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 | ||
) |
Allocates the aggregation group by invoking m0_cm_ops::cmo_ag_alloc() and adds the aggregation group to m0_cm::cm_aggr_groups_in or m0_cm:: cm_aggr_groups_out list depending on the given "has_incoming" function parameter.
Definition at line 330 of file ag.c.
M0_INTERNAL void m0_cm_aggr_group_fini | ( | struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL void m0_cm_aggr_group_fini_and_progress | ( | 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 | ||
) |
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 | ||
) |
Searches for an aggregation group for the given "id" in m0_cm::cm_aggr_groups_in or m0_cm::cm_aggr_groups_out, depending on the value of "has_incoming" function parameter. Thus if has_incoming == true, then the given aggregation group has incoming copy packets from other replicas and it should be present and searched in m0_cm::cm_aggr_groups_in. If has_incoming == false, then the given aggregation group does not have any incoming copy packets, and thus can be found in m0_cm::cm_aggr_groups_out. There's also a possibility that initially it was discovered that the given aggregation group has incoming copy packets and thus was added to m0_cm:: cm_aggr_groups_in, later it was discovered that the given aggregation group also has outgoing copy packets from this copy machine replica, and the m0_cm_aggr_group_locate() was invoked in such a situation with has_incoming = false. Thus in this case as has_incoming == false, we look into m0_cm:: cm_aggr_groups_out first, if not found, we double check in m0_cm:: cm_aggr_groups_in list, if found in m0_cm::cm_aggr_groups_in list, and the aggregation group also has outgoing copy packets, then the aggregation group is also added to m0_cm::cm_aggr_groups_out list.
Definition at line 262 of file ag.c.
M0_INTERNAL bool m0_cm_aggr_group_tlists_are_empty | ( | struct m0_cm * | cm | ) |
M0_TL_DECLARE | ( | aggr_grps_in | , |
M0_INTERNAL | , | ||
struct m0_cm_aggr_group | |||
) |
M0_TL_DECLARE | ( | aggr_grps_out | , |
M0_INTERNAL | , | ||
struct m0_cm_aggr_group | |||
) |
M0_TL_DESCR_DECLARE | ( | aggr_grps_in | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DECLARE | ( | aggr_grps_out | , |
M0_EXTERN | |||
) |
struct m0_cm_ag_id M0_XCA_DOMAIN | ( | rpc | ) |
struct m0_bob_type aggr_grps_bob |
struct m0_cm_aggr_group M0_XCA_DOMAIN |