Motr
M0
|
Data Structures | |
struct | m0_sns_cm_ag |
struct | m0_sns_cm_ag_iter |
struct | m0_sns_cm_rebalance_ag |
struct | m0_sns_cm_repair_ag_failure_ctx |
struct | m0_sns_cm_repair_ag |
Enumerations | |
enum | ag_iter_state { AIS_FID_NEXT, AIS_FID_LOCK, AIS_FID_ATTR, AIS_GROUP_NEXT, AIS_FINI, AIS_NR } |
Functions | |
static enum ag_iter_state | ai_state (struct m0_sns_cm_ag_iter *ai) |
static struct m0_sns_cm * | ai2sns (struct m0_sns_cm_ag_iter *ai) |
static void | ai_state_set (struct m0_sns_cm_ag_iter *ai, int state) |
static bool | _is_fid_valid (struct m0_sns_cm_ag_iter *ai, struct m0_fid *fid) |
static int | ai_group_next (struct m0_sns_cm_ag_iter *ai) |
static int | ai_fid_attr (struct m0_sns_cm_ag_iter *ai) |
static int | __file_lock (struct m0_sns_cm *scm, const struct m0_fid *fid, struct m0_sns_cm_file_ctx **fctx) |
static int | ai_pm_set (struct m0_sns_cm_ag_iter *ai, struct m0_fid *pv_id) |
static int | ai_fid_lock (struct m0_sns_cm_ag_iter *ai) |
static int | ai_fid_next (struct m0_sns_cm_ag_iter *ai) |
M0_INTERNAL int | m0_sns_cm_ag__next (struct m0_sns_cm *scm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next) |
M0_INTERNAL int | m0_sns_cm_ag_iter_init (struct m0_sns_cm_ag_iter *ai) |
M0_INTERNAL void | m0_sns_cm_ag_iter_fini (struct m0_sns_cm_ag_iter *ai) |
M0_INTERNAL struct m0_cm * | snsag2cm (const struct m0_sns_cm_ag *sag) |
M0_INTERNAL struct m0_sns_cm_ag * | ag2snsag (const struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_sns_cm_ag_agid_setup (const struct m0_fid *gob_fid, uint64_t group, struct m0_cm_ag_id *agid) |
M0_INTERNAL void | agid2fid (const struct m0_cm_ag_id *id, struct m0_fid *fid) |
M0_INTERNAL uint64_t | agid2group (const struct m0_cm_ag_id *id) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_local_cp_nr (const struct m0_cm_aggr_group *ag) |
M0_INTERNAL void | m0_sns_cm_ag_fini (struct m0_sns_cm_ag *sag) |
M0_INTERNAL int | m0_sns_cm_ag_init (struct m0_sns_cm_ag *sag, struct m0_cm *cm, const struct m0_cm_ag_id *id, const struct m0_cm_aggr_group_ops *ag_ops, bool has_incoming) |
M0_INTERNAL bool | m0_sns_cm_ag_has_incoming_from (struct m0_cm_aggr_group *ag, struct m0_cm_proxy *proxy) |
static bool | ag_id_is_in (const struct m0_cm_ag_id *id, const struct m0_cm_sw *interval) |
M0_INTERNAL bool | m0_sns_cm_ag_is_frozen_on (struct m0_cm_aggr_group *ag, struct m0_cm_proxy *pxy) |
M0_INTERNAL bool | m0_sns_cm_ag_has_data (struct m0_sns_cm_file_ctx *fctx, uint64_t group) |
M0_INTERNAL struct m0_sns_cm_rebalance_ag * | sag2rebalanceag (const struct m0_sns_cm_ag *sag) |
static void | rebalance_ag_fini (struct m0_cm_aggr_group *ag) |
static bool | rebalance_ag_can_fini (const struct m0_cm_aggr_group *ag) |
M0_INTERNAL int | m0_sns_cm_rebalance_ag_alloc (struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out) |
M0_INTERNAL int | m0_sns_cm_rebalance_ag_setup (struct m0_sns_cm_ag *sag, struct m0_pdclust_layout *pl) |
M0_INTERNAL void | m0_sns_cm_acc_cp_init (struct m0_sns_cm_cp *scp, struct m0_sns_cm_ag *ag) |
M0_INTERNAL int | m0_sns_cm_acc_cp_setup (struct m0_sns_cm_cp *scp, struct m0_fid *tgt_cobfid, uint64_t tgt_cob_index, uint64_t failed_unit_idx, uint64_t data_seg_nr) |
M0_INTERNAL int | repair_cp_bufvec_split (struct m0_cm_cp *cp) |
M0_INTERNAL struct m0_sns_cm_repair_ag * | sag2repairag (const struct m0_sns_cm_ag *sag) |
M0_INTERNAL int64_t | m0_sns_cm_repair_ag_inbufs (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, const struct m0_cm_ag_id *id) |
static int | incr_recover_failure_register (struct m0_sns_cm_repair_ag *rag) |
static int | incr_recover_init (struct m0_sns_cm_repair_ag *rag, struct m0_pdclust_layout *pl) |
static void | incr_recover_fini (struct m0_sns_cm_repair_ag *rag) |
static uint32_t | ag_in_remaining_bufs (struct m0_sns_cm_repair_ag *rag) |
static void | acc_check_fini (struct m0_sns_cm_repair_ag *rag) |
static void | repair_ag_fini (struct m0_cm_aggr_group *ag) |
static uint32_t | repair_ag_inactive_acc_nr (struct m0_cm_aggr_group *ag) |
static bool | repair_ag_can_fini (const struct m0_cm_aggr_group *ag) |
static uint64_t | repair_ag_target_unit (struct m0_sns_cm_ag *sag, struct m0_pdclust_layout *pl, struct m0_pdclust_instance *pi, uint64_t fdev, uint64_t funit) |
static int | repair_ag_failure_ctxs_setup (struct m0_sns_cm_repair_ag *rag, const struct m0_bitmap *fmap, struct m0_pdclust_layout *pl) |
M0_INTERNAL int | m0_sns_cm_repair_ag_alloc (struct m0_cm *cm, const struct m0_cm_ag_id *id, bool has_incoming, struct m0_cm_aggr_group **out) |
M0_INTERNAL int | m0_sns_cm_repair_ag_setup (struct m0_sns_cm_ag *sag, struct m0_pdclust_layout *pl) |
M0_INTERNAL bool | m0_sns_cm_ag_acc_is_full_with (const struct m0_cm_cp *acc, uint64_t nr_cps) |
Variables | |
static struct m0_sm_state_descr | ai_sd [AIS_NR] |
static const struct m0_sm_conf | ai_sm_conf |
static int(* | ai_action [])(struct m0_sns_cm_ag_iter *ai) |
static const struct m0_cm_aggr_group_ops | sns_cm_rebalance_ag_ops |
static const struct m0_cm_aggr_group_ops | sns_cm_repair_ag_ops |
enum ag_iter_state |
|
static |
|
static |
|
static |
M0_INTERNAL struct m0_sns_cm_ag * ag2snsag | ( | const struct m0_cm_aggr_group * | ag | ) |
|
static |
|
static |
M0_INTERNAL void agid2fid | ( | const struct m0_cm_ag_id * | id, |
struct m0_fid * | fid | ||
) |
M0_INTERNAL uint64_t agid2group | ( | const struct m0_cm_ag_id * | id | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
M0_INTERNAL void m0_sns_cm_acc_cp_init | ( | struct m0_sns_cm_cp * | scp, |
struct m0_sns_cm_ag * | sag | ||
) |
M0_INTERNAL int m0_sns_cm_acc_cp_setup | ( | struct m0_sns_cm_cp * | scp, |
struct m0_fid * | tgt_cobfid, | ||
uint64_t | tgt_cob_index, | ||
uint64_t | failed_unit_idx, | ||
uint64_t | data_seg_nr | ||
) |
M0_INTERNAL int m0_sns_cm_ag__next | ( | struct m0_sns_cm * | scm, |
const struct m0_cm_ag_id * | id_curr, | ||
struct m0_cm_ag_id * | id_next | ||
) |
M0_INTERNAL bool m0_sns_cm_ag_acc_is_full_with | ( | const struct m0_cm_cp * | acc, |
uint64_t | nr_cps | ||
) |
Returns true if all the necessary copy packets are transformed or accumulated into the aggregation group accumulator for a given copy machine operation, viz. sns-repair or sns-rebalance.
Returns true if all the local copy packets are transformed in the accumulator copy packet.
Definition at line 562 of file ag.c.
M0_INTERNAL void m0_sns_cm_ag_agid_setup | ( | const struct m0_fid * | gob_fid, |
uint64_t | group, | ||
struct m0_cm_ag_id * | agid | ||
) |
M0_INTERNAL void m0_sns_cm_ag_fini | ( | struct m0_sns_cm_ag * | sag | ) |
Finalises given sns specific generic aggregation group. Invokes m0_cm_aggr_group_fini().
Definition at line 443 of file ag.c.
M0_INTERNAL bool m0_sns_cm_ag_has_data | ( | struct m0_sns_cm_file_ctx * | fctx, |
uint64_t | group | ||
) |
M0_INTERNAL bool m0_sns_cm_ag_has_incoming_from | ( | struct m0_cm_aggr_group * | ag, |
struct m0_cm_proxy * | proxy | ||
) |
M0_INTERNAL int m0_sns_cm_ag_init | ( | struct m0_sns_cm_ag * | sag, |
struct m0_cm * | cm, | ||
const struct m0_cm_ag_id * | id, | ||
const struct m0_cm_aggr_group_ops * | ag_ops, | ||
bool | has_incoming | ||
) |
Initialises given sns specific generic aggregation group. Invokes m0_cm_aggr_group_init().
Definition at line 464 of file ag.c.
M0_INTERNAL bool m0_sns_cm_ag_is_frozen_on | ( | struct m0_cm_aggr_group * | ag, |
struct m0_cm_proxy * | pxy | ||
) |
Returns true iff aggregation group cannot progress. This can happen during sns repair/rebalance quiesce or abort operation. An aggregation group can be frozen in following cases, case 1: The given proxy has completed (i.e. there will be no more outgoing copy packets created by the proxy) and there are still incoming copy packets expected from the proxy. case 2: There are incoming aggregation groups which have received all the relevant copy packets from the remote replicas but pump fom is already stopped so there will be no more local copy packets created if any.
Definition at line 541 of file ag.c.
M0_INTERNAL void m0_sns_cm_ag_iter_fini | ( | struct m0_sns_cm_ag_iter * | ai | ) |
M0_INTERNAL int m0_sns_cm_ag_iter_init | ( | struct m0_sns_cm_ag_iter * | ai | ) |
M0_INTERNAL uint64_t m0_sns_cm_ag_local_cp_nr | ( | const struct m0_cm_aggr_group * | ag | ) |
M0_INTERNAL int m0_sns_cm_rebalance_ag_alloc | ( | struct m0_cm * | cm, |
const struct m0_cm_ag_id * | id, | ||
bool | has_incoming, | ||
struct m0_cm_aggr_group ** | out | ||
) |
Allocates and initializes aggregation group for the given m0_cm_ag_id. Caller is responsible to lock the copy machine before calling this function.
Definition at line 107 of file ag.c.
M0_INTERNAL int m0_sns_cm_rebalance_ag_setup | ( | struct m0_sns_cm_ag * | sag, |
struct m0_pdclust_layout * | pl | ||
) |
M0_INTERNAL int m0_sns_cm_repair_ag_alloc | ( | struct m0_cm * | cm, |
const struct m0_cm_ag_id * | id, | ||
bool | has_incoming, | ||
struct m0_cm_aggr_group ** | out | ||
) |
Allocates and initializes aggregation group for the given m0_cm_ag_id. Every sns copy machine aggregation group maintains accumulator copy packets, equivalent to the number of failed units in the aggregation group. During initialisation, the buffers are acquired for the accumulator copy packets from the copy machine buffer pool. Caller is responsible to lock the copy machine before calling this function.
Definition at line 453 of file ag.c.
M0_INTERNAL int64_t m0_sns_cm_repair_ag_inbufs | ( | struct m0_sns_cm * | scm, |
struct m0_sns_cm_file_ctx * | fctx, | ||
const struct m0_cm_ag_id * | id | ||
) |
M0_INTERNAL int m0_sns_cm_repair_ag_setup | ( | struct m0_sns_cm_ag * | sag, |
struct m0_pdclust_layout * | pl | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
M0_INTERNAL int repair_cp_bufvec_split | ( | struct m0_cm_cp * | cp | ) |
M0_INTERNAL struct m0_sns_cm_rebalance_ag* sag2rebalanceag | ( | const struct m0_sns_cm_ag * | sag | ) |
M0_INTERNAL struct m0_sns_cm_repair_ag * sag2repairag | ( | const struct m0_sns_cm_ag * | sag | ) |
M0_INTERNAL struct m0_cm * snsag2cm | ( | const struct m0_sns_cm_ag * | sag | ) |
|
static |
|
static |
|
static |
|
static |
|
static |