29 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_M0D 61 &
index->dd_layout.u.dl_desc);
163 "rc=%d", sdev_idx,
rc);
202 iter_max =
pver->pv_attr.pa_N +
pver->pv_attr.pa_K +
pver->pv_attr.pa_S;
204 for (
i = 0;
i < iter_max; ++
i) {
213 sdev = &
pver->pv_mach.pm_state->pst_devices_array[
tgt];
244 if (cas_svc->
sc_type != M0_CST_CAS) {
273 struct m0_fid root_pver_fid;
289 const char *layout_key =
"layout";
290 const char *ldescr_key =
"layout-descr";
351 M0_ASSERT(pool_failed_devs_tlist_is_empty(
352 &
pver->pv_pool->po_failed_devices));
357 goto exit_fini_pools;
361 pver->pv_attr.pa_P,
pver->pv_attr.pa_N,
pver->pv_attr.pa_K);
474 #undef M0_TRACE_SUBSYSTEM struct m0_poolmach_state * pm_state
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_lookup(const struct m0_reqh *reqh, const struct m0_fid *fid)
M0_INTERNAL int m0_dix_desc_set(struct m0_dix *dix, const struct m0_dix_ldesc *desc)
const m0_time_t M0_TIME_NEVER
M0_INTERNAL struct m0_pool_version * m0_pool_version_find(struct m0_pools_common *pc, const struct m0_fid *id)
static struct io_request req
M0_INTERNAL int m0_rpc_link_init(struct m0_rpc_link *rlink, struct m0_rpc_machine *mach, struct m0_fid *svc_fid, const char *ep, uint64_t max_rpcs_in_flight)
struct m0_conf_obj rt_obj
#define M0_LOG(level,...)
M0_INTERNAL void m0_reqh_layouts_cleanup(struct m0_reqh *reqh)
M0_INTERNAL const struct m0_fid m0_dix_layout_fid
M0_INTERNAL void cs_service_fini(struct m0_reqh_service *service)
M0_INTERNAL void m0_cas_id_fini(struct m0_cas_id *cid)
struct m0_dix_layout ci_layout
M0_INTERNAL int m0_dix_layout_iter_init(struct m0_dix_layout_iter *iter, const struct m0_fid *index, struct m0_layout_domain *ldom, struct m0_pool_version *pver, struct m0_dix_ldesc *ldesc, struct m0_buf *key)
static struct m0_rpc_client_ctx cctx
M0_INTERNAL void m0_rpc_link_fini(struct m0_rpc_link *rlink)
static bool is_spare(uint64_t alloc_flags)
M0_INTERNAL int cs_service_init(const char *name, struct m0_reqh_context *rctx, struct m0_reqh *reqh, struct m0_fid *fid)
M0_INTERNAL struct m0_rpc_machine * m0_motr_to_rmach(struct m0_motr *motr)
static const struct m0_fid * cas_fid(const struct m0_fom *fom)
static int cs_dix_keys_vals_init(struct m0_bufvec *keys, struct m0_bufvec *vals, const char *key, const struct m0_fid *fid, struct m0_dix_ldesc *dld)
static struct m0_pools_common pc
M0_INTERNAL struct m0_reqh_service_type * m0_reqh_service_type_find(const char *sname)
static void cs_dix_keys_vals_fini(struct m0_bufvec *keys, struct m0_bufvec *vals)
M0_INTERNAL void m0_cas_req_unlock(struct m0_cas_req *req)
M0_INTERNAL void m0_dix_layout_iter_fini(struct m0_dix_layout_iter *iter)
M0_INTERNAL int m0_dix_ldesc_copy(struct m0_dix_ldesc *dst, const struct m0_dix_ldesc *src)
M0_INTERNAL int m0_sm_timedwait(struct m0_sm *mach, uint64_t states, m0_time_t deadline)
struct m0_pooldev * pst_devices_array
M0_INTERNAL void m0_cas_req_lock(struct m0_cas_req *req)
M0_INTERNAL int m0_confc_root_open(struct m0_confc *confc, struct m0_conf_root **root)
static int cs_dix_create_sync(struct m0_dix *index, uint32_t sdev_idx, struct m0_rpc_link *link)
struct m0_reqh_context rctx
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
struct m0_conf_root * root
M0_INTERNAL int m0_cas_req_generic_rc(const struct m0_cas_req *req)
M0_INTERNAL void m0_cas_req_init(struct m0_cas_req *req, struct m0_rpc_session *sess, struct m0_sm_group *grp)
M0_INTERNAL struct m0_confc * m0_reqh2confc(struct m0_reqh *reqh)
static const struct socktype stype[]
struct m0_fid rt_imeta_pver
struct m0_net_transfer_mc rm_tm
M0_INTERNAL void m0_dix_layout_iter_next(struct m0_dix_layout_iter *iter, uint64_t *tgt)
M0_INTERNAL int m0_dix_ldesc_init(struct m0_dix_ldesc *ld, struct m0_ext *range, m0_bcount_t range_nr, enum m0_dix_hash_fnc_type htype, struct m0_fid *pver)
enum m0_conf_service_type sc_type
M0_INTERNAL void m0_pools_service_ctx_destroy(struct m0_pools_common *pc)
M0_INTERNAL uint32_t m0_dix_liter_unit_classify(struct m0_dix_layout_iter *iter, uint64_t unit)
void * m0_alloc(size_t size)
static bool cs_dix_pver_is_valid(struct m0_pools_common *pc, struct m0_pool_version *pver)
struct m0_layout_domain rh_ldom
M0_INTERNAL int m0_cas_index_create(struct m0_cas_req *req, const struct m0_cas_id *cids, uint64_t cids_nr, struct m0_dtx *dtx)
struct m0_pool_device_to_service * pc_dev2svc
M0_INTERNAL int m0_rpc_link_disconnect_sync(struct m0_rpc_link *rlink, m0_time_t abs_timeout)
union m0_dix_layout::@145 u
M0_INTERNAL int m0_rpc_link_connect_sync(struct m0_rpc_link *rlink, m0_time_t abs_timeout)
M0_INTERNAL void m0_dix_layout_iter_reset(struct m0_dix_layout_iter *iter)
struct m0_reqh_service_ctx * pds_ctx
M0_INTERNAL void m0_dix_ldesc_fini(struct m0_dix_ldesc *ld)
struct m0_rpc_machine * pc_rmach
M0_INTERNAL bool m0_fid_eq(const struct m0_fid *fid0, const struct m0_fid *fid1)
static void cs_dix_cas_id_make(struct m0_cas_id *cid, struct m0_dix *index, uint32_t sdev_idx)
struct m0_pdclust_tgt_addr tgt
M0_INTERNAL struct m0_reqh_service * m0_reqh_service_find(const struct m0_reqh_service_type *st, const struct m0_reqh *reqh)
M0_INTERNAL void m0_cas_req_fini_lock(struct m0_cas_req *req)
static int cs_dix_put_one(struct m0_dix *index, const char *keystr, const struct m0_fid *fid, struct m0_dix_ldesc *dld, struct m0_pools_common *pc, struct m0_pool_version *pver, struct m0_layout_domain *ldom, struct m0_fid *cas_fid, struct m0_rpc_link *link)
M0_INTERNAL struct m0_locality * m0_locality0_get(void)
static int cs_dix_put_sync(struct m0_dix *index, uint32_t sdev_idx, struct m0_bufvec *keys, struct m0_bufvec *vals, struct m0_rpc_link *link)
struct m0_net_end_point * ntm_ep
M0_INTERNAL const struct m0_fid m0_dix_ldescr_fid
M0_INTERNAL int m0_pools_service_ctx_create(struct m0_pools_common *pc)
M0_INTERNAL int m0_cas_put(struct m0_cas_req *req, struct m0_cas_id *index, const struct m0_bufvec *keys, const struct m0_bufvec *values, struct m0_dtx *dtx, uint32_t flags)
struct m0_fid * rc_service_fids
M0_INTERNAL void m0_rwlock_read_lock(struct m0_rwlock *lock)
M0_INTERNAL void m0_confc_close(struct m0_conf_obj *obj)
enum cs_reqh_ctx_states rc_state
struct m0_rpc_session rlk_sess
M0_INTERNAL void m0_rwlock_read_unlock(struct m0_rwlock *lock)
M0_INTERNAL int m0_pool_versions_setup(struct m0_pools_common *pc)
M0_INTERNAL void m0_pool_versions_destroy(struct m0_pools_common *pc)
M0_INTERNAL int m0_cs_dix_setup(struct m0_motr *cctx)
#define M0_BUF_INIT(size, data)
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
M0_INTERNAL const struct m0_fid m0_dix_root_fid
M0_INTERNAL void m0_dix_fid_convert_dix2cctg(const struct m0_fid *dix_fid, struct m0_fid *cctg_fid, uint32_t device_id)
M0_INTERNAL void m0_dix_fini(struct m0_dix *dix)
M0_INTERNAL int m0_dix__meta_val_enc(const struct m0_fid *fid, const struct m0_dix_ldesc *dld, uint32_t nr, struct m0_bufvec *vals)
M0_INTERNAL int m0_bufvec_empty_alloc(struct m0_bufvec *bufvec, uint32_t num_segs)