Motr
M0
|
Modules | |
SNS copy machine Copy packet | |
SNS copy machine aggregation group | |
SNS copy machine file context | |
SNS copy machine service | |
Data Structures | |
struct | m0_sns_cm_buf_pool |
struct | m0_sns_cm_helpers |
struct | m0_sns_cm_rm_ctx |
struct | m0_sns_cm |
struct | m0_sns_cm_iter_file_ctx |
struct | m0_sns_cm_iter |
Functions | |
M0_INTERNAL struct m0_sns_cm * | cm2sns (struct m0_cm *cm) |
M0_INTERNAL int | m0_sns_cm_type_register (void) |
M0_INTERNAL void | m0_sns_cm_type_deregister (void) |
M0_INTERNAL struct m0_cm_cp * | m0_sns_cm_cp_alloc (struct m0_cm *cm) |
static void | bp_below_threshold (struct m0_net_buffer_pool *bp) |
static void | buf_available (struct m0_net_buffer_pool *pool) |
static void | sns_cm_bp_init (struct m0_sns_cm_buf_pool *sbp) |
static void | sns_cm_bp_fini (struct m0_sns_cm_buf_pool *sbp) |
M0_TL_DESCR_DECLARE (cs_eps, extern) | |
M0_TL_DECLARE (cs_eps, M0_INTERNAL, struct cs_endpoint_and_xprt) | |
M0_INTERNAL int | m0_sns_cm_rm_init (struct m0_sns_cm *scm) |
M0_INTERNAL int | m0_sns_cm_setup (struct m0_cm *cm) |
M0_INTERNAL bool | m0_sns_is_peer (struct m0_cm *cm, struct m0_reqh_service_ctx *ctx) |
M0_INTERNAL size_t | m0_sns_cm_buffer_pool_provision (struct m0_net_buffer_pool *bp, size_t bufs_nr) |
M0_INTERNAL int | m0_sns_cm_prepare (struct m0_cm *cm) |
M0_INTERNAL int | m0_sns_cm_fail_dev_log (struct m0_cm *cm, enum m0_pool_nd_state state) |
M0_INTERNAL int | m0_sns_cm_start (struct m0_cm *cm) |
M0_INTERNAL void | m0_sns_cm_rm_fini (struct m0_sns_cm *scm) |
static void | buffer_pool_prune (struct m0_net_buffer_pool *bp) |
static void | sns_cm_buffer_pools_prune (struct m0_sns_cm *scm) |
static bool | sns_cm_status_get (struct m0_sns_cm *scm, size_t *tread, size_t *twrite) |
M0_INTERNAL void | m0_sns_cm_stop (struct m0_cm *cm) |
M0_INTERNAL void | m0_sns_cm_print_status (struct m0_sns_cm *scm) |
M0_INTERNAL void | m0_sns_cm_ha_msg (struct m0_cm *cm, struct m0_ha_msg *msg, int rc) |
M0_INTERNAL void | m0_sns_cm_fini (struct m0_cm *cm) |
M0_INTERNAL uint64_t | m0_sns_cm_cp_buf_nr (struct m0_net_buffer_pool *bp, uint64_t data_seg_nr) |
M0_INTERNAL void | m0_sns_cm_buf_wait (struct m0_sns_cm_buf_pool *sbp, struct m0_fom *fom) |
M0_INTERNAL int | m0_sns_cm_buf_attach (struct m0_net_buffer_pool *bp, struct m0_cm_cp *cp) |
M0_INTERNAL uint64_t | m0_sns_cm_data_seg_nr (struct m0_sns_cm *scm, struct m0_pdclust_layout *pl) |
M0_INTERNAL int64_t | m0_sns_cm_incoming_reserve_bufs (struct m0_sns_cm *scm, const struct m0_cm_ag_id *id) |
M0_INTERNAL int | m0_sns_cm_has_space_for (struct m0_sns_cm *scm, struct m0_pdclust_layout *pl, uint64_t nr_bufs) |
M0_INTERNAL void | m0_sns_cm_reserve_space (struct m0_sns_cm *scm, size_t nr_bufs) |
M0_INTERNAL void | m0_sns_cm_cancel_reservation (struct m0_sns_cm *scm, size_t nr_bufs) |
M0_INTERNAL int | m0_sns_cm_ag_next (struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next) |
M0_INTERNAL void | m0_sns_cm_buffer_pools_prune (struct m0_cm *cm) |
M0_INTERNAL struct m0_net_buffer * | m0_sns_cm_buffer_get (struct m0_net_buffer_pool *bp, size_t colour) |
M0_INTERNAL void | m0_sns_cm_buffer_put (struct m0_net_buffer_pool *bp, struct m0_net_buffer *buf, uint64_t colour) |
M0_INTERNAL void | m0_sns_cm_complete (struct m0_cm *cm) |
M0_INTERNAL enum sns_repair_state | m0_sns_cm_fid_repair_done (struct m0_fid *gfid, struct m0_reqh *reqh, enum m0_pool_nd_state device_state) |
M0_INTERNAL void | m0_sns_cm_repair_trigger_fop_init (void) |
M0_INTERNAL void | m0_sns_cm_repair_trigger_fop_fini (void) |
M0_INTERNAL void | m0_sns_cm_rebalance_trigger_fop_init (void) |
M0_INTERNAL void | m0_sns_cm_rebalance_trigger_fop_fini (void) |
M0_INTERNAL void | m0_sns_cm_repair_sw_onwire_fop_init (void) |
M0_INTERNAL void | m0_sns_cm_repair_sw_onwire_fop_fini (void) |
M0_INTERNAL void | m0_sns_cm_rebalance_sw_onwire_fop_init (void) |
M0_INTERNAL void | m0_sns_cm_rebalance_sw_onwire_fop_fini (void) |
M0_INTERNAL int | m0_sns_cm_ut_file_size_layout (struct m0_sns_cm_file_ctx *fctx) |
M0_INTERNAL void | m0_sns_cm_unit2cobfid (struct m0_sns_cm_file_ctx *fctx, const struct m0_pdclust_src_addr *sa, struct m0_pdclust_tgt_addr *ta, struct m0_fid *cfid_out) |
M0_INTERNAL uint32_t | m0_sns_cm_device_index_get (uint64_t group, uint64_t unit_number, struct m0_sns_cm_file_ctx *fctx) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_unit2cobindex (struct m0_sns_cm_ag *sag, uint64_t unit) |
M0_INTERNAL int | m0_sns_cm_cob_locate (struct m0_cob_domain *cdom, const struct m0_fid *cob_fid) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_nr_local_units (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_nr_global_units (const struct m0_sns_cm_ag *sag, struct m0_pdclust_layout *pl) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_nr_data_units (const struct m0_pdclust_layout *pl) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_nr_parity_units (const struct m0_pdclust_layout *pl) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_nr_spare_units (const struct m0_pdclust_layout *pl) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_size (const struct m0_pdclust_layout *pl) |
M0_INTERNAL bool | m0_sns_cm_is_cob_repaired (struct m0_poolmach *pm, uint32_t cob_index) |
M0_INTERNAL bool | m0_sns_cm_is_cob_repairing (struct m0_poolmach *pm, uint32_t cob_index) |
M0_INTERNAL bool | m0_sns_cm_is_cob_rebalancing (struct m0_poolmach *pm, uint32_t cob_index) |
M0_INTERNAL bool | m0_sns_cm_unit_is_spare (struct m0_sns_cm_file_ctx *fctx, uint64_t group_nr, uint64_t spare_nr) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_spare_unit_nr (const struct m0_pdclust_layout *pl, uint64_t fidx) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_unit_start (const struct m0_sns_cm *scm, const struct m0_pdclust_layout *pl) |
M0_INTERNAL uint64_t | m0_sns_cm_ag_unit_end (const struct m0_sns_cm *scm, const struct m0_pdclust_layout *pl) |
M0_INTERNAL int | m0_sns_cm_ag_tgt_unit2cob (struct m0_sns_cm_ag *sag, uint64_t tgt_unit, struct m0_fid *cobfid) |
static const char * | local_ep (const struct m0_cm *cm) |
static struct m0_conf_service * | cm_conf_service_get (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid) |
M0_INTERNAL const char * | m0_sns_cm_tgt_ep (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid, struct m0_conf_obj **hostage) |
M0_INTERNAL bool | m0_sns_cm_is_local_cob (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid) |
M0_INTERNAL size_t | m0_sns_cm_ag_unrepaired_units (const struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group, struct m0_bitmap *fmap_out) |
M0_INTERNAL bool | m0_sns_cm_ag_is_relevant (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_ag_in_cp_units (const struct m0_sns_cm *scm, const struct m0_cm_ag_id *id, struct m0_sns_cm_file_ctx *fctx, uint32_t *in_cp_nr, uint32_t *in_units_nr, struct m0_cm_proxy_in_count *pcount) |
M0_INTERNAL bool | m0_sns_cm_fid_is_valid (const struct m0_sns_cm *snscm, const struct m0_fid *fid) |
M0_INTERNAL struct m0_reqh * | m0_sns_cm2reqh (const struct m0_sns_cm *snscm) |
M0_INTERNAL bool | m0_sns_cm_disk_has_dirty_pver (struct m0_cm *cm, struct m0_conf_drive *disk, bool clear) |
M0_INTERNAL bool | m0_sns_cm_pver_is_dirty (struct m0_pool_version *pver) |
M0_INTERNAL void | m0_sns_cm_pver_dirty_set (struct m0_pool_version *pver) |
M0_INTERNAL int | m0_sns_cm_pool_ha_nvec_alloc (struct m0_pool *pool, enum m0_pool_nd_state state, struct m0_ha_nvec *nvec) |
M0_INTERNAL bool | m0_sns_cm_group_has_local_presence (struct m0_sns_cm_file_ctx *fctx, uint32_t units_per_group, uint64_t group) |
M0_INTERNAL enum m0_sns_cm_local_unit_type | m0_sns_cm_local_unit_type_get (struct m0_sns_cm_file_ctx *fctx, uint64_t group, uint64_t unit) |
M0_INTERNAL bool | m0_sns_cm_ag_relevant_is_done (const struct m0_cm_aggr_group *ag, uint64_t nr_cps_fini) |
M0_BOB_DEFINE (static, &iter_bob, m0_sns_cm_iter) | |
M0_INTERNAL struct m0_sns_cm * | it2sns (struct m0_sns_cm_iter *it) |
static enum cm_data_iter_phase | iter_phase (const struct m0_sns_cm_iter *it) |
static void | iter_phase_set (struct m0_sns_cm_iter *it, int phase) |
static bool | iter_layout_invariant (enum cm_data_iter_phase phase, const struct m0_sns_cm_iter_file_ctx *ifc) |
static bool | iter_invariant (const struct m0_sns_cm_iter *it) |
static void | unit_to_cobfid (struct m0_sns_cm_iter_file_ctx *ifc, struct m0_fid *cob_fid_out) |
M0_INTERNAL int | __fid_next (struct m0_sns_cm_iter *it, struct m0_fid *fid_next) |
static int | __file_context_init (struct m0_sns_cm_iter *it) |
static int | group__next (struct m0_sns_cm_iter *it) |
static int | iter_fid_attr_layout (struct m0_sns_cm_iter *it) |
static int | iter_fid_lock (struct m0_sns_cm_iter *it) |
static int | iter_fid_lock_wait (struct m0_sns_cm_iter *it) |
static int | iter_fid_next (struct m0_sns_cm_iter *it) |
static bool | __has_incoming (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group) |
static bool | __group_skip (struct m0_sns_cm_iter *it, uint64_t group) |
static int | __group_alloc (struct m0_sns_cm *scm, struct m0_fid *gfid, uint64_t group, struct m0_pdclust_layout *pl, bool has_incoming, struct m0_cm_aggr_group **ag) |
static int | __group_next (struct m0_sns_cm_iter *it) |
static int | iter_group_next (struct m0_sns_cm_iter *it) |
static int | iter_ag_setup (struct m0_sns_cm_iter *it) |
static bool | unit_has_data (struct m0_sns_cm *scm, uint32_t unit) |
static int | iter_cp_setup (struct m0_sns_cm_iter *it) |
static int | iter_cob_next (struct m0_sns_cm_iter *it) |
M0_INTERNAL int | iter_idle (struct m0_sns_cm_iter *it) |
M0_INTERNAL int | m0_sns_cm_iter_next (struct m0_cm *cm, struct m0_cm_cp *cp) |
M0_INTERNAL int | m0_sns_cm_iter_init (struct m0_sns_cm_iter *it) |
M0_INTERNAL int | m0_sns_cm_iter_start (struct m0_sns_cm_iter *it) |
M0_INTERNAL void | m0_sns_cm_iter_stop (struct m0_sns_cm_iter *it) |
M0_INTERNAL void | m0_sns_cm_iter_fini (struct m0_sns_cm_iter *it) |
M0_INTERNAL void | m0_sns_cm_iter_tgt_unit_to_cob (struct m0_sns_cm_ag *rag) |
M0_INTERNAL uint64_t | m0_sns_cm_iter_failures_nr (const struct m0_sns_cm_iter *it) |
M0_INTERNAL ssize_t | m0_sns_cm_iter_file_size (struct m0_fid *gfid) |
M0_INTERNAL int | m0_sns_cm_fctx_pm (struct m0_sns_cm_file_ctx *fctx, struct m0_fid *gfid, struct m0_poolmach **mach) |
Variables | |
M0_EXTERN struct m0_cm_type | sns_repair_cmt |
M0_EXTERN struct m0_cm_type | sns_rebalance_cmt |
const struct m0_sns_cm_helpers | repair_helpers |
const struct m0_sns_cm_helpers | rebalance_helpers |
const struct m0_net_buffer_pool_ops | bp_ops |
enum { ... } | M0_XCA_DOMAIN |
static const struct m0_bob_type | iter_bob |
static int(* | iter_action [])(struct m0_sns_cm_iter *it) |
static struct m0_sm_state_descr | cm_iter_sd [ITPH_NR] |
static const struct m0_sm_conf | cm_iter_sm_conf |
SNS copy machine is a replicated state machine, which performs data restructuring and handles device, container, node, &c failures.
SNS copy machine implements a copy machine in-order to re-structure data efficiently in an event of a failure. It uses GOB (global file object) and COB (component object) infrastructure with parity de-clustering layout.
anonymous enum |
Enumerator | |
---|---|
SNS_SEG_NR | |
SNS_SEG_SIZE | |
SNS_COB_FID_START | Currently m0t1fs uses default fid_start = 4, where 0 - 3 are reserved for special purpose fids.
|
anonymous enum |
Enumerator | |
---|---|
SNS_DEFAULT_FILE_SIZE | |
SNS_DEFAULT_N | |
SNS_DEFAULT_K | |
SNS_DEFAULT_S | |
SNS_DEFAULT_P | |
SNS_DEFAULT_UNIT_SIZE |
Definition at line 51 of file cm_utils.c.
enum cm_data_iter_phase |
Enumerator | |
---|---|
ITPH_INIT | |
ITPH_IDLE | Iterator is in this phase when m0_cm:cm_ops::cmo_data_next() is first invoked as part of m0_cm_start() and m0_cm_cp_pump_start(), from m0_cm_data_next(). This starts the sns repair data iterator and sets the iterator to first local data unit of a parity group from a GOB (file) that needs repair. |
ITPH_COB_NEXT | Iterator is in this phase until all the local data units of a parity group are serviced (i.e. copy packets are created). |
ITPH_GROUP_NEXT | Iterator transitions to this phase to select next parity group that needs to be repaired, and has local data units. |
ITPH_FID_NEXT | Iterator transitions to this phase in-order to select next GOB that needs repair. |
ITPH_FID_LOCK | Iterator tries to acquire the async rm file lock in this phase. |
ITPH_FID_LOCK_WAIT | Iterator waits for the rm file lock to be acquired in this phase. |
ITPH_FID_ATTR_LAYOUT | Fetch file attributes and layout. |
ITPH_CP_SETUP | Once next local data unit of parity group needing repair is calculated along with its corresponding COB fid, the pre allocated copy packet by the copy machine pump FOM is populated with required details.
|
ITPH_AG_SETUP | Once the aggregation group is created and initialised, we need to acquire buffers for accumulator copy packet in the aggregation group falure contexts. This operation may block.
|
ITPH_FINI | Iterator is finalised after the sns repair operation is complete. This is done as part of m0_cm_stop(). |
ITPH_NR |
enum m0_sns_cm_op |
Operation that sns copy machine is carrying out.
Enumerator | |
---|---|
SNS_INVALID | |
SNS_REPAIR | |
SNS_REBALANCE | |
SNS_REPAIR_QUIESCE | |
SNS_REBALANCE_QUIESCE | |
SNS_REPAIR_STATUS | |
SNS_REBALANCE_STATUS | |
SNS_REPAIR_ABORT | |
SNS_REBALANCE_ABORT |
enum m0_sns_cm_status |
M0_INTERNAL int __fid_next | ( | struct m0_sns_cm_iter * | it, |
struct m0_fid * | fid_next | ||
) |
|
static |
|
static |
|
static |
Finds parity group having units belonging to the failed container. This iterates through each parity group of the file, and its units. A COB id is calculated for each unit and checked if ti belongs to the failed container, if yes then the group is selected for processing. This is invoked from ITPH_GROUP_NEXT phase.
Definition at line 474 of file iter.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Gets IO service which given cob is associated with.
Definition at line 414 of file cm_utils.c.
|
static |
M0_INTERNAL struct m0_sns_cm* it2sns | ( | struct m0_sns_cm_iter * | it | ) |
|
static |
|
static |
Finds next local COB corresponding to a unit in the parity group to perform read/write. For each unit in the given parity group, it calculates its corresponding COB fid, and checks if the COB is local. If no local COB is found for a given parity group after iterating through all its units, next parity group is calculated, else the pre-allocated copy packet is populated with required stob details details.
Definition at line 690 of file iter.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
M0_INTERNAL int iter_idle | ( | struct m0_sns_cm_iter * | it | ) |
Transitions the data iterator (m0_sns_cm::sc_it) to ITPH_FID_NEXT in-order to find the first GOB and parity group that needs repair.
Definition at line 739 of file iter.c.
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 397 of file cm_utils.c.
M0_BOB_DEFINE | ( | static | , |
& | iter_bob, | ||
m0_sns_cm_iter | |||
) |
M0_INTERNAL int m0_sns_cm_ag_in_cp_units | ( | const struct m0_sns_cm * | scm, |
const struct m0_cm_ag_id * | id, | ||
struct m0_sns_cm_file_ctx * | fctx, | ||
uint32_t * | in_cp_nr, | ||
uint32_t * | in_units_nr, | ||
struct m0_cm_proxy_in_count * | pcount | ||
) |
Definition at line 526 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_ag_is_relevant | ( | struct m0_sns_cm * | scm, |
struct m0_sns_cm_file_ctx * | fctx, | ||
const struct m0_cm_ag_id * | id | ||
) |
Returns true if the given aggregation group corresponding to the id is relevant. Thus if a node hosts the spare unit of the given aggregation group and which is not the failed unit of the group, the group is considered for the repair.
Definition at line 505 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_ag_next | ( | struct m0_cm * | cm, |
const struct m0_cm_ag_id * | id_curr, | ||
struct m0_cm_ag_id * | id_next | ||
) |
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_data_units | ( | const struct m0_pdclust_layout * | pl | ) |
Definition at line 222 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_global_units | ( | const struct m0_sns_cm_ag * | sag, |
struct m0_pdclust_layout * | pl | ||
) |
Definition at line 215 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_local_units | ( | struct m0_sns_cm * | scm, |
struct m0_sns_cm_file_ctx * | fctx, | ||
uint64_t | group | ||
) |
Calculates number of local data units for a given parity group. This is invoked when new struct m0_sns_cm_ag instance is allocated, from m0_cm_aggr_group_alloc(). This is done in context of sns copy machine data iterator during the latter's ITPH_CP_SETUP phase. Thus we need not calculate the new GOB layout and corresponding pdclust instance, instead used the ones already calculated and save in the iterator, but we take GOB fid and group number as the parameters to this function in-order to perform sanity checks.
Definition at line 176 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_parity_units | ( | const struct m0_pdclust_layout * | pl | ) |
Definition at line 228 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_spare_units | ( | const struct m0_pdclust_layout * | pl | ) |
Definition at line 234 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_ag_relevant_is_done | ( | const struct m0_cm_aggr_group * | ag, |
uint64_t | nr_cps_fini | ||
) |
M0_INTERNAL uint64_t m0_sns_cm_ag_size | ( | const struct m0_pdclust_layout * | pl | ) |
Definition at line 239 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_spare_unit_nr | ( | const struct m0_pdclust_layout * | pl, |
uint64_t | fidx | ||
) |
Returns index of spare unit in the parity group, given the failure index in the group.
Definition at line 362 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_ag_tgt_unit2cob | ( | struct m0_sns_cm_ag * | sag, |
uint64_t | tgt_unit, | ||
struct m0_fid * | cobfid | ||
) |
Calculates and returns the cobfid for the given group and the target unit of the file (represented by the gobfid).
Definition at line 381 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_unit2cobindex | ( | struct m0_sns_cm_ag * | sag, |
uint64_t | unit | ||
) |
Definition at line 143 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_unit_end | ( | const struct m0_sns_cm * | scm, |
const struct m0_pdclust_layout * | pl | ||
) |
Returns end index of the unit in the aggregation group relevant to the sns copy machine operation.
Definition at line 375 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_ag_unit_start | ( | const struct m0_sns_cm * | scm, |
const struct m0_pdclust_layout * | pl | ||
) |
Returns starting index of the unit in the aggregation group relevant to the sns copy machine operation.
Definition at line 369 of file cm_utils.c.
M0_INTERNAL size_t m0_sns_cm_ag_unrepaired_units | ( | const struct m0_sns_cm * | scm, |
struct m0_sns_cm_file_ctx * | fctx, | ||
uint64_t | group, | ||
struct m0_bitmap * | fmap_out | ||
) |
Definition at line 464 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_buf_attach | ( | struct m0_net_buffer_pool * | bp, |
struct m0_cm_cp * | cp | ||
) |
M0_INTERNAL void m0_sns_cm_buf_wait | ( | struct m0_sns_cm_buf_pool * | sbp, |
struct m0_fom * | fom | ||
) |
M0_INTERNAL struct m0_net_buffer* m0_sns_cm_buffer_get | ( | struct m0_net_buffer_pool * | bp, |
size_t | colour | ||
) |
M0_INTERNAL size_t m0_sns_cm_buffer_pool_provision | ( | struct m0_net_buffer_pool * | bp, |
size_t | bufs_nr | ||
) |
M0_INTERNAL void m0_sns_cm_buffer_pools_prune | ( | struct m0_cm * | cm | ) |
M0_INTERNAL void m0_sns_cm_buffer_put | ( | struct m0_net_buffer_pool * | bp, |
struct m0_net_buffer * | buf, | ||
uint64_t | colour | ||
) |
M0_INTERNAL void m0_sns_cm_cancel_reservation | ( | struct m0_sns_cm * | scm, |
size_t | nr_bufs | ||
) |
M0_INTERNAL int m0_sns_cm_cob_locate | ( | struct m0_cob_domain * | cdom, |
const struct m0_fid * | cob_fid | ||
) |
Searches for given cob_fid in the local cob domain.
Definition at line 157 of file cm_utils.c.
M0_INTERNAL void m0_sns_cm_complete | ( | struct m0_cm * | cm | ) |
M0_INTERNAL uint64_t m0_sns_cm_cp_buf_nr | ( | struct m0_net_buffer_pool * | bp, |
uint64_t | data_seg_nr | ||
) |
M0_INTERNAL uint64_t m0_sns_cm_data_seg_nr | ( | struct m0_sns_cm * | scm, |
struct m0_pdclust_layout * | pl | ||
) |
M0_INTERNAL uint32_t m0_sns_cm_device_index_get | ( | uint64_t | group, |
uint64_t | unit_number, | ||
struct m0_sns_cm_file_ctx * | fctx | ||
) |
Definition at line 126 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_disk_has_dirty_pver | ( | struct m0_cm * | cm, |
struct m0_conf_drive * | disk, | ||
bool | clear | ||
) |
Definition at line 552 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_fail_dev_log | ( | struct m0_cm * | cm, |
enum m0_pool_nd_state | state | ||
) |
M0_INTERNAL int m0_sns_cm_fctx_pm | ( | struct m0_sns_cm_file_ctx * | fctx, |
struct m0_fid * | gfid, | ||
struct m0_poolmach ** | mach | ||
) |
Returns struct m0_poolmach for the given file identified by .
M0_INTERNAL bool m0_sns_cm_fid_is_valid | ( | const struct m0_sns_cm * | snscm, |
const struct m0_fid * | fid | ||
) |
Definition at line 539 of file cm_utils.c.
M0_INTERNAL enum sns_repair_state m0_sns_cm_fid_repair_done | ( | struct m0_fid * | gfid, |
struct m0_reqh * | reqh, | ||
enum m0_pool_nd_state | device_state | ||
) |
Returns state of SNS repair process with respect to .
gfid | Input global fid for which SNS repair state has to be retrieved. |
reqh | Parent request handler object. |
Definition at line 187 of file cm.c.
M0_INTERNAL void m0_sns_cm_fini | ( | struct m0_cm * | cm | ) |
M0_INTERNAL bool m0_sns_cm_group_has_local_presence | ( | struct m0_sns_cm_file_ctx * | fctx, |
uint32_t | units_per_group, | ||
uint64_t | group | ||
) |
M0_INTERNAL int m0_sns_cm_has_space_for | ( | struct m0_sns_cm * | scm, |
struct m0_pdclust_layout * | pl, | ||
uint64_t | nr_bufs | ||
) |
Returns true iff the copy machine has enough space to receive all the copy packets from the given relevant group "id". Reserves buffers from incoming buffer pool struct m0_sns_cm::sc_ibp corresponding to all the incoming copy packets. e.g. sns repair copy machine checks if the incoming buffer pool has enough free buffers to receive all the remote units corresponding to a parity group.
Definition at line 894 of file cm.c.
M0_INTERNAL int64_t m0_sns_cm_incoming_reserve_bufs | ( | struct m0_sns_cm * | scm, |
const struct m0_cm_ag_id * | id | ||
) |
M0_INTERNAL bool m0_sns_cm_is_cob_rebalancing | ( | struct m0_poolmach * | pm, |
uint32_t | cob_index | ||
) |
Definition at line 266 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_is_cob_repaired | ( | struct m0_poolmach * | pm, |
uint32_t | cob_index | ||
) |
Definition at line 246 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_is_cob_repairing | ( | struct m0_poolmach * | pm, |
uint32_t | cob_index | ||
) |
Definition at line 256 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_is_local_cob | ( | const struct m0_cm * | cm, |
const struct m0_pool_version * | pv, | ||
const struct m0_fid * | cob_fid | ||
) |
Definition at line 449 of file cm_utils.c.
M0_INTERNAL uint64_t m0_sns_cm_iter_failures_nr | ( | const struct m0_sns_cm_iter * | it | ) |
M0_INTERNAL ssize_t m0_sns_cm_iter_file_size | ( | struct m0_fid * | gfid | ) |
M0_INTERNAL void m0_sns_cm_iter_fini | ( | struct m0_sns_cm_iter * | it | ) |
M0_INTERNAL int m0_sns_cm_iter_init | ( | struct m0_sns_cm_iter * | it | ) |
Calculates next data object to be re-structured and accordingly populates the given copy packet.
Iterates over parity groups in global fid order, calculates next data or parity unit from the parity group to be read, calculates cob fid for the parity unit, creates and initialises new aggregation group corresponding to the parity group if required, and fills this information in the given copy packet. After initialising copy packet with the stob details, an empty buffer from the struct m0_sns_cm::rc_obp buffer pool is attached to the copy packet.
Definition at line 762 of file iter.c.
M0_INTERNAL int m0_sns_cm_iter_start | ( | struct m0_sns_cm_iter * | it | ) |
M0_INTERNAL void m0_sns_cm_iter_stop | ( | struct m0_sns_cm_iter * | it | ) |
M0_INTERNAL void m0_sns_cm_iter_tgt_unit_to_cob | ( | struct m0_sns_cm_ag * | rag | ) |
Calculates fid of the COB containing the spare unit, and its index into the COB for the given failure index in the aggregation group.
M0_INTERNAL enum m0_sns_cm_local_unit_type m0_sns_cm_local_unit_type_get | ( | struct m0_sns_cm_file_ctx * | fctx, |
uint64_t | group, | ||
uint64_t | unit | ||
) |
Definition at line 634 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_pool_ha_nvec_alloc | ( | struct m0_pool * | pool, |
enum m0_pool_nd_state | state, | ||
struct m0_ha_nvec * | nvec | ||
) |
Definition at line 585 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_prepare | ( | struct m0_cm * | cm | ) |
M0_INTERNAL void m0_sns_cm_print_status | ( | struct m0_sns_cm * | scm | ) |
M0_INTERNAL void m0_sns_cm_pver_dirty_set | ( | struct m0_pool_version * | pver | ) |
M0_INTERNAL bool m0_sns_cm_pver_is_dirty | ( | struct m0_pool_version * | pver | ) |
M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_fini | ( | void | ) |
Definition at line 81 of file sw_onwire_fop.c.
M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_init | ( | void | ) |
Definition at line 63 of file sw_onwire_fop.c.
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_fini | ( | void | ) |
Definition at line 42 of file trigger_fop.c.
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_init | ( | void | ) |
Definition at line 54 of file trigger_fop.c.
M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_fini | ( | void | ) |
Definition at line 81 of file sw_onwire_fop.c.
M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_init | ( | void | ) |
Definition at line 63 of file sw_onwire_fop.c.
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_fini | ( | void | ) |
Definition at line 43 of file trigger_fop.c.
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_init | ( | void | ) |
Definition at line 55 of file trigger_fop.c.
M0_INTERNAL void m0_sns_cm_reserve_space | ( | struct m0_sns_cm * | scm, |
size_t | nr_bufs | ||
) |
M0_INTERNAL void m0_sns_cm_rm_fini | ( | struct m0_sns_cm * | scm | ) |
M0_INTERNAL int m0_sns_cm_rm_init | ( | struct m0_sns_cm * | scm | ) |
M0_INTERNAL int m0_sns_cm_setup | ( | struct m0_cm * | cm | ) |
M0_INTERNAL int m0_sns_cm_start | ( | struct m0_cm * | cm | ) |
M0_INTERNAL void m0_sns_cm_stop | ( | struct m0_cm * | cm | ) |
M0_INTERNAL const char * m0_sns_cm_tgt_ep | ( | const struct m0_cm * | cm, |
const struct m0_pool_version * | pv, | ||
const struct m0_fid * | gfid, | ||
struct m0_conf_obj ** | hostage | ||
) |
Gets endpoint address of the IO service which given cob is associated with.
Definition at line 434 of file cm_utils.c.
M0_INTERNAL void m0_sns_cm_type_deregister | ( | void | ) |
M0_INTERNAL int m0_sns_cm_type_register | ( | void | ) |
M0_INTERNAL void m0_sns_cm_unit2cobfid | ( | struct m0_sns_cm_file_ctx * | fctx, |
const struct m0_pdclust_src_addr * | sa, | ||
struct m0_pdclust_tgt_addr * | ta, | ||
struct m0_fid * | cfid_out | ||
) |
Returns cob fid for the sa->sa_unit.
Definition at line 117 of file cm_utils.c.
M0_INTERNAL bool m0_sns_cm_unit_is_spare | ( | struct m0_sns_cm_file_ctx * | fctx, |
uint64_t | group_nr, | ||
uint64_t | spare_nr | ||
) |
Definition at line 277 of file cm_utils.c.
M0_INTERNAL int m0_sns_cm_ut_file_size_layout | ( | struct m0_sns_cm_file_ctx * | fctx | ) |
Builds temporary layout and uses default file size for given gob_fid. Only for UT purposes.
Definition at line 68 of file cm_utils.c.
M0_INTERNAL bool m0_sns_is_peer | ( | struct m0_cm * | cm, |
struct m0_reqh_service_ctx * | ctx | ||
) |
M0_TL_DECLARE | ( | cs_eps | , |
M0_INTERNAL | , | ||
struct cs_endpoint_and_xprt | |||
) |
M0_TL_DESCR_DECLARE | ( | cs_eps | , |
extern | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Calculates COB fid for m0_sns_cm_iter_file_ctx::ifc_sa. Saves calculated struct m0_pdclust_tgt_addr in m0_sns_cm_iter_file_ctx::ifc_ta.
Definition at line 173 of file iter.c.
const struct m0_net_buffer_pool_ops bp_ops |
|
static |
|
static |
|
static |
|
static |
enum { ... } M0_XCA_DOMAIN |
const struct m0_sns_cm_helpers rebalance_helpers |
const struct m0_sns_cm_helpers repair_helpers |
M0_EXTERN struct m0_cm_type sns_rebalance_cmt |
M0_EXTERN struct m0_cm_type sns_repair_cmt |