23 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SNSCM 97 num_bytes -= frag_size;
107 uint64_t total_data_seg_nr;
114 for (src_nbuf = cp_data_buf_tlist_head(&src_cp->
c_buffers),
115 dst_nbuf = cp_data_buf_tlist_head(&dst_cp->
c_buffers);
116 src_nbuf !=
NULL && dst_nbuf !=
NULL;
117 src_nbuf = cp_data_buf_tlist_next(&src_cp->
c_buffers, src_nbuf),
118 dst_nbuf = cp_data_buf_tlist_next(&dst_cp->
c_buffers, dst_nbuf))
140 nbuf_head = cp_data_buf_tlist_head(&src_cp->
c_buffers);
153 M0_PRE(
dst->c_xform_cp_indices.b_nr <=
src->c_xform_cp_indices.b_nr);
155 for (
i = 0;
i <
src->c_xform_cp_indices.b_nr; ++
i) {
178 uint64_t incoming_nr;
249 "parity_algo=%d", (
int)pm_algo);
253 " transformed_cp_nr=[%" PRId64 "] global_cp_nr=[%" PRId64 "] " 254 "has_incoming=%d c_ag_cp_idx=[%" PRId64 "]",
313 if (
rc != 0 &&
rc != -ENOENT)
319 if (
rc == -ESHUTDOWN) {
332 if (
rc == 0 ||
rc == -ENOENT)
342 #undef M0_TRACE_SUBSYSTEM
M0_INTERNAL void m0_cm_ag_unlock(struct m0_cm_aggr_group *ag)
M0_INTERNAL bool m0_pdclust_is_replicated(struct m0_pdclust_layout *play)
struct m0_net_buffer_pool * nb_pool
struct m0_parity_math rag_math
struct m0_bitmap c_xform_cp_indices
enum m0_parity_cal_algo pmi_parity_algo
struct m0_bufvec nb_buffer
static int res_cp_enqueue(struct m0_cm_cp *cp)
static int cp_rs_recover(struct m0_cm_cp *src_cp, uint32_t failed_index)
#define M0_LOG(level,...)
M0_INTERNAL void m0_parity_math_buffer_xor(struct m0_buf *dest, const struct m0_buf *src)
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 void m0_buf_init(struct m0_buf *buf, void *data, uint32_t nob)
struct m0_layout * sf_layout
struct m0_cm_ag_id cag_id
M0_INTERNAL int m0_cm_cp_bufvec_split(struct m0_cm_cp *cp)
M0_INTERNAL void * m0_bufvec_cursor_addr(struct m0_bufvec_cursor *cur)
uint64_t cag_cp_global_nr
M0_INTERNAL bool m0_bufvec_cursor_move(struct m0_bufvec_cursor *cur, m0_bcount_t count)
M0_INTERNAL void m0_cm_cp_data_copy(struct m0_cm_cp *src, struct m0_cm_cp *dst)
static struct m0_sns_cm_ag * sag
static void res_cp_bitmap_merge(struct m0_cm_cp *dst, struct m0_cm_cp *src)
return M0_ERR(-EOPNOTSUPP)
struct m0_sns_cm_ag rag_base
M0_INTERNAL void m0_cm_ag_lock(struct m0_cm_aggr_group *ag)
M0_INTERNAL m0_bcount_t m0_bufvec_cursor_step(const struct m0_bufvec_cursor *cur)
M0_INTERNAL struct m0_pool_version * m0_sns_cm_pool_version_get(struct m0_sns_cm_file_ctx *fctx)
struct m0_fid fc_tgt_cobfid
void m0_fom_phase_move(struct m0_fom *fom, int32_t rc, int phase)
M0_INTERNAL int m0_sns_ir_recover(struct m0_sns_ir *ir, struct m0_bufvec *bufvec, const struct m0_bitmap *bitmap, uint32_t failed_index, enum m0_sns_ir_block_type block_type)
M0_INTERNAL void m0_bufvec_cursor_init(struct m0_bufvec_cursor *cur, const struct m0_bufvec *bvec)
M0_INTERNAL struct m0_pdclust_layout * m0_layout_to_pdl(const struct m0_layout *l)
struct m0_sns_cm_cp fc_tgt_acc_cp
M0_INTERNAL void m0_bitmap_set(struct m0_bitmap *map, size_t idx, bool val)
M0_INTERNAL struct m0_sns_cm_repair_ag * sag2repairag(const struct m0_sns_cm_ag *sag)
struct m0_cm_aggr_group * c_ag
static void bufvec_xor(struct m0_bufvec *dst, struct m0_bufvec *src, m0_bcount_t num_bytes)
M0_INTERNAL struct m0_sns_cm_cp * cp2snscp(const struct m0_cm_cp *cp)
M0_INTERNAL int m0_cm_cp_bufvec_merge(struct m0_cm_cp *cp)
uint64_t cag_transformed_cp_nr
M0_INTERNAL bool m0_sns_cm_ag_acc_is_full_with(const struct m0_cm_cp *acc, uint64_t nr_cps)
M0_INTERNAL int repair_cp_bufvec_split(struct m0_cm_cp *cp)
struct m0_sns_cm_file_ctx * sag_fctx
M0_INTERNAL int m0_cm_cp_enqueue(struct m0_cm *cm, struct m0_cm_cp *cp)
struct m0_sns_cm_repair_ag_failure_ctx * rag_fc
static void cp_xor_recover(struct m0_cm_cp *dst_cp, struct m0_cm_cp *src_cp)
static struct m0_sns_cm_cp scp
static int repair_ag_fc_acc_post(struct m0_sns_cm_repair_ag *rag, struct m0_sns_cm_repair_ag_failure_ctx *fc)
M0_INTERNAL bool m0_bitmap_get(const struct m0_bitmap *map, size_t idx)
uint32_t sag_incoming_units_nr
#define M0_ASSERT_INFO(cond, fmt,...)
static struct m0_sns_cm_file_ctx fctx
static struct m0_sns_cm_repair_ag rag
struct m0_cm_aggr_group sag_base
M0_INTERNAL int m0_sns_cm_repair_cp_xform(struct m0_cm_cp *cp)
struct m0_pdclust_src_addr src
M0_INTERNAL struct m0_sns_cm_ag * ag2snsag(const struct m0_cm_aggr_group *ag)