Motr  M0
Dix

Data Structures

struct  m0_dix_cli
 
struct  m0_dix_cm_iter
 
struct  dix_meta_val
 
struct  m0_dix_imask
 
struct  m0_dix_ldesc
 
struct  m0_dix_capture_ldesc
 
struct  m0_dix_composite_layer
 
struct  m0_dix_composite_ldesc
 
struct  m0_dix_layout
 
struct  m0_dix_linst
 
struct  m0_dix_layout_iter
 
struct  m0_dix_meta_req
 
struct  m0_dix
 
struct  m0_dix_next_sort_ctx
 
struct  m0_dix_next_sort_ctx_arr
 
struct  m0_dix_next_results
 
struct  m0_dix_next_resultset
 
struct  m0_dix_req
 
struct  m0_dix_get_reply
 
struct  m0_dix_next_reply
 
struct  m0_dix_item
 
struct  m0_dix_cas_req
 
struct  m0_dix_idxop_req
 
struct  m0_dix_idxop_ctx
 
struct  m0_dix_crop_attrs
 
struct  m0_dix_cas_rop
 
struct  m0_dix_pg_unit
 
struct  m0_dix_rec_op
 
struct  m0_dix_rop_ctx
 
struct  dix_ctx
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define DIX_META_VAL_XCODE_OBJ(ptr)   M0_XCODE_OBJ(dix_meta_val_xc, ptr)
 
#define DIX_LAYOUT_VAL_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_dix_layout_xc, ptr)
 
#define DIX_LDESC_VAL_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_dix_ldesc_xc, ptr)
 
#define DIX_FID_VAL_XCODE_OBJ(ptr)   M0_XCODE_OBJ(m0_fid_xc, ptr)
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define AT(mask, idx)   ((mask)->im_range[idx])
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define DFID(x, y)   M0_FID_TINIT('x', (x), (y))
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define NOENT   (-ENOENT)
 
#define PROCESSING_IS_DONE   (-ENOKEY)
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 
#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX
 

Enumerations

enum  m0_dix_cli_state {
  DIXCLI_INVALID, DIXCLI_INIT, DIXCLI_BOOTSTRAP, DIXCLI_STARTING,
  DIXCLI_READY, DIXCLI_FINAL, DIXCLI_FAILURE
}
 
enum  {
  M0_DIX_FID_DEVICE_ID_BITS = 24, M0_DIX_FID_DEVICE_ID_OFFSET = 32, M0_DIX_FID_DEVICE_ID_MASK, M0_DIX_FID_DEVICE_ID_MAX = (1ULL << M0_DIX_FID_DEVICE_ID_BITS) - 1,
  M0_DIX_FID_DIX_CONTAINER_MASK
}
 
enum  { IMASK_INF = ~0ULL }
 
enum  dix_layout_type {
  DIX_LTYPE_UNKNOWN, DIX_LTYPE_ID, DIX_LTYPE_DESCR, DIX_LTYPE_COMPOSITE_DESCR,
  DIX_LTYPE_CAPTURE_DESCR
}
 
enum  m0_dix_hash_fnc_type { HASH_FNC_NONE, HASH_FNC_FNV1, HASH_FNC_CITY }
 
enum  { DIX_META_INDICES_ROOT = 0, DIX_META_INDICES_LAYOUT = 1, DIX_META_INDICES_DESCR = 2, DIX_META_INDICES_NR = 3 }
 
enum  m0_dix_req_state {
  DIXREQ_INVALID, DIXREQ_INIT, DIXREQ_LAYOUT_DISCOVERY, DIXREQ_LID_DISCOVERY,
  DIXREQ_DISCOVERY_DONE, DIXREQ_META_UPDATE, DIXREQ_INPROGRESS, DIXREQ_GET_RESEND,
  DIXREQ_DEL_PHASE2, DIXREQ_FINAL, DIXREQ_FAILURE, DIXREQ_NR
}
 
enum  dix_req_type {
  DIX_CREATE, DIX_CCTGS_LOOKUP, DIX_DELETE, DIX_NEXT,
  DIX_GET, DIX_PUT, DIX_DEL
}
 
enum  dix_action { ACTION_CREATE, ACTION_CHECK, ACTION_DESTROY }
 

Functions

static struct m0_sm_groupdix_cli_smgrp (const struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_lock (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_unlock (struct m0_dix_cli *cli)
 
M0_INTERNAL bool m0_dix_cli_is_locked (const struct m0_dix_cli *cli)
 
static enum m0_dix_cli_state dix_cli_state (const struct m0_dix_cli *cli)
 
static void dix_cli_failure (struct m0_dix_cli *cli, int32_t rc)
 
static void dix_cli_state_set (struct m0_dix_cli *cli, enum m0_dix_cli_state state)
 
M0_INTERNAL int m0_dix_cli_init (struct m0_dix_cli *cli, struct m0_sm_group *sm_group, struct m0_pools_common *pc, struct m0_layout_domain *ldom, const struct m0_fid *pver)
 
static void dix_cli_ast_post (struct m0_dix_cli *cli, void(*cb)(struct m0_sm_group *, struct m0_sm_ast *))
 
static void dix_meta_read_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool dix_cli_meta_read_clink_cb (struct m0_clink *cl)
 
static void dix_cli_start_ast_cb (struct m0_sm_group *grp M0_UNUSED, struct m0_sm_ast *ast)
 
M0_INTERNAL void m0_dix_cli_start (struct m0_dix_cli *cli)
 
M0_INTERNAL int m0_dix_cli_start_sync (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_bootstrap (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_bootstrap_lock (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_stop (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_stop_lock (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_fini (struct m0_dix_cli *cli)
 
M0_INTERNAL void m0_dix_cli_fini_lock (struct m0_dix_cli *cli)
 
M0_INTERNAL int m0_dix__root_set (const struct m0_dix_cli *cli, struct m0_dix *out)
 
M0_INTERNAL int m0_dix__layout_set (const struct m0_dix_cli *cli, struct m0_dix *out)
 
M0_INTERNAL int m0_dix__ldescr_set (const struct m0_dix_cli *cli, struct m0_dix *out)
 
M0_INTERNAL struct m0_pool_versionm0_dix_pver (const struct m0_dix_cli *cli, const struct m0_dix *dix)
 
M0_INTERNAL void m0_dix_cm_iter_type_register (struct m0_dix_cm_type *dcmt)
 
M0_INTERNAL int m0_dix_cm_iter_start (struct m0_dix_cm_iter *iter, struct m0_dix_cm_type *dcmt, struct m0_reqh *reqh, m0_bcount_t rpc_cutoff)
 
M0_INTERNAL void m0_dix_cm_iter_next (struct m0_dix_cm_iter *iter)
 
M0_INTERNAL int m0_dix_cm_iter_get (struct m0_dix_cm_iter *iter, struct m0_buf *key, struct m0_buf *val, uint32_t *sdev_id)
 
M0_INTERNAL void m0_dix_cm_iter_stop (struct m0_dix_cm_iter *iter)
 
M0_INTERNAL void m0_dix_cm_iter_cur_pos (struct m0_dix_cm_iter *iter, struct m0_fid *cctg_fid, uint64_t *cctg_proc_recs_nr)
 
M0_INTERNAL void m0_dix_cm_iter_processed_num (struct m0_dix_cm_iter *iter, uint64_t *proc_recs_nr)
 
static int dix_rebalance_sw_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_init (void)
 
M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_fini (void)
 
M0_INTERNAL int m0_dix_rebalance_sw_onwire_fop_setup (struct m0_cm *cm, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)
 
static int dix_repair_sw_fom_create (struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
 
M0_INTERNAL void m0_dix_repair_sw_onwire_fop_init (void)
 
M0_INTERNAL void m0_dix_repair_sw_onwire_fop_fini (void)
 
M0_INTERNAL int m0_dix_repair_sw_onwire_fop_setup (struct m0_cm *cm, struct m0_fop *fop, void(*fop_release)(struct m0_ref *), uint64_t proxy_id, const char *local_ep, const struct m0_cm_sw *sw, const struct m0_cm_sw *out_interval)
 
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_dix__meta_val_dec (const struct m0_bufvec *vals, struct m0_fid *out_fid, struct m0_dix_ldesc *out_dld, uint32_t nr)
 
M0_INTERNAL int m0_dix__layout_vals_enc (const struct m0_fid *fid, const struct m0_dix_layout *dlay, uint32_t nr, struct m0_bufvec *keys, struct m0_bufvec *vals)
 
M0_INTERNAL int m0_dix__layout_vals_dec (const struct m0_bufvec *keys, const struct m0_bufvec *vals, struct m0_fid *out_fid, struct m0_dix_layout *out_dlay, uint32_t nr)
 
M0_INTERNAL int m0_dix__ldesc_vals_enc (const uint64_t *lid, const struct m0_dix_ldesc *ldesc, uint32_t nr, struct m0_bufvec *keys, struct m0_bufvec *vals)
 
M0_INTERNAL int m0_dix__ldesc_vals_dec (const struct m0_bufvec *keys, const struct m0_bufvec *vals, uint64_t *out_lid, struct m0_dix_ldesc *out_ldesc, uint32_t nr)
 
M0_INTERNAL uint32_t m0_dix_fid__device_id_extract (const struct m0_fid *fid)
 
M0_INTERNAL void m0_dix_fid_dix_make (struct m0_fid *dix_fid, uint32_t container, uint64_t key)
 
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_fid_convert_cctg2dix (const struct m0_fid *cctg_fid, struct m0_fid *dix_fid)
 
M0_INTERNAL uint32_t m0_dix_fid_cctg_device_id (const struct m0_fid *cctg_fid)
 
M0_INTERNAL bool m0_dix_fid_validate_dix (const struct m0_fid *dix_fid)
 
M0_INTERNAL bool m0_dix_fid_validate_cctg (const struct m0_fid *cctg_fid)
 
static m0_bcount_t range_size (const struct m0_ext *range)
 
static m0_bcount_t range_actual_size (const struct m0_ext *range, uint64_t bs_len)
 
static int dix_imask_range_alloc (struct m0_dix_imask *mask, uint64_t nr)
 
static void dix_imask_range_free (struct m0_dix_imask *mask)
 
static uint64_t ranges_size (struct m0_ext *range, uint64_t nr, uint64_t bs_len)
 
static uint64_t imask_size (struct m0_dix_imask *mask, uint64_t bs_len)
 
M0_INTERNAL int m0_dix_imask_init (struct m0_dix_imask *mask, struct m0_ext *range, uint64_t nr)
 
M0_INTERNAL void m0_dix_imask_fini (struct m0_dix_imask *mask)
 
static void mask_bit_copy (void *buffer, m0_bcount_t pos, void *res, m0_bcount_t respos)
 
M0_INTERNAL bool m0_dix_imask_is_empty (const struct m0_dix_imask *mask)
 
M0_INTERNAL int m0_dix_imask_apply (void *buffer, m0_bcount_t buf_len_bytes, struct m0_dix_imask *mask, void **res, m0_bcount_t *res_len_bits)
 
M0_INTERNAL int m0_dix_imask_copy (struct m0_dix_imask *dst, const struct m0_dix_imask *src)
 
M0_INTERNAL bool m0_dix_imask_eq (const struct m0_dix_imask *imask1, const struct m0_dix_imask *imask2)
 
struct m0_dix_imask M0_XCA_DOMAIN (rpc)
 
static int layout_create (struct m0_layout_domain *domain, const struct m0_fid *fid, uint64_t layout_id, struct m0_pool_version *pver, struct m0_dix_linst *dli)
 
M0_INTERNAL uint32_t m0_dix_devices_nr (struct m0_dix_linst *linst)
 
M0_INTERNAL struct m0_pooldevm0_dix_tgt2sdev (struct m0_dix_linst *linst, uint64_t tgt)
 
M0_INTERNAL int m0_dix_layout_init (struct m0_dix_linst *dli, struct m0_layout_domain *domain, const struct m0_fid *fid, uint64_t layout_id, struct m0_pool_version *pver, struct m0_dix_ldesc *dld)
 
M0_INTERNAL void m0_dix_layout_fini (struct m0_dix_linst *li)
 
static void dix_hash (struct m0_dix_ldesc *ldesc, struct m0_buf *buf, uint64_t *hash)
 
static bool unit_is_valid (struct m0_pdclust_attr *attr, uint64_t unit)
 
M0_INTERNAL void m0_dix_target (struct m0_dix_linst *inst, uint64_t unit, struct m0_buf *key, uint64_t *out_id)
 
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)
 
M0_INTERNAL int m0_dix_ldesc_copy (struct m0_dix_ldesc *dst, const struct m0_dix_ldesc *src)
 
M0_INTERNAL void m0_dix_ldesc_fini (struct m0_dix_ldesc *ld)
 
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)
 
M0_INTERNAL void m0_dix_layout_iter_next (struct m0_dix_layout_iter *iter, uint64_t *tgt)
 
M0_INTERNAL void m0_dix_layout_iter_get_at (struct m0_dix_layout_iter *iter, uint64_t unit, uint64_t *tgt)
 
M0_INTERNAL uint32_t m0_dix_liter_W (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_N (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_P (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_K (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_S (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_spare_offset (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL uint32_t m0_dix_liter_unit_classify (struct m0_dix_layout_iter *iter, uint64_t unit)
 
M0_INTERNAL void m0_dix_layout_iter_goto (struct m0_dix_layout_iter *iter, uint64_t unit)
 
M0_INTERNAL void m0_dix_layout_iter_reset (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL void m0_dix_layout_iter_fini (struct m0_dix_layout_iter *iter)
 
M0_INTERNAL bool m0_dix_layout_eq (const struct m0_dix_layout *layout1, const struct m0_dix_layout *layout2)
 
static struct m0_dix_climeta_req_cli (const struct m0_dix_meta_req *req)
 
static int dix_mreq_rc (const struct m0_dix_req *req)
 
static int dix_root_add (struct m0_bufvec *keys, struct m0_bufvec *vals, uint32_t idx, const char *iname, const struct m0_fid *ifid, const struct m0_dix_ldesc *idesc)
 
static int dix_root_put (struct m0_dix_cli *cli, struct m0_sm_group *grp, const struct m0_dix_ldesc *dld_layout, const struct m0_dix_ldesc *dld_ldescr)
 
static void dix_meta_indices_fini (struct m0_dix *meta)
 
static int dix_meta_indices_init (struct m0_dix *indices, struct m0_dix_cli *cli, struct m0_dix_ldesc *dld_layout, struct m0_dix_ldesc *dld_ldescr)
 
static int dix_meta_create (struct m0_dix_cli *cli, struct m0_sm_group *grp, struct m0_dix_ldesc *dld_layout, struct m0_dix_ldesc *dld_ldescr)
 
static int dix_meta_delete (struct m0_dix_cli *cli, struct m0_sm_group *grp, struct m0_dix_ldesc *dld_layout, struct m0_dix_ldesc *dld_ldescr)
 
static bool dix_meta_op_done_cb (struct m0_clink *clink)
 
M0_INTERNAL void m0_dix_meta_req_init (struct m0_dix_meta_req *req, struct m0_dix_cli *cli, struct m0_sm_group *grp)
 
static void dix_meta_req_fini (struct m0_dix_meta_req *req)
 
M0_INTERNAL void m0_dix_meta_req_fini (struct m0_dix_meta_req *req)
 
M0_INTERNAL void m0_dix_meta_req_fini_lock (struct m0_dix_meta_req *req)
 
M0_INTERNAL void m0_dix_meta_lock (struct m0_dix_meta_req *req)
 
M0_INTERNAL void m0_dix_meta_unlock (struct m0_dix_meta_req *req)
 
M0_INTERNAL int m0_dix_meta_generic_rc (const struct m0_dix_meta_req *req)
 
M0_INTERNAL int m0_dix_meta_item_rc (const struct m0_dix_meta_req *req, uint64_t idx)
 
M0_INTERNAL int m0_dix_meta_req_nr (const struct m0_dix_meta_req *req)
 
M0_INTERNAL int m0_dix_meta_create (struct m0_dix_cli *cli, struct m0_sm_group *grp, struct m0_dix_ldesc *dld_layout, struct m0_dix_ldesc *dld_ldescr)
 
M0_INTERNAL int m0_dix_meta_check (struct m0_dix_cli *cli, struct m0_sm_group *grp, bool *result)
 
M0_INTERNAL int m0_dix_root_read (struct m0_dix_meta_req *req)
 
static int dix_layout_from_read_rep (struct m0_dix_meta_req *req, uint64_t idx, const struct m0_fid *expected, struct m0_dix_ldesc *out)
 
M0_INTERNAL int m0_dix_root_read_rep (struct m0_dix_meta_req *req, struct m0_dix_ldesc *layout, struct m0_dix_ldesc *ldescr)
 
M0_INTERNAL int m0_dix_meta_destroy (struct m0_dix_cli *cli, struct m0_sm_group *grp)
 
M0_INTERNAL int m0_dix_ldescr_put (struct m0_dix_meta_req *req, const uint64_t *lid, const struct m0_dix_ldesc *ldesc, uint32_t nr)
 
M0_INTERNAL int m0_dix_ldescr_get (struct m0_dix_meta_req *req, const uint64_t *lid, uint32_t nr)
 
M0_INTERNAL int m0_dix_ldescr_rep_get (struct m0_dix_meta_req *req, uint64_t idx, struct m0_dix_ldesc *ldesc)
 
M0_INTERNAL int m0_dix_ldescr_del (struct m0_dix_meta_req *req, const uint64_t *lid, uint32_t nr)
 
M0_INTERNAL int m0_dix_layout_put (struct m0_dix_meta_req *req, const struct m0_fid *fid, const struct m0_dix_layout *dlay, uint32_t nr, uint32_t flags)
 
M0_INTERNAL int m0_dix_layout_del (struct m0_dix_meta_req *req, const struct m0_fid *fid, uint32_t nr)
 
M0_INTERNAL int m0_dix_layout_get (struct m0_dix_meta_req *req, const struct m0_fid *fid, uint32_t nr)
 
M0_INTERNAL int m0_dix_layout_rep_get (struct m0_dix_meta_req *req, uint64_t idx, struct m0_dix_layout *dlay)
 
M0_INTERNAL int m0_dix_index_list (struct m0_dix_meta_req *req, const struct m0_fid *start_fid, uint32_t indices_nr)
 
M0_INTERNAL int m0_dix_index_list_rep_nr (struct m0_dix_meta_req *req)
 
M0_INTERNAL int m0_dix_index_list_rep (struct m0_dix_meta_req *req, uint32_t idx, struct m0_fid *fid)
 
static void sc_result_add (struct m0_dix_next_sort_ctx *key_ctx, uint32_t cidx, struct m0_dix_next_resultset *rs, uint32_t key_id, struct m0_cas_next_reply *rep)
 
static int sc_rep_cmp (const struct m0_cas_next_reply *a, const struct m0_cas_next_reply *b)
 
static bool sc_rep_le (const struct m0_cas_next_reply *a, const struct m0_cas_next_reply *b)
 
static bool sc_rep_eq (const struct m0_cas_next_reply *a, const struct m0_cas_next_reply *b)
 
static void sc_next (struct m0_dix_next_sort_ctx *ctx)
 
static int sc_rep_get (struct m0_dix_next_sort_ctx *ctx, struct m0_cas_next_reply **rep)
 
static int sc_key_pos_set (struct m0_dix_next_sort_ctx *ctx, uint32_t key_idx, const uint32_t *recs_nr)
 
static bool sc_min_val_get (struct m0_dix_next_sort_ctx_arr *ctxarr, struct m0_cas_next_reply **rep, struct m0_dix_next_sort_ctx **ret_ctx, uint32_t *ret_idx)
 
static int dix_rs_vals_alloc (struct m0_dix_next_resultset *rs, uint32_t key_idx, uint32_t nr)
 
static int dix_data_load (struct m0_dix_req *req, struct m0_dix_next_resultset *rs)
 
M0_INTERNAL int m0_dix_next_result_prepare (struct m0_dix_req *req)
 
static int sc_init (struct m0_dix_next_sort_ctx_arr *ctx_arr, uint32_t nr)
 
static void sc_fini (struct m0_dix_next_sort_ctx_arr *ctx_arr)
 
M0_INTERNAL int m0_dix_rs_init (struct m0_dix_next_resultset *rs, uint32_t start_keys_nr, uint32_t sctx_nr)
 
M0_INTERNAL void m0_dix_rs_fini (struct m0_dix_next_resultset *rs)
 
 M0_TL_DESCR_DEFINE (cas_rop, "cas record operations", M0_INTERNAL, struct m0_dix_cas_rop, crp_linkage, crp_magix, M0_DIX_ROP_MAGIC, M0_DIX_ROP_HEAD_MAGIC)
 
 M0_TL_DEFINE (cas_rop, M0_INTERNAL, struct m0_dix_cas_rop)
 
static void dix_idxop (struct m0_dix_req *req)
 
static void dix_rop (struct m0_dix_req *req)
 
static void dix_rop_units_set (struct m0_dix_req *req)
 
static int dix_cas_rops_alloc (struct m0_dix_req *req)
 
static int dix_cas_rops_fill (struct m0_dix_req *req)
 
static int dix_cas_rops_send (struct m0_dix_req *req)
 
static void dix_ldescr_resolve (struct m0_dix_req *req)
 
static void dix_discovery_completed (struct m0_dix_req *req)
 
static int dix_idxop_reqs_send (struct m0_dix_req *req)
 
static void dix_discovery (struct m0_dix_req *req)
 
static int dix_id_layouts_nr (struct m0_dix_req *req)
 
static int dix_unknown_layouts_nr (struct m0_dix_req *req)
 
static uint32_t dix_rop_tgt_iter_max (struct m0_dix_req *req, struct m0_dix_rec_op *rec_op)
 
static bool dix_req_is_idxop (const struct m0_dix_req *req)
 
static struct m0_sm_groupdix_req_smgrp (const struct m0_dix_req *req)
 
static void dix_to_cas_map (const struct m0_dix_req *dreq, const struct m0_cas_req *creq)
 
M0_INTERNAL void m0_dix_req_lock (struct m0_dix_req *req)
 
M0_INTERNAL void m0_dix_req_unlock (struct m0_dix_req *req)
 
M0_INTERNAL bool m0_dix_req_is_locked (const struct m0_dix_req *req)
 
M0_INTERNAL int m0_dix_req_wait (struct m0_dix_req *req, uint64_t states, m0_time_t to)
 
static void dix_req_init (struct m0_dix_req *req, struct m0_dix_cli *cli, struct m0_sm_group *grp, bool meta)
 
M0_INTERNAL void m0_dix_mreq_init (struct m0_dix_req *req, struct m0_dix_cli *cli, struct m0_sm_group *grp)
 
M0_INTERNAL void m0_dix_req_init (struct m0_dix_req *req, struct m0_dix_cli *cli, struct m0_sm_group *grp)
 
static enum m0_dix_req_state dix_req_state (const struct m0_dix_req *req)
 
static void dix_req_state_set (struct m0_dix_req *req, enum m0_dix_req_state state)
 
static void dix_req_failure (struct m0_dix_req *req, int32_t rc)
 
static int dix_type_layouts_nr (struct m0_dix_req *req, enum dix_layout_type type)
 
static int dix_resolved_nr (struct m0_dix_req *req)
 
static void dix_to_mdix_map (const struct m0_dix_req *req, const struct m0_dix_meta_req *mreq)
 
static void dix_layout_find_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool dix_layout_find_clink_cb (struct m0_clink *cl)
 
static void dix_layout_find (struct m0_dix_req *req)
 
static int dix_indices_copy (struct m0_dix **dst_indices, const struct m0_dix *src_indices, uint32_t indices_nr)
 
static int dix_req_indices_copy (struct m0_dix_req *req, const struct m0_dix *indices, uint32_t indices_nr)
 
static struct m0_pool_versiondix_pver_find (const struct m0_dix_req *req, const struct m0_fid *pver_fid)
 
static void dix_idxop_ctx_free (struct m0_dix_idxop_ctx *idxop)
 
static void dix_idxop_item_rc_update (struct m0_dix_item *ditem, struct m0_dix_req *req, const struct m0_dix_cas_req *creq)
 
static void dix_idxop_completed (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool dix_idxop_clink_cb (struct m0_clink *cl)
 
static int dix_idxop_pver_analyse (struct m0_dix_idxop_req *idxop_req, struct m0_dix_req *dreq, uint64_t *creqs_nr)
 
static int dix_idxop_req_send (struct m0_dix_idxop_req *idxop_req, struct m0_dix_req *dreq, uint64_t *reqs_acc)
 
static void dix_idxop_meta_update_ast_cb (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static bool dix_idxop_meta_update_clink_cb (struct m0_clink *cl)
 
static int dix_idxop_meta_update (struct m0_dix_req *req)
 
static bool dix_item_should_be_sent (const struct m0_dix_req *req, uint32_t i)
 
M0_INTERNAL int m0_dix_create (struct m0_dix_req *req, const struct m0_dix *indices, uint32_t indices_nr, struct m0_dtx *dtx, uint32_t flags)
 
static void addb2_add_dix_req_attrs (const struct m0_dix_req *req)
 
static void dix_discovery_ast (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
void m0_dix_req_cancel (struct m0_dix_req *dreq)
 
M0_INTERNAL int m0_dix_delete (struct m0_dix_req *req, const struct m0_dix *indices, uint64_t indices_nr, struct m0_dtx *dtx, uint32_t flags)
 
M0_INTERNAL int m0_dix_cctgs_lookup (struct m0_dix_req *req, const struct m0_dix *indices, uint32_t indices_nr)
 
static int dix_rec_op_init (struct m0_dix_rec_op *rec_op, struct m0_dix_req *req, struct m0_dix_cli *cli, struct m0_pool_version *pver, struct m0_dix *dix, struct m0_buf *key, uint64_t user_item)
 
static void dix_rec_op_fini (struct m0_dix_rec_op *rec_op)
 
static int dix_cas_rop_alloc (struct m0_dix_req *req, uint32_t sdev, struct m0_dix_cas_rop **cas_rop)
 
static void dix_cas_rop_fini (struct m0_dix_cas_rop *cas_rop)
 
static void dix_cas_rops_fini (struct m0_tl *cas_rops)
 
static int dix_rop_ctx_init (struct m0_dix_req *req, struct m0_dix_rop_ctx *rop, const struct m0_bufvec *keys, uint64_t *indices)
 
static void dix_rop_ctx_fini (struct m0_dix_rop_ctx *rop)
 
static void dix__rop (struct m0_dix_req *req, const struct m0_bufvec *keys, uint64_t *indices)
 
static void dix_item_rc_update (struct m0_dix_req *req, struct m0_cas_req *creq, uint64_t key_idx, struct m0_dix_item *ditem)
 
static bool dix_item_get_has_failed (struct m0_dix_item *item)
 
static bool dix_item_parity_unit_is_last (const struct m0_dix_req *req, const struct m0_dix_item *item)
 
static void dix_get_req_resend (struct m0_dix_req *req)
 
static bool dix_del_phase2_is_needed (const struct m0_dix_rec_op *rec_op)
 
static int dix_rop_del_phase2_rop (struct m0_dix_req *req, struct m0_dix_rop_ctx **out)
 
static void dix_rop_del_phase2 (struct m0_dix_req *req)
 
static void dix_cas_rop_rc_update (struct m0_dix_cas_rop *cas_rop, int rc)
 
static void dix_rop_completed (struct m0_sm_group *grp, struct m0_sm_ast *ast)
 
static void dix_rop_one_completed (struct m0_dix_cas_rop *crop)
 
static bool dix_cas_rop_clink_cb (struct m0_clink *cl)
 
static void dix_rop_tgt_iter_begin (const struct m0_dix_req *req, struct m0_dix_rec_op *rec_op)
 
static void dix_rop_tgt_iter_next (const struct m0_dix_req *req, struct m0_dix_rec_op *rec_op, uint64_t *target, bool *is_spare)
 
static int dix_spare_slot_find (struct m0_poolmach_state *pm_state, uint64_t failed_tgt, uint32_t *spare_slot)
 
static struct m0_pool_versiondix_rec_op_pver (struct m0_dix_rec_op *rec_op)
 
static uint32_t dix_rop_max_failures (struct m0_dix_rop_ctx *rop)
 
static uint32_t dix_rec_op_spare_offset (struct m0_dix_rec_op *rec_op)
 
static int dix__spare_target (struct m0_dix_rec_op *rec_op, const struct m0_dix_pg_unit *failed_unit, uint32_t *spare_slot, struct m0_dix_pg_unit **spare_unit, bool with_data)
 
static int dix_spare_target (struct m0_dix_rec_op *rec_op, const struct m0_dix_pg_unit *failed_unit, uint32_t *spare_slot, struct m0_dix_pg_unit **spare_unit)
 
static int dix_spare_target_with_data (struct m0_dix_rec_op *rec_op, const struct m0_dix_pg_unit *failed_unit, uint32_t *spare_slot, struct m0_dix_pg_unit **spare_unit)
 
static void dix_online_unit_choose (struct m0_dix_req *req, struct m0_dix_rec_op *rec_op)
 
static void dix_pg_unit_pd_assign (struct m0_dix_pg_unit *pgu, struct m0_pooldev *pd)
 
static void dix_rop_failed_unit_tgt (struct m0_dix_req *req, struct m0_dix_rec_op *rec_op, uint64_t unit)
 
static void dix_rop_failures_analyse (struct m0_dix_req *req)
 
static bool dix_pg_unit_skip (struct m0_dix_req *req, struct m0_dix_pg_unit *unit)
 
M0_INTERNAL int m0_dix_put (struct m0_dix_req *req, const struct m0_dix *index, const struct m0_bufvec *keys, const struct m0_bufvec *vals, struct m0_dtx *dtx, uint32_t flags)
 
M0_INTERNAL int m0_dix_get (struct m0_dix_req *req, const struct m0_dix *index, const struct m0_bufvec *keys)
 
M0_INTERNAL void m0_dix_get_rep (const struct m0_dix_req *req, uint64_t idx, struct m0_dix_get_reply *rep)
 
M0_INTERNAL int m0_dix_del (struct m0_dix_req *req, const struct m0_dix *index, const struct m0_bufvec *keys, struct m0_dtx *dtx, uint32_t flags)
 
M0_INTERNAL int m0_dix_next (struct m0_dix_req *req, const struct m0_dix *index, const struct m0_bufvec *start_keys, const uint32_t *recs_nr, uint32_t flags)
 
M0_INTERNAL void m0_dix_next_rep (const struct m0_dix_req *req, uint64_t key_idx, uint64_t val_idx, struct m0_dix_next_reply *rep)
 
M0_INTERNAL uint32_t m0_dix_next_rep_nr (const struct m0_dix_req *req, uint64_t key_idx)
 
M0_INTERNAL int m0_dix_item_rc (const struct m0_dix_req *req, uint64_t idx)
 
M0_INTERNAL int m0_dix_generic_rc (const struct m0_dix_req *req)
 
M0_INTERNAL int m0_dix_req_rc (const struct m0_dix_req *req)
 
M0_INTERNAL uint64_t m0_dix_req_nr (const struct m0_dix_req *req)
 
M0_INTERNAL void m0_dix_get_rep_mlock (struct m0_dix_req *req, uint64_t idx)
 
M0_INTERNAL void m0_dix_next_rep_mlock (struct m0_dix_req *req, uint32_t key_idx, uint32_t val_idx)
 
static void dix_item_fini (const struct m0_dix_req *req, struct m0_dix_item *item)
 
M0_INTERNAL void m0_dix_req_fini (struct m0_dix_req *req)
 
M0_INTERNAL void m0_dix_req_fini_lock (struct m0_dix_req *req)
 
M0_INTERNAL int m0_dix_copy (struct m0_dix *dst, const struct m0_dix *src)
 
M0_INTERNAL int m0_dix_desc_set (struct m0_dix *dix, const struct m0_dix_ldesc *desc)
 
M0_INTERNAL void m0_dix_fini (struct m0_dix *dix)
 
M0_INTERNAL int m0_dix_sm_conf_init (void)
 
M0_INTERNAL void m0_dix_sm_conf_fini (void)
 
 M0_TL_DESCR_DECLARE (cas_rop, M0_EXTERN)
 
 M0_TL_DECLARE (cas_rop, M0_INTERNAL, struct m0_dix_cas_rop)
 
static int dix_ha_init (struct dix_ctx *ctx, const char *ha_addr)
 
static void dix_ha_stop (struct dix_ctx *ctx)
 
static void dix_ha_fini (struct dix_ctx *ctx)
 
static int dix_net_init (struct dix_ctx *ctx, const char *local_addr)
 
static int dix_rpc_init (struct dix_ctx *ctx)
 
static void dix_rpc_fini (struct dix_ctx *ctx)
 
static void dix_net_fini (struct dix_ctx *ctx)
 
M0_INTERNAL struct m0_rconfcdix2rconfc (struct dix_ctx *ctx)
 
static int dix_layouts_init (struct dix_ctx *ctx)
 
static void dix_layouts_fini (struct dix_ctx *ctx)
 
static int dix_service_start (struct m0_reqh_service_type *stype, struct m0_reqh *reqh)
 
static int dix_reqh_services_start (struct dix_ctx *ctx)
 
static int dix_init (struct dix_ctx *ctx, const char *local_addr, const char *ha_addr, const char *profile)
 
static void dix_fini (struct dix_ctx *ctx)
 
static int dix_root_pver_find (struct dix_ctx *ctx, struct m0_fid *out)
 
static int dix_pver_fids_check (struct dix_ctx *ctx, const struct m0_fid *root, const struct m0_fid *layout, const struct m0_fid *ldescr)
 
int main (int argc, char **argv)
 

Variables

static struct m0_sm_state_descr dix_cli_states []
 
static struct m0_sm_trans_descr dix_cli_trans []
 
static const struct m0_sm_conf dix_cli_sm_conf
 
struct m0_fop_type dix_rebalance_sw_onwire_fopt
 
struct m0_fop_type dix_rebalance_sw_onwire_rep_fopt
 
struct m0_cm_type dix_rebalance_cmt
 
const struct m0_fom_type_ops dix_rebalance_sw_fom_type_ops
 
struct m0_fop_type dix_repair_sw_onwire_fopt
 
struct m0_fop_type dix_repair_sw_onwire_rep_fopt
 
struct m0_cm_type dix_repair_cmt
 
const struct m0_fom_type_ops dix_repair_sw_fom_type_ops
 
enum dix_layout_type M0_XCA_DOMAIN
 
M0_INTERNAL const struct m0_fid m0_dix_root_fid = DFID(0,1)
 
M0_INTERNAL const struct m0_fid m0_dix_layout_fid = DFID(0,2)
 
M0_INTERNAL const struct m0_fid m0_dix_ldescr_fid = DFID(0,3)
 
M0_EXTERN const struct m0_fid m0_dix_root_fid
 
M0_EXTERN const struct m0_fid m0_dix_layout_fid
 
M0_EXTERN const struct m0_fid m0_dix_ldescr_fid
 
static struct m0_sm_state_descr dix_req_states []
 
static struct m0_sm_trans_descr dix_req_trans []
 
struct m0_sm_conf dix_req_sm_conf
 
enum dix_req_type M0_XCA_ENUM
 
static uint32_t tm_recv_queue_min_len = 10
 
static uint32_t max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE
 

Detailed Description

Distributed index client provides an interface to access and modify distributed indices. It uses CAS client internally and extends its functionality by providing indices distribution.

Please refer to HLD of the distributed indexing for high-level overview.

Dependencies

Index meta-data

There are three meta-indices that are used by client internally and can be manipulated through appropriate interfaces externally:

Meta-data is global for the file system and normally is created during cluster provisioning via m0_dix_meta_create(). Meta-data can be destroyed via m0_dix_meta_destroy(). Also user is able to check whether meta-data is accessible and is correct via m0_dix_meta_check(). Distributed index meta-data is mandatory and should always be present in the filesystem.

Initialisation and start

Client is initialised with m0_dix_cli_init(). The main argument is a pool version fid of the root index. All subsequent operations use this fid to locate indices in the cluster.

User should start the client in order to make DIX requests through the client. Client start procedure is executed through m0_dix_cli_start() or m0_dix_cli_start_sync(). The start procedure involves reading root index to retrieve layouts of 'layout' and 'layout-descr' meta-indeces.

There is a special client mode called "bootstrap" mode. In that mode the only request allowed is creating meta-indices in cluster (m0_dix_meta_create()). A client can be moved to this mode just after initialisation using m0_dix_cli_bootstrap() call. It's useful at cluster provisioning state, because client can't start successfully without meta-indices being created in motr file system. After meta indices creation is done, client can be started as usual or finalised.

Operation in degraded mode

DIX client relies on HA notifications to detect device failures. In order to receive HA notifications, the process where DIX client resides should be added to the cluster configuration. On receiving device failure notification local pool machines for all affected pool versions are updated accordingly.

DIX client is said to perform an operation over distributed index in degraded mode if at least one device in index pool version has failed or under repair/re-balance. Note, that offline device (i.e. the one with M0_PNDS_OFFLINE state) doesn't imply degraded mode. DIX client doesn't treat offline devices in any special way and the user is likely to get an error during record put/delete operation.

DIX client uses component catalogues with spare units instead of component catalogues stored on failed drives during operation in degraded mode. Below is a table showing how DIX client treats target component catalogue for different operations depending on the disk state storing this catalogue.

Disk state GET PUT DEL NEXT
FAILED Skip Use spare Skip Skip

| REPAIRING | Skip Use spare Use spare Skip | REPAIRED | Use spare Use spare Use spare Skip |

REBALANCING | Use spare Use it + spare Use it + spare Skip

DIX client relies on the fact that device will transit from FAILED to REPAIRING state, and it's not possible to transit from FAILED to ONLINE state. Otherwise, replicas written to spares when the device was FAILED won't be taken into account when disk returns to ONLINE state.

NEXT operation always ignores non-online disks, because this operation queries all online disks in a pool version and a layout guarantees that at least one correct replica for every record is available.

There is a possible race, where repair/re-balance service sends the old value to the spares/re-balance targets concurrently with a DIX client update. In order to avoid it DEL operation is executed in 2 phases. The process slightly differs for repair and re-balance.

Client sets special COF_DEL_LOCK flag in CAS request to make a hint to CAS service that special global "delete" lock should be taken for catalogue store prior to deletion. That lock guarantees that CAS service will do record deletion when the record is either already repaired/re-balanced or repair/re-balance process for this record is not started yet.

References:

*                     8 bits           24 bits             96 bits
*                 +-----------------+-----------+---------------------------+
*    DIX fid      |   DIX type id   |  zeroed   |                           |
*                 +-----------------+-----------+---------------------------+
*                                                            ||
*                                                            \/
*                 +-----------------+-----------+---------------------------+
*    CCTG fid     |   CCTG type id  | device id |                           |
*                 +-----------------+-----------+---------------------------+
* 

Identity mask is a sequence of ranges of bit positions in bit-string: [S0, E0], [S1, E1], ..., [Sm, Em], where Si and Ei are bit-offsets counted from 0. The ranges can be overlapping and are not necessarily monotone offset-wise. Range of identity mask can be infinite [X, inf] meaning that range includes bit positions from X to the end of a bit-string. Empty identity mask is a mask with 0 ranges defined.

The mask can be applied to a bit-string. Applying identity mask to a bit-string X produces a new bit-string Y: Y = X[S0, E0] :: X[S1, E1] :: ... :: X[Sm, Em], where :: is is bit-string concatenation.

For example, given identity mask I = [0, 3], [7, 8] and X = 0xf0, result of mask application is: Y = 0xf0[0, 3] :: 0xf0[7, 8] = 0b0000 :: 0b11 = 0b000011 = 0x03

It's totally fine to apply mask with ranges extending the bit-string's length. For example, application of identity mask with a single range [50,100] to a bit-string 0b11 is valid and produces empty bit-string.

Distributed index layout is based on parity de-clustering layout and determines targets (pool disks) for index records.

Layouts of indices are stored centralised in 'layout' meta-index. Layout can be stored there in two forms: layout id and layout descriptor. Layout descriptor shall be known in order to instantiate layout instance (m0_dix_linst) usable for target disks calculation. Therefore, if layout id is stored in 'layout' meta-index then it shall be resolved to full-fledged layout descriptor. The mapping between layout id and corresponding layout descriptor is stored in 'layout-descr' meta-index.

For more information about targets calculation for index records please refer to distributed indexing HLD.

Module "meta" contains functionality to create, destroy, and update meta-data for distributed indexing subsystem.

There are three groups of functions to work with 'root', 'layout' and 'layout-descr' indices respectively. Operations for 'root' index are synchronous, since they intended to be executed during provisioning. Operations for 'layout', 'layout-descr' indices are asynchronous. User shall wait on m0_dix_meta_req::dmr_chan for asynchronous operation completion.

Format of record in 'layout' index: key: index fid val: layout descriptor or layout id

Format of record in 'layout-descr' index: key: layout id val: layout descriptor

Root index is used to locate 'layout' and 'layout-descr' indices.

For more information see dix/client.h.

Also, module contains several functions for xcoding m0_dix_ldesc, m0_dix_layout types. There are three types of buffers that can be encoded/decoded via these functions:

Usage example. Encode existing arrays of fids and layouts into two buffer vectors (vals and keys):

rc = m0_dix__layout_vals_enc(fids_array, layout_array, nr, &keys, &vals);

Decode fids and layouts from existing buffer vectors (vals and keys):

rc = m0_dix__layout_vals_dec(&keys, &vals, fids_array, layout_array, nr);

DIX requests allow to access and modify distributed indices. Requests are executed in the context of distributed index client.

Record operations logic

GET, PUT, DEL operations share a common logic:

NEXT operation logic:

Execution context

Client operations are executed in the context of state machine group provided at initialisation. All DIX requests have asynchronous interface. It is possible to run several requests in the context of one client simultaneously even if the same state machine group is used.

All DIX requests are asynchronous and user shall wait until request reaches one of DIXREQ_FINAL, DIXREQ_FAILURE states.

Macro Definition Documentation

◆ AT

#define AT (   mask,
  idx 
)    ((mask)->im_range[idx])

Definition at line 39 of file imask.c.

◆ DFID

#define DFID (   x,
 
)    M0_FID_TINIT('x', (x), (y))

Definition at line 42 of file meta.c.

◆ DIX_FID_VAL_XCODE_OBJ

#define DIX_FID_VAL_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_fid_xc, ptr)

Definition at line 46 of file encdec.c.

◆ DIX_LAYOUT_VAL_XCODE_OBJ

#define DIX_LAYOUT_VAL_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_dix_layout_xc, ptr)

Definition at line 44 of file encdec.c.

◆ DIX_LDESC_VAL_XCODE_OBJ

#define DIX_LDESC_VAL_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(m0_dix_ldesc_xc, ptr)

Definition at line 45 of file encdec.c.

◆ DIX_META_VAL_XCODE_OBJ

#define DIX_META_VAL_XCODE_OBJ (   ptr)    M0_XCODE_OBJ(dix_meta_val_xc, ptr)

Definition at line 43 of file encdec.c.

◆ M0_TRACE_SUBSYSTEM [1/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file req.c.

◆ M0_TRACE_SUBSYSTEM [2/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file m0dixinit.c.

◆ M0_TRACE_SUBSYSTEM [3/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file layout.c.

◆ M0_TRACE_SUBSYSTEM [4/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file meta.c.

◆ M0_TRACE_SUBSYSTEM [5/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file imask.c.

◆ M0_TRACE_SUBSYSTEM [6/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file next_merge.c.

◆ M0_TRACE_SUBSYSTEM [7/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 30 of file client.c.

◆ M0_TRACE_SUBSYSTEM [8/8]

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_DIX

Definition at line 32 of file encdec.c.

◆ NOENT

#define NOENT   (-ENOENT)

Definition at line 41 of file next_merge.c.

◆ PROCESSING_IS_DONE

#define PROCESSING_IS_DONE   (-ENOKEY)

Definition at line 42 of file next_merge.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M0_DIX_FID_DEVICE_ID_BITS 
M0_DIX_FID_DEVICE_ID_OFFSET 
M0_DIX_FID_DEVICE_ID_MASK 
M0_DIX_FID_DEVICE_ID_MAX 
M0_DIX_FID_DIX_CONTAINER_MASK 

Definition at line 54 of file fid_convert.h.

◆ anonymous enum

anonymous enum
Enumerator
IMASK_INF 

Infinite value as the end of the mask's range.

Definition at line 56 of file imask.h.

◆ anonymous enum

anonymous enum
Enumerator
DIX_META_INDICES_ROOT 
DIX_META_INDICES_LAYOUT 
DIX_META_INDICES_DESCR 
DIX_META_INDICES_NR 

Definition at line 48 of file meta.c.

◆ dix_action

enum dix_action
Enumerator
ACTION_CREATE 
ACTION_CHECK 
ACTION_DESTROY 

Definition at line 55 of file m0dixinit.c.

◆ dix_layout_type

Enumerator
DIX_LTYPE_UNKNOWN 
DIX_LTYPE_ID 
DIX_LTYPE_DESCR 
DIX_LTYPE_COMPOSITE_DESCR 
DIX_LTYPE_CAPTURE_DESCR 

Definition at line 62 of file layout.h.

◆ dix_req_type

Enumerator
DIX_CREATE 

Create new index.

DIX_CCTGS_LOOKUP 

Lookup component catalogues existence for an index.

DIX_DELETE 

Delete an index.

DIX_NEXT 

Given start keys, get records with the next keys from an index.

DIX_GET 

Get records with the given keys from an index.

DIX_PUT 

Put given records in an index.

DIX_DEL 

Delete records with the given keys from an index.

Definition at line 171 of file req.h.

◆ m0_dix_cli_state

Enumerator
DIXCLI_INVALID 
DIXCLI_INIT 
DIXCLI_BOOTSTRAP 
DIXCLI_STARTING 
DIXCLI_READY 
DIXCLI_FINAL 
DIXCLI_FAILURE 

Definition at line 172 of file client.h.

◆ m0_dix_hash_fnc_type

Enumerator
HASH_FNC_NONE 
HASH_FNC_FNV1 
HASH_FNC_CITY 

Definition at line 70 of file layout.h.

◆ m0_dix_req_state

Enumerator
DIXREQ_INVALID 
DIXREQ_INIT 
DIXREQ_LAYOUT_DISCOVERY 
DIXREQ_LID_DISCOVERY 
DIXREQ_DISCOVERY_DONE 
DIXREQ_META_UPDATE 
DIXREQ_INPROGRESS 
DIXREQ_GET_RESEND 
DIXREQ_DEL_PHASE2 
DIXREQ_FINAL 
DIXREQ_FAILURE 
DIXREQ_NR 

Definition at line 94 of file req.h.

Function Documentation

◆ addb2_add_dix_req_attrs()

static void addb2_add_dix_req_attrs ( const struct m0_dix_req req)
static

Definition at line 1080 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix2rconfc()

M0_INTERNAL struct m0_rconfc* dix2rconfc ( struct dix_ctx ctx)

Definition at line 195 of file m0dixinit.c.

Here is the caller graph for this function:

◆ dix__rop()

static void dix__rop ( struct m0_dix_req req,
const struct m0_bufvec keys,
uint64_t *  indices 
)
static

Definition at line 1356 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix__spare_target()

static int dix__spare_target ( struct m0_dix_rec_op rec_op,
const struct m0_dix_pg_unit failed_unit,
uint32_t *  spare_slot,
struct m0_dix_pg_unit **  spare_unit,
bool  with_data 
)
static

Definition at line 1919 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rop_alloc()

static int dix_cas_rop_alloc ( struct m0_dix_req req,
uint32_t  sdev,
struct m0_dix_cas_rop **  cas_rop 
)
static

Definition at line 1266 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rop_clink_cb()

static bool dix_cas_rop_clink_cb ( struct m0_clink cl)
static

Definition at line 1696 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rop_fini()

static void dix_cas_rop_fini ( struct m0_dix_cas_rop cas_rop)
static

Definition at line 1284 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rop_rc_update()

static void dix_cas_rop_rc_update ( struct m0_dix_cas_rop cas_rop,
int  rc 
)
static

Definition at line 1602 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rops_alloc()

static int dix_cas_rops_alloc ( struct m0_dix_req req)
static

Definition at line 2182 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rops_fill()

static int dix_cas_rops_fill ( struct m0_dix_req req)
static

Definition at line 2282 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rops_fini()

static void dix_cas_rops_fini ( struct m0_tl cas_rops)
static

Definition at line 1292 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cas_rops_send()

static int dix_cas_rops_send ( struct m0_dix_req req)
static
Todo:
CAS request should copy cctg_id internally.

Definition at line 1743 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cli_ast_post()

static void dix_cli_ast_post ( struct m0_dix_cli cli,
void(*)(struct m0_sm_group *, struct m0_sm_ast *)  cb 
)
static

Definition at line 152 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cli_failure()

static void dix_cli_failure ( struct m0_dix_cli cli,
int32_t  rc 
)
static

Definition at line 115 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cli_meta_read_clink_cb()

static bool dix_cli_meta_read_clink_cb ( struct m0_clink cl)
static

Definition at line 181 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cli_smgrp()

static struct m0_sm_group* dix_cli_smgrp ( const struct m0_dix_cli cli)
static

Definition at line 88 of file client.c.

Here is the caller graph for this function:

◆ dix_cli_start_ast_cb()

static void dix_cli_start_ast_cb ( struct m0_sm_group *grp  M0_UNUSED,
struct m0_sm_ast ast 
)
static

Definition at line 190 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_cli_state()

static enum m0_dix_cli_state dix_cli_state ( const struct m0_dix_cli cli)
static

Definition at line 110 of file client.c.

Here is the caller graph for this function:

◆ dix_cli_state_set()

static void dix_cli_state_set ( struct m0_dix_cli cli,
enum m0_dix_cli_state  state 
)
static

Definition at line 121 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_data_load()

static int dix_data_load ( struct m0_dix_req req,
struct m0_dix_next_resultset rs 
)
static

Loads all CAS replies for NEXT request in sorting contexts.

There is exactly one sorting context for one CAS reply. One CAS reply carries retrieved records for all starting keys in a linear array from one component catalogue.

Definition at line 219 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_del_phase2_is_needed()

static bool dix_del_phase2_is_needed ( const struct m0_dix_rec_op rec_op)
static

Definition at line 1518 of file req.c.

Here is the caller graph for this function:

◆ dix_discovery()

static void dix_discovery ( struct m0_dix_req req)
static

Definition at line 1143 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_discovery_ast()

static void dix_discovery_ast ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 1128 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_discovery_completed()

static void dix_discovery_completed ( struct m0_dix_req req)
static

Definition at line 1100 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_fini()

static void dix_fini ( struct dix_ctx ctx)
static

Definition at line 350 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_get_req_resend()

static void dix_get_req_resend ( struct m0_dix_req req)
static

Definition at line 1463 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_ha_fini()

static void dix_ha_fini ( struct dix_ctx ctx)
static

Definition at line 115 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_ha_init()

static int dix_ha_init ( struct dix_ctx ctx,
const char *  ha_addr 
)
static

Definition at line 74 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_ha_stop()

static void dix_ha_stop ( struct dix_ctx ctx)
static

Definition at line 102 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_hash()

static void dix_hash ( struct m0_dix_ldesc ldesc,
struct m0_buf buf,
uint64_t *  hash 
)
static

Definition at line 111 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_id_layouts_nr()

static int dix_id_layouts_nr ( struct m0_dix_req req)
static

Definition at line 267 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop()

static void dix_idxop ( struct m0_dix_req req)
static

Definition at line 963 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_clink_cb()

static bool dix_idxop_clink_cb ( struct m0_clink cl)
static

Definition at line 568 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_completed()

static void dix_idxop_completed ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 528 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_ctx_free()

static void dix_idxop_ctx_free ( struct m0_dix_idxop_ctx idxop)
static

Definition at line 480 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_item_rc_update()

static void dix_idxop_item_rc_update ( struct m0_dix_item ditem,
struct m0_dix_req req,
const struct m0_dix_cas_req creq 
)
static

Definition at line 489 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_meta_update()

static int dix_idxop_meta_update ( struct m0_dix_req req)
static

Definition at line 839 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_meta_update_ast_cb()

static void dix_idxop_meta_update_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 767 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_meta_update_clink_cb()

static bool dix_idxop_meta_update_clink_cb ( struct m0_clink cl)
static

Definition at line 820 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_pver_analyse()

static int dix_idxop_pver_analyse ( struct m0_dix_idxop_req idxop_req,
struct m0_dix_req dreq,
uint64_t *  creqs_nr 
)
static

Definition at line 599 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_req_send()

static int dix_idxop_req_send ( struct m0_dix_idxop_req idxop_req,
struct m0_dix_req dreq,
uint64_t *  reqs_acc 
)
static

Definition at line 670 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_idxop_reqs_send()

static int dix_idxop_reqs_send ( struct m0_dix_req req)
static

Definition at line 916 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_imask_range_alloc()

static int dix_imask_range_alloc ( struct m0_dix_imask mask,
uint64_t  nr 
)
static

Definition at line 58 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_imask_range_free()

static void dix_imask_range_free ( struct m0_dix_imask mask)
static

Definition at line 70 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_indices_copy()

static int dix_indices_copy ( struct m0_dix **  dst_indices,
const struct m0_dix src_indices,
uint32_t  indices_nr 
)
static

Definition at line 431 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_init()

static int dix_init ( struct dix_ctx ctx,
const char *  local_addr,
const char *  ha_addr,
const char *  profile 
)
static

Definition at line 241 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_item_fini()

static void dix_item_fini ( const struct m0_dix_req req,
struct m0_dix_item item 
)
static

Definition at line 2538 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_item_get_has_failed()

static bool dix_item_get_has_failed ( struct m0_dix_item item)
static

Definition at line 1449 of file req.c.

Here is the caller graph for this function:

◆ dix_item_parity_unit_is_last()

static bool dix_item_parity_unit_is_last ( const struct m0_dix_req req,
const struct m0_dix_item item 
)
static

Definition at line 1454 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_item_rc_update()

static void dix_item_rc_update ( struct m0_dix_req req,
struct m0_cas_req creq,
uint64_t  key_idx,
struct m0_dix_item ditem 
)
static

Definition at line 1405 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_item_should_be_sent()

static bool dix_item_should_be_sent ( const struct m0_dix_req req,
uint32_t  i 
)
static

Determines whether item should be sent in dix_idxop_reqs_send().

Item should be sent if there was no failure for it on previous steps (i.e. during discovery) or if it should be sent during second phase of delete operation (see "Operation in degraded mode" in dix/client.h).

Definition at line 909 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layout_find()

static void dix_layout_find ( struct m0_dix_req req)
static

Definition at line 383 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layout_find_ast_cb()

static void dix_layout_find_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 285 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layout_find_clink_cb()

static bool dix_layout_find_clink_cb ( struct m0_clink cl)
static

Definition at line 371 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layout_from_read_rep()

static int dix_layout_from_read_rep ( struct m0_dix_meta_req req,
uint64_t  idx,
const struct m0_fid expected,
struct m0_dix_ldesc out 
)
static

Definition at line 416 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layouts_fini()

static void dix_layouts_fini ( struct dix_ctx ctx)
static

Definition at line 209 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_layouts_init()

static int dix_layouts_init ( struct dix_ctx ctx)
static

Definition at line 200 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_ldescr_resolve()

static void dix_ldescr_resolve ( struct m0_dix_req req)
static

Definition at line 1032 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_create()

static int dix_meta_create ( struct m0_dix_cli cli,
struct m0_sm_group grp,
struct m0_dix_ldesc dld_layout,
struct m0_dix_ldesc dld_ldescr 
)
static

Definition at line 196 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_delete()

static int dix_meta_delete ( struct m0_dix_cli cli,
struct m0_sm_group grp,
struct m0_dix_ldesc dld_layout,
struct m0_dix_ldesc dld_ldescr 
)
static

Definition at line 221 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_indices_fini()

static void dix_meta_indices_fini ( struct m0_dix meta)
static

Definition at line 149 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_indices_init()

static int dix_meta_indices_init ( struct m0_dix indices,
struct m0_dix_cli cli,
struct m0_dix_ldesc dld_layout,
struct m0_dix_ldesc dld_ldescr 
)
static

Definition at line 157 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_op_done_cb()

static bool dix_meta_op_done_cb ( struct m0_clink clink)
static

Definition at line 246 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_read_ast_cb()

static void dix_meta_read_ast_cb ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 163 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_meta_req_fini()

static void dix_meta_req_fini ( struct m0_dix_meta_req req)
static

Definition at line 272 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_mreq_rc()

static int dix_mreq_rc ( const struct m0_dix_req req)
static

Definition at line 60 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_net_fini()

static void dix_net_fini ( struct dix_ctx ctx)
static

Definition at line 188 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_net_init()

static int dix_net_init ( struct dix_ctx ctx,
const char *  local_addr 
)
static

Definition at line 120 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_online_unit_choose()

static void dix_online_unit_choose ( struct m0_dix_req req,
struct m0_dix_rec_op rec_op 
)
static

Definition at line 1984 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_pg_unit_pd_assign()

static void dix_pg_unit_pd_assign ( struct m0_dix_pg_unit pgu,
struct m0_pooldev pd 
)
static

Definition at line 2007 of file req.c.

Here is the caller graph for this function:

◆ dix_pg_unit_skip()

static bool dix_pg_unit_skip ( struct m0_dix_req req,
struct m0_dix_pg_unit unit 
)
static

Definition at line 2173 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_pver_fids_check()

static int dix_pver_fids_check ( struct dix_ctx ctx,
const struct m0_fid root,
const struct m0_fid layout,
const struct m0_fid ldescr 
)
static

Definition at line 382 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_pver_find()

static struct m0_pool_version* dix_pver_find ( const struct m0_dix_req req,
const struct m0_fid pver_fid 
)
static

Definition at line 474 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rebalance_sw_fom_create()

static int dix_rebalance_sw_fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 46 of file sw_fop.c.

Here is the call graph for this function:

◆ dix_rec_op_fini()

static void dix_rec_op_fini ( struct m0_dix_rec_op rec_op)
static

Definition at line 1260 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rec_op_init()

static int dix_rec_op_init ( struct m0_dix_rec_op rec_op,
struct m0_dix_req req,
struct m0_dix_cli cli,
struct m0_pool_version pver,
struct m0_dix dix,
struct m0_buf key,
uint64_t  user_item 
)
static

Definition at line 1233 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rec_op_pver()

static struct m0_pool_version* dix_rec_op_pver ( struct m0_dix_rec_op rec_op)
static

Definition at line 1901 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rec_op_spare_offset()

static uint32_t dix_rec_op_spare_offset ( struct m0_dix_rec_op rec_op)
static

Definition at line 1914 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_repair_sw_fom_create()

static int dix_repair_sw_fom_create ( struct m0_fop fop,
struct m0_fom **  m,
struct m0_reqh reqh 
)
static

Definition at line 46 of file sw_fop.c.

Here is the call graph for this function:

◆ dix_req_failure()

static void dix_req_failure ( struct m0_dix_req req,
int32_t  rc 
)
static

Definition at line 249 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_req_indices_copy()

static int dix_req_indices_copy ( struct m0_dix_req req,
const struct m0_dix indices,
uint32_t  indices_nr 
)
static

Definition at line 460 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_req_init()

static void dix_req_init ( struct m0_dix_req req,
struct m0_dix_cli cli,
struct m0_sm_group grp,
bool  meta 
)
static

Definition at line 209 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_req_is_idxop()

static bool dix_req_is_idxop ( const struct m0_dix_req req)
static

Definition at line 165 of file req.c.

Here is the caller graph for this function:

◆ dix_req_smgrp()

static struct m0_sm_group* dix_req_smgrp ( const struct m0_dix_req req)
static

Definition at line 170 of file req.c.

Here is the caller graph for this function:

◆ dix_req_state()

static enum m0_dix_req_state dix_req_state ( const struct m0_dix_req req)
static

Definition at line 235 of file req.c.

Here is the caller graph for this function:

◆ dix_req_state_set()

static void dix_req_state_set ( struct m0_dix_req req,
enum m0_dix_req_state  state 
)
static

Definition at line 240 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_reqh_services_start()

static int dix_reqh_services_start ( struct dix_ctx ctx)
static

Definition at line 228 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_resolved_nr()

static int dix_resolved_nr ( struct m0_dix_req req)
static

Definition at line 262 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_root_add()

static int dix_root_add ( struct m0_bufvec keys,
struct m0_bufvec vals,
uint32_t  idx,
const char *  iname,
const struct m0_fid ifid,
const struct m0_dix_ldesc idesc 
)
static

Serialize iname into keys and pair <FID,layout descriptor> into keys and vals bufvecs. Is used for insert the new pair of <key,val> into root and read val by key from root (for read case we should fill only keys parameter)

Definition at line 71 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_root_put()

static int dix_root_put ( struct m0_dix_cli cli,
struct m0_sm_group grp,
const struct m0_dix_ldesc dld_layout,
const struct m0_dix_ldesc dld_ldescr 
)
static

Definition at line 109 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_root_pver_find()

static int dix_root_pver_find ( struct dix_ctx ctx,
struct m0_fid out 
)
static

Definition at line 368 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop()

static void dix_rop ( struct m0_dix_req req)
static

Definition at line 1394 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_completed()

static void dix_rop_completed ( struct m0_sm_group grp,
struct m0_sm_ast ast 
)
static

Definition at line 1621 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_ctx_fini()

static void dix_rop_ctx_fini ( struct m0_dix_rop_ctx rop)
static

Definition at line 1343 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_ctx_init()

static int dix_rop_ctx_init ( struct m0_dix_req req,
struct m0_dix_rop_ctx rop,
const struct m0_bufvec keys,
uint64_t *  indices 
)
static

Definition at line 1302 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_del_phase2()

static void dix_rop_del_phase2 ( struct m0_dix_req req)
static

Definition at line 1586 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_del_phase2_rop()

static int dix_rop_del_phase2_rop ( struct m0_dix_req req,
struct m0_dix_rop_ctx **  out 
)
static

Definition at line 1524 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_failed_unit_tgt()

static void dix_rop_failed_unit_tgt ( struct m0_dix_req req,
struct m0_dix_rec_op rec_op,
uint64_t  unit 
)
static

Determines targets for the parity group 'unit' with the target device known to be non-online. Record operation units (rec_op->dgp_units[]) for the resulting targets are updated accordingly (usually dpu_is_spare flag is unset to indicate that spare unit target should be used instead of the failed one).

Definition at line 2022 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_failures_analyse()

static void dix_rop_failures_analyse ( struct m0_dix_req req)
static

For every unit that is unaccessible (resides on a non-online device) determines corresponding spare unit. Depending on DIX request type and device states, record units are updated in order to skip the failed unit, to use the spare unit or to use both the failed and the spare units.

For more information see dix/client.h, "Operation in degraded mode" section.

Definition at line 2095 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_max_failures()

static uint32_t dix_rop_max_failures ( struct m0_dix_rop_ctx rop)
static

Definition at line 1906 of file req.c.

Here is the caller graph for this function:

◆ dix_rop_one_completed()

static void dix_rop_one_completed ( struct m0_dix_cas_rop crop)
static

Definition at line 1669 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_tgt_iter_begin()

static void dix_rop_tgt_iter_begin ( const struct m0_dix_req req,
struct m0_dix_rec_op rec_op 
)
static

Definition at line 1835 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_tgt_iter_max()

static uint32_t dix_rop_tgt_iter_max ( struct m0_dix_req req,
struct m0_dix_rec_op rec_op 
)
static

Definition at line 1844 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_tgt_iter_next()

static void dix_rop_tgt_iter_next ( const struct m0_dix_req req,
struct m0_dix_rec_op rec_op,
uint64_t *  target,
bool *  is_spare 
)
static

Definition at line 1868 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rop_units_set()

static void dix_rop_units_set ( struct m0_dix_req req)
static

Definition at line 2115 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rpc_fini()

static void dix_rpc_fini ( struct dix_ctx ctx)
static

Definition at line 176 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rpc_init()

static int dix_rpc_init ( struct dix_ctx ctx)
static

Definition at line 128 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_rs_vals_alloc()

static int dix_rs_vals_alloc ( struct m0_dix_next_resultset rs,
uint32_t  key_idx,
uint32_t  nr 
)
static

Definition at line 197 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_service_start()

static int dix_service_start ( struct m0_reqh_service_type stype,
struct m0_reqh reqh 
)
static

Definition at line 216 of file m0dixinit.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_spare_slot_find()

static int dix_spare_slot_find ( struct m0_poolmach_state pm_state,
uint64_t  failed_tgt,
uint32_t *  spare_slot 
)
static

Definition at line 1883 of file req.c.

Here is the caller graph for this function:

◆ dix_spare_target()

static int dix_spare_target ( struct m0_dix_rec_op rec_op,
const struct m0_dix_pg_unit failed_unit,
uint32_t *  spare_slot,
struct m0_dix_pg_unit **  spare_unit 
)
static

Definition at line 1966 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_spare_target_with_data()

static int dix_spare_target_with_data ( struct m0_dix_rec_op rec_op,
const struct m0_dix_pg_unit failed_unit,
uint32_t *  spare_slot,
struct m0_dix_pg_unit **  spare_unit 
)
static

Definition at line 1975 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_to_cas_map()

static void dix_to_cas_map ( const struct m0_dix_req dreq,
const struct m0_cas_req creq 
)
static

Definition at line 175 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_to_mdix_map()

static void dix_to_mdix_map ( const struct m0_dix_req req,
const struct m0_dix_meta_req mreq 
)
static

Definition at line 277 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dix_type_layouts_nr()

static int dix_type_layouts_nr ( struct m0_dix_req req,
enum dix_layout_type  type 
)
static

Definition at line 255 of file req.c.

Here is the caller graph for this function:

◆ dix_unknown_layouts_nr()

static int dix_unknown_layouts_nr ( struct m0_dix_req req)
static

Definition at line 272 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ imask_size()

static uint64_t imask_size ( struct m0_dix_imask mask,
uint64_t  bs_len 
)
static

Returns total size in bits of all ranges for the given bit-string length in bits. Bit-string length is required in case if mask contains infinite range or bit-string is shorter than mask being applied.

Definition at line 92 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layout_create()

static int layout_create ( struct m0_layout_domain domain,
const struct m0_fid fid,
uint64_t  layout_id,
struct m0_pool_version pver,
struct m0_dix_linst dli 
)
static

Definition at line 47 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__layout_set()

M0_INTERNAL int m0_dix__layout_set ( const struct m0_dix_cli cli,
struct m0_dix out 
)

Fills 'out' structure with "layout" index fid and layout descriptor. User is responsible to finalise 'out' after usage.

Definition at line 295 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__layout_vals_dec()

M0_INTERNAL int m0_dix__layout_vals_dec ( const struct m0_bufvec keys,
const struct m0_bufvec vals,
struct m0_fid out_fid,
struct m0_dix_layout out_dlay,
uint32_t  nr 
)

Decodes 'keys' and 'vals' buffer vectors of keys/values from 'layout' index and returns decoded index identifiers and layouts. User must call m0_dix_ldesc_fini() for every 'out_dlay[i].u.dl_desc' when they are not necessary.

Definition at line 157 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__layout_vals_enc()

M0_INTERNAL int m0_dix__layout_vals_enc ( const struct m0_fid fid,
const struct m0_dix_layout dlay,
uint32_t  nr,
struct m0_bufvec keys,
struct m0_bufvec vals 
)

Encodes input arrays of index identifiers and layouts into record keys and values that can be stored in 'layout' meta-index.

'keys' and 'vals' buffer vectors shall be not allocated prior to invocation and user is responsible to free these buffer vectors afterwards.

Definition at line 111 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__ldesc_vals_dec()

M0_INTERNAL int m0_dix__ldesc_vals_dec ( const struct m0_bufvec keys,
const struct m0_bufvec vals,
uint64_t *  out_lid,
struct m0_dix_ldesc out_ldesc,
uint32_t  nr 
)

Decodes 'keys' and 'vals' buffer vectors of keys/values from 'layout-descr' index and returns decoded layout identifiers and layout descriptors. User must call m0_dix_ldesc_fini() for returned 'out_ldesc' objects when they are not necessary.

Definition at line 234 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__ldesc_vals_enc()

M0_INTERNAL int m0_dix__ldesc_vals_enc ( const uint64_t *  lid,
const struct m0_dix_ldesc ldesc,
uint32_t  nr,
struct m0_bufvec keys,
struct m0_bufvec vals 
)

Encodes input arrays of layout identifiers and layout descriptors into record keys and values that can be stored in 'layout-descr' meta-index.

'keys' and 'vals' buffer vectors shall be not allocated prior to invocation and user is responsible to free these buffer vectors afterwards.

Definition at line 195 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__ldescr_set()

M0_INTERNAL int m0_dix__ldescr_set ( const struct m0_dix_cli cli,
struct m0_dix out 
)

Fills 'out' structure with "layout-descr" index fid and layout descriptor. User is responsible to finalise 'out' after usage.

Definition at line 302 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__meta_val_dec()

M0_INTERNAL int m0_dix__meta_val_dec ( const struct m0_bufvec vals,
struct m0_fid out_fid,
struct m0_dix_ldesc out_dld,
uint32_t  nr 
)

Decodes 'vals' buffer vector of record values from 'root' index and returns FID+layout descriptor pairs. User must call m0_dix_ldesc_fini() for returned 'out_dld' objects when they are not necessary.

Definition at line 74 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__meta_val_enc()

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 
)

Encodes arrays of FID+layout pairs into values that can be stored as record values in 'root' meta-index. Encoded values are stored in 'vals' buffer vector.

'vals' buffer vector shall be not allocated prior to invocation and user is responsible to free this buffer vector afterwards.

Definition at line 48 of file encdec.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix__root_set()

M0_INTERNAL int m0_dix__root_set ( const struct m0_dix_cli cli,
struct m0_dix out 
)

Fills 'out' structure with root index fid and layout descriptor. User is responsible to finalise 'out' after usage.

Definition at line 288 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cctgs_lookup()

M0_INTERNAL int m0_dix_cctgs_lookup ( struct m0_dix_req req,
const struct m0_dix indices,
uint32_t  indices_nr 
)

Checks whether all component catalogues exist for the given indices. Returns error if any component catalogue isn't accessible (e.g. disk where it resides has failed) or doesn't exist. It doesn't make sense to call this function for distributed indices with CROW policy, since some component catalogues may be not created yet.

Definition at line 1214 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_bootstrap()

M0_INTERNAL void m0_dix_cli_bootstrap ( struct m0_dix_cli cli)

Moves DIX client to special "bootstrap" mode.

In that mode the only request allowed is creating meta-indices in cluster (m0_dix_meta_create()). It's the only way to create meta-indices in the cluster, because in normal mode DIX client returns error if meta-indices are not found in the cluster.

Precondition
DIX client is initialised, but not started.
m0_dix_cli_is_locked(cli)

Definition at line 237 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_bootstrap_lock()

M0_INTERNAL void m0_dix_cli_bootstrap_lock ( struct m0_dix_cli cli)

The same as m0_dix_cli_bootstrap(), but locks DIX client internally.

Precondition
DIX client is initialised, but not started.
!m0_dix_cli_is_locked(cli)

Definition at line 245 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_fini()

M0_INTERNAL void m0_dix_cli_fini ( struct m0_dix_cli cli)

Finalises DIX client.

Precondition
m0_dix_cli_is_locked(cli)

Definition at line 268 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_fini_lock()

M0_INTERNAL void m0_dix_cli_fini_lock ( struct m0_dix_cli cli)

The same as m0_dix_cli_fini(), but locks DIX client internally.

Definition at line 278 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_init()

M0_INTERNAL int m0_dix_cli_init ( struct m0_dix_cli cli,
struct m0_sm_group sm_group,
struct m0_pools_common pc,
struct m0_layout_domain ldom,
const struct m0_fid pver 
)

Initialises DIX client.

Parameters
cliDIX client.
sm_groupSM group for DIX client state machine. Asynchronous operations like m0_dix_cli_start() are executed in this SM group. Also, this SM group is locked/unlocked in m0_dix_lock()/m0_dix_unlock().
pcPools common structure where pool versions of index layouts are looked up. Also destination CAS services structures are looked up at pc->pc_dev2svc.
ldomLayout domain where layout structures for parity math are created.
pverPool version of the root index (usually m0_conf_root::rt_imeta_pver).

Definition at line 130 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_is_locked()

M0_INTERNAL bool m0_dix_cli_is_locked ( const struct m0_dix_cli cli)

Checks whether DIX client SM group is locked.

Definition at line 105 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_lock()

M0_INTERNAL void m0_dix_cli_lock ( struct m0_dix_cli cli)

Locks DIX client SM group.

Definition at line 93 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_start()

M0_INTERNAL void m0_dix_cli_start ( struct m0_dix_cli cli)

Starts DIX client asynchronously.

DIX client moves its SM (cli->dx_sm) to DIXCLI_READY or DIXCLI_FAILURE state on start procedure finish. If result state is DIXCLI_READY, then DIX client is ready to send DIX requests (see dix/meta.h and dix/req.h).

Precondition
DIX client is initialised or in a "bootstrap" mode.

Definition at line 214 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_start_sync()

M0_INTERNAL int m0_dix_cli_start_sync ( struct m0_dix_cli cli)

Starts DIX client synchronously.

Note
Locks DIX SM group internally.

Definition at line 221 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_stop()

M0_INTERNAL void m0_dix_cli_stop ( struct m0_dix_cli cli)

Stops DIX client synchronously.

Precondition
m0_dix_cli_is_locked(cli)

Definition at line 253 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_stop_lock()

M0_INTERNAL void m0_dix_cli_stop_lock ( struct m0_dix_cli cli)

The same as m0_dix_cli_stop(), but locks DIX client internally.

Definition at line 261 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cli_unlock()

M0_INTERNAL void m0_dix_cli_unlock ( struct m0_dix_cli cli)

Unlocks DIX client SM group.

Definition at line 99 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cm_iter_cur_pos()

M0_INTERNAL void m0_dix_cm_iter_cur_pos ( struct m0_dix_cm_iter iter,
struct m0_fid cctg_fid,
uint64_t *  cctg_proc_recs_nr 
)

Gets fid of component catalogue that is currently under processing and number of processed records of this component catalogue.

Parameters
[in]iterDIX CM iterator.
[out]cctg_fidCurrent component catalogue fid.
[out]cctg_proc_recs_nrNumber of processed records.

Definition at line 1537 of file iter.c.

Here is the caller graph for this function:

◆ m0_dix_cm_iter_get()

M0_INTERNAL int m0_dix_cm_iter_get ( struct m0_dix_cm_iter iter,
struct m0_buf key,
struct m0_buf val,
uint32_t *  sdev_id 
)

Gets current key/value and remote device id for which retrieved key/value are targeted to.

Note
Key/value buffers are copied inside of this function, caller is responsible for their deallocation.
Parameters
[in]iterDIX CM iterator.
[in]keyBuffer which data pointer will be set to key.
[in]valBuffer which data pointer will be set to value.
[out]sdev_idRemote device id.

0 on success. -ENODATA if all local catalogues are processed. Other error code on iterator failure.

See also
m0_dix_cm_iter_next()

Definition at line 1465 of file iter.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cm_iter_next()

M0_INTERNAL void m0_dix_cm_iter_next ( struct m0_dix_cm_iter iter)

Wakes up DIX CM iterator FOM to move the iterator to the next record. Than key/value can be retrieved using () function.

Parameters
iterDIX CM iterator.
See also
m0_dix_cm_iter_get()

Definition at line 1458 of file iter.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cm_iter_processed_num()

M0_INTERNAL void m0_dix_cm_iter_processed_num ( struct m0_dix_cm_iter iter,
uint64_t *  proc_recs_nr 
)

Gets current number of overall processed records by iterator .

Parameters
[in]iterDIX CM iterator.
[out]proc_recs_nrNumber of overall processed records.

Definition at line 1546 of file iter.c.

◆ m0_dix_cm_iter_start()

M0_INTERNAL int m0_dix_cm_iter_start ( struct m0_dix_cm_iter iter,
struct m0_dix_cm_type dcmt,
struct m0_reqh reqh,
m0_bcount_t  rpc_cutoff 
)

Starts DIX CM iterator by queueing of corresponding FOM for execution. Function always returns success for now.

Parameters
iterDIX CM iterator.
dcmtDIX CM iterator type.
reqhCorresponding request handler.
rpc_cutoffThreshold in bytes for transmission using bulk.

0 On success.

Definition at line 1429 of file iter.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cm_iter_stop()

M0_INTERNAL void m0_dix_cm_iter_stop ( struct m0_dix_cm_iter iter)

Tells DIX CM iterator to stop and waits for the final state of its FOM. Please note that no external lock should be held before calling this function, because it may wait and block. Otherwise, deadlock may appear on that external lock.

Parameters
iterDIX CM iterator.
See also
m0_dix_cm_iter_start()

Definition at line 1525 of file iter.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_cm_iter_type_register()

M0_INTERNAL void m0_dix_cm_iter_type_register ( struct m0_dix_cm_type dcmt)

Registers DIX CM iterator FOM type.

Parameters
dcmtDIX CM iterator type.

Definition at line 1419 of file iter.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_copy()

M0_INTERNAL int m0_dix_copy ( struct m0_dix dst,
const struct m0_dix src 
)

Copy distributed index descriptor 'src' to 'dst'.

Definition at line 2587 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_create()

M0_INTERNAL int m0_dix_create ( struct m0_dix_req req,
const struct m0_dix indices,
uint32_t  indices_nr,
struct m0_dtx dtx,
uint32_t  flags 
)

Creates distributed indices.

This request registers provided indices in "layout" meta-index and then, if COF_CROW flag is not specified, creates component catalogues for indices.

User can specify for every index to be created layout ID or full layout descriptor. Layout IDs are checked for existence internally.

If req->dr_is_meta is set, then provided indices are not registered in "layout" meta-index, only component catalogues are created.

Precondition
m0_forall(i, indices_nr, indices[i].dd_layout.dl_type != DIX_LTYPE_UNKNOWN)
ergo(req->dr_is_meta, dix_id_layouts_nr(req) == 0)
M0_IN(flags, (0, COF_CROW))

Definition at line 990 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_del()

M0_INTERNAL int m0_dix_del ( struct m0_dix_req req,
const struct m0_dix index,
const struct m0_bufvec keys,
struct m0_dtx dtx,
uint32_t  flags 
)

Deletes records from distributed index.

'Keys' buffer vector is managed by user and shall be accessible until the request completion.

Precondition
keys->ov_vec.v_nr > 0
(flags & ~(COF_SYNC_WAIT)) == 0

Definition at line 2388 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_delete()

M0_INTERNAL int m0_dix_delete ( struct m0_dix_req req,
const struct m0_dix indices,
uint64_t  indices_nr,
struct m0_dtx dtx,
uint32_t  flags 
)

Destroys distributed indices.

For every provided index destroys all its component catalogues (along with data) and unregisters it from "layout" index.

If indices were created with COF_CROW, then it is user responsibility to set COF_CROW for delete operation also. Otherwise, execution errors are possible.

Precondition
M0_IN(flags, (0, COF_CROW))

Definition at line 1190 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_desc_set()

M0_INTERNAL int m0_dix_desc_set ( struct m0_dix dix,
const struct m0_dix_ldesc desc 
)

Sets copy of layout descriptor 'desc' as 'dix' layout.

Definition at line 2596 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_devices_nr()

M0_INTERNAL uint32_t m0_dix_devices_nr ( struct m0_dix_linst linst)

Returns total number of devices (targets) accounted by layout instance.

Definition at line 68 of file layout.c.

Here is the call graph for this function:

◆ m0_dix_fid__device_id_extract()

M0_INTERNAL uint32_t m0_dix_fid__device_id_extract ( const struct m0_fid fid)

Definition at line 39 of file fid_convert.c.

Here is the caller graph for this function:

◆ m0_dix_fid_cctg_device_id()

M0_INTERNAL uint32_t m0_dix_fid_cctg_device_id ( const struct m0_fid cctg_fid)

Definition at line 81 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fid_convert_cctg2dix()

M0_INTERNAL void m0_dix_fid_convert_cctg2dix ( const struct m0_fid cctg_fid,
struct m0_fid dix_fid 
)

Definition at line 69 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fid_convert_dix2cctg()

M0_INTERNAL void m0_dix_fid_convert_dix2cctg ( const struct m0_fid dix_fid,
struct m0_fid cctg_fid,
uint32_t  device_id 
)

Definition at line 54 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fid_dix_make()

M0_INTERNAL void m0_dix_fid_dix_make ( struct m0_fid dix_fid,
uint32_t  container,
uint64_t  key 
)

Definition at line 45 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fid_validate_cctg()

M0_INTERNAL bool m0_dix_fid_validate_cctg ( const struct m0_fid cctg_fid)

Definition at line 94 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fid_validate_dix()

M0_INTERNAL bool m0_dix_fid_validate_dix ( const struct m0_fid dix_fid)

Definition at line 88 of file fid_convert.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_fini()

M0_INTERNAL void m0_dix_fini ( struct m0_dix dix)

Finalises distributed index descriptor.

Deallocates memory allocated for 'dix' fields, but not for 'dix' itself.

Definition at line 2603 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_generic_rc()

M0_INTERNAL int m0_dix_generic_rc ( const struct m0_dix_req req)

Returns generic return code for the operation.

If the generic return code is negative, then the whole request has failed. Otherwise, the user should check return codes for the individual items in operation vector via m0_dix_item_rc().

Precondition
M0_IN(req->dr_sm.sm_state, (DIXREQ_FINAL, DIXREQ_FAILURE))

Definition at line 2483 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_get()

M0_INTERNAL int m0_dix_get ( struct m0_dix_req req,
const struct m0_dix index,
const struct m0_bufvec keys 
)

Gets values for provided keys from distributed index.

'Keys' buffer vector is managed by user and shall be accessible until the request completion.

Retrieved values on request completion can be retrieved via m0_dix_get_rep().

Precondition
keys->ov_vec.v_nr > 0

Definition at line 2357 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_get_rep()

M0_INTERNAL void m0_dix_get_rep ( const struct m0_dix_req req,
uint64_t  idx,
struct m0_dix_get_reply rep 
)

Gets record value for i-th key retrieved by m0_dix_get().

Function fills rep->dgr_val. Value data buffer is deallocated in m0_dix_req_fini(), unless m0_dix_get_rep_mlock() is called by user.

Precondition
m0_dix_generic_rc(req) == 0

Definition at line 2378 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_get_rep_mlock()

M0_INTERNAL void m0_dix_get_rep_mlock ( struct m0_dix_req req,
uint64_t  idx 
)

Prevents deallocation of key/value buffers during request finalisation.

Applicable only for GET request. Retrieved 'idx'-th record value buffer is locked in memory and user is responsible to deallocate it.

See also
m0_dix_get_rep()

Definition at line 2509 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_imask_apply()

M0_INTERNAL int m0_dix_imask_apply ( void *  buffer,
m0_bcount_t  buf_len_bytes,
struct m0_dix_imask mask,
void **  res,
m0_bcount_t res_len_bits 
)

Applies identity mask to a user-provided bit-string. Value res should be deallocated by user with m0_free().

Definition at line 135 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_imask_copy()

M0_INTERNAL int m0_dix_imask_copy ( struct m0_dix_imask dst,
const struct m0_dix_imask src 
)

Makes a deep copy of identity mask.

Definition at line 172 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_imask_eq()

M0_INTERNAL bool m0_dix_imask_eq ( const struct m0_dix_imask imask1,
const struct m0_dix_imask imask2 
)

Checks whether imasks are equal

Definition at line 187 of file imask.c.

Here is the caller graph for this function:

◆ m0_dix_imask_fini()

M0_INTERNAL void m0_dix_imask_fini ( struct m0_dix_imask mask)

Finalises identity mask.

Definition at line 118 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_imask_init()

M0_INTERNAL int m0_dix_imask_init ( struct m0_dix_imask mask,
struct m0_ext range,
uint64_t  nr 
)

Initialises identity mask. Array of ranges for the mask is allocated internally, so user can free 'range' array after initialisation.

Definition at line 97 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_imask_is_empty()

M0_INTERNAL bool m0_dix_imask_is_empty ( const struct m0_dix_imask mask)

Checks whether identity mask is empty (has 0 ranges defined).

Definition at line 130 of file imask.c.

Here is the caller graph for this function:

◆ m0_dix_index_list()

M0_INTERNAL int m0_dix_index_list ( struct m0_dix_meta_req req,
const struct m0_fid start_fid,
uint32_t  indices_nr 
)

Returns identifiers of the next 'indices_nr' indices starting with index having 'start_fid' identifier.

Retrieved indices identifiers can be acessed using m0_dix_index_list_rep_nr() and m0_dix_index_list_rep().

Precondition
start_fid != NULL
indices_nr != 0

Definition at line 669 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_index_list_rep()

M0_INTERNAL int m0_dix_index_list_rep ( struct m0_dix_meta_req req,
uint32_t  idx,
struct m0_fid fid 
)

Gets 'idx'-th index identifier retrieved by m0_dix_index_list() request.

Definition at line 704 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_index_list_rep_nr()

M0_INTERNAL int m0_dix_index_list_rep_nr ( struct m0_dix_meta_req req)

Returns number of indices retrieved by m0_dix_index_list().

If returned value is less than number of indices requested, then there are no more distributed indices.

Definition at line 699 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_item_rc()

M0_INTERNAL int m0_dix_item_rc ( const struct m0_dix_req req,
uint64_t  idx 
)

Returns execution result for the 'idx'-th item in the input vector.

Precondition
m0_dix_generic_rc(req) == 0
idx < m0_dix_req_nr(req)

Definition at line 2475 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_del()

M0_INTERNAL int m0_dix_layout_del ( struct m0_dix_meta_req req,
const struct m0_fid fid,
uint32_t  nr 
)

Deletes layouts for distributed indices with the given fids.

It deletes records from "layout" meta-index.

Definition at line 603 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_eq()

M0_INTERNAL bool m0_dix_layout_eq ( const struct m0_dix_layout layout1,
const struct m0_dix_layout layout2 
)

Checks whether two distributed index layouts are equal.

Definition at line 322 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_fini()

M0_INTERNAL void m0_dix_layout_fini ( struct m0_dix_linst dli)

Finalises DIX layout instance.

Definition at line 102 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_get()

M0_INTERNAL int m0_dix_layout_get ( struct m0_dix_meta_req req,
const struct m0_fid fid,
uint32_t  nr 
)

Retrieves layouts for distributed indices with the given fids.

It can also be used to check for existence of the distributed indices. Once operation is finished, retrieved layouts are accessible via m0_dix_layout_rep_get().

Definition at line 626 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_init()

M0_INTERNAL int m0_dix_layout_init ( struct m0_dix_linst dli,
struct m0_layout_domain domain,
const struct m0_fid fid,
uint64_t  layout_id,
struct m0_pool_version pver,
struct m0_dix_ldesc dld 
)

Builds DIX layout instance.

Internal function, user should use m0_dix_layout_iter_init() instead.

Definition at line 86 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_fini()

M0_INTERNAL void m0_dix_layout_iter_fini ( struct m0_dix_layout_iter iter)

Finalises DIX layout iterator.

Definition at line 315 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_get_at()

M0_INTERNAL void m0_dix_layout_iter_get_at ( struct m0_dix_layout_iter iter,
uint64_t  unit,
uint64_t *  tgt 
)

Calculates target for specified 'unit' in a parity group.

It doesn't affect iterator current position.

Definition at line 258 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_goto()

M0_INTERNAL void m0_dix_layout_iter_goto ( struct m0_dix_layout_iter iter,
uint64_t  unit_nr 
)

Moves iterator current position to unit with number 'unit_nr'.

Next m0_dix_layout_iter_next() invocation will return target for 'unit_nr' unit.

Definition at line 302 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_init()

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 
)

Initialises DIX layout iterator.

After initialisation iterator stay on first unit (data unit) in parity group.

Parameters
iterLayout iterator.
indexFid of distributed index having layout 'ldesc'.
ldomLayout domain where layout instance is created.
pverPool version where distributed index is stored.
ldescDistributed index layout descriptor.
keyKey of the record for which targets are calculated.

Definition at line 203 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_next()

M0_INTERNAL void m0_dix_layout_iter_next ( struct m0_dix_layout_iter iter,
uint64_t *  tgt 
)

Calculates target for the next unit in record parity group.

User is responsible to not overcome parity group boundary. Number of units in parity group can be obtained via m0_dix_liter_W().

Definition at line 249 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_iter_reset()

M0_INTERNAL void m0_dix_layout_iter_reset ( struct m0_dix_layout_iter iter)

Resets iterator current position to the beginning.

Definition at line 310 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_put()

M0_INTERNAL int m0_dix_layout_put ( struct m0_dix_meta_req req,
const struct m0_fid fid,
const struct m0_dix_layout dlay,
uint32_t  nr,
uint32_t  flags 
)

Stores layouts for distributed indices with the given fids.

It puts "index fid":"index layout" pairs to "layout" meta-index.

Note
See m0_dix_put() for allowed flags.

Definition at line 574 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_layout_rep_get()

M0_INTERNAL int m0_dix_layout_rep_get ( struct m0_dix_meta_req req,
uint64_t  idx,
struct m0_dix_layout dlay 
)

Returns the 'idx'-th layout retrieved by m0_dix_layout_get().

'dlay' may be NULL if user is interested only in return code without copying the layout, e.g. to check that the index exists.

Definition at line 650 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_ldesc_copy()

M0_INTERNAL int m0_dix_ldesc_copy ( struct m0_dix_ldesc dst,
const struct m0_dix_ldesc src 
)

Copies layout descriptor.

Copied layout descriptor 'dst' shall be finalised by user afterwards.

Definition at line 189 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_ldesc_fini()

M0_INTERNAL void m0_dix_ldesc_fini ( struct m0_dix_ldesc ld)

Finalises layout descriptor.

Definition at line 197 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_ldesc_init()

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 
)

Initialises layout descriptor.

Definition at line 171 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_ldescr_del()

M0_INTERNAL int m0_dix_ldescr_del ( struct m0_dix_meta_req req,
const uint64_t *  lid,
uint32_t  nr 
)

Deletes mapping between layout id and layout descriptor from 'layout-descr' meta-index.

Definition at line 550 of file meta.c.

Here is the call graph for this function:

◆ m0_dix_ldescr_get()

M0_INTERNAL int m0_dix_ldescr_get ( struct m0_dix_meta_req req,
const uint64_t *  lid,
uint32_t  nr 
)

Queries layout descriptor for the given layout id from 'layout-descr' meta-index. After request is finished retrieved layout descriptor can be accessed through m0_dix_ldescr_rep_get().

Definition at line 506 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_ldescr_put()

M0_INTERNAL int m0_dix_ldescr_put ( struct m0_dix_meta_req req,
const uint64_t *  lid,
const struct m0_dix_ldesc ldesc,
uint32_t  nr 
)

Adds mapping between layout id and layout descriptor into 'layout-descr' meta-index.

Definition at line 478 of file meta.c.

Here is the call graph for this function:

◆ m0_dix_ldescr_rep_get()

M0_INTERNAL int m0_dix_ldescr_rep_get ( struct m0_dix_meta_req req,
uint64_t  idx,
struct m0_dix_ldesc ldesc 
)

Returns result of m0_dix_ldescr_get() request.

Precondition
m0_dix_meta_generic_rc(req) == 0

Definition at line 530 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_liter_K()

M0_INTERNAL uint32_t m0_dix_liter_K ( struct m0_dix_layout_iter iter)

Returns number of parity units in a parity group.

Definition at line 280 of file layout.c.

Here is the caller graph for this function:

◆ m0_dix_liter_N()

M0_INTERNAL uint32_t m0_dix_liter_N ( struct m0_dix_layout_iter iter)

Returns number of data units in a parity group.

Shall be always 1 in current implementation.

Definition at line 270 of file layout.c.

Here is the caller graph for this function:

◆ m0_dix_liter_P()

M0_INTERNAL uint32_t m0_dix_liter_P ( struct m0_dix_layout_iter iter)

Returns total number of targets.

Definition at line 275 of file layout.c.

Here is the caller graph for this function:

◆ m0_dix_liter_S()

M0_INTERNAL uint32_t m0_dix_liter_S ( struct m0_dix_layout_iter iter)

Returns number of spare units in a parity group.

Definition at line 285 of file layout.c.

Here is the caller graph for this function:

◆ m0_dix_liter_spare_offset()

M0_INTERNAL uint32_t m0_dix_liter_spare_offset ( struct m0_dix_layout_iter iter)

Returns number of first spare unit in a parity group.

Definition at line 290 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_liter_unit_classify()

M0_INTERNAL uint32_t m0_dix_liter_unit_classify ( struct m0_dix_layout_iter iter,
uint64_t  unit 
)

Classify specified 'unit' to one of the classes listed in m0_pdclust_unit_type.

Definition at line 295 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_liter_W()

M0_INTERNAL uint32_t m0_dix_liter_W ( struct m0_dix_layout_iter iter)

Returns total number of units (datai + parity + spare) in a parity group.

Definition at line 265 of file layout.c.

Here is the caller graph for this function:

◆ m0_dix_meta_check()

M0_INTERNAL int m0_dix_meta_check ( struct m0_dix_cli cli,
struct m0_sm_group grp,
bool *  result 
)

Checks whether meta-data is available (previously created).

Performs check for existence of 'root', 'layout' and 'layout-descr' in pool version assigned in client (including all meta-indices component catalogues).

Note
The function is synchronous.
Precondition
cli->dx_sm.sm_state == DIXCLI_READY
See also
m0_dix_cctgs_lookup()

Definition at line 343 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_create()

M0_INTERNAL int m0_dix_meta_create ( struct m0_dix_cli cli,
struct m0_sm_group grp,
struct m0_dix_ldesc dld_layout,
struct m0_dix_ldesc dld_ldescr 
)

Creates meta-indices (root, layout, layout-descr).

Note
The function is synchronous.
Precondition
cli->dx_sm.sm_state == DIXCLI_BOOTSTRAP

Definition at line 326 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_destroy()

M0_INTERNAL int m0_dix_meta_destroy ( struct m0_dix_cli cli,
struct m0_sm_group grp 
)

Destroys meta-indices (root, layout, layout-descr).

Note
The function is synchronous.
Precondition
cli->dx_sm.sm_state == DIXCLI_READY

Definition at line 467 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_generic_rc()

M0_INTERNAL int m0_dix_meta_generic_rc ( const struct m0_dix_meta_req req)

Returns generic return code for the meta operation.

If the generic return code is negative, then the whole request has failed. Otherwise, the user should check return codes for the individual items in operation vector via m0_dix_meta_item_rc().

Definition at line 309 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_item_rc()

M0_INTERNAL int m0_dix_meta_item_rc ( const struct m0_dix_meta_req req,
uint64_t  idx 
)

Returns execution result for the 'idx'-th item in the input vector.

Precondition
m0_dix_meta_generic_rc(req) == 0
idx < m0_dix_meta_req_nr(req)

Definition at line 314 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_lock()

M0_INTERNAL void m0_dix_meta_lock ( struct m0_dix_meta_req req)

Acquires lock for DIX meta request state machine group.

All asynchronous meta operations require DIX meta request state machine group being locked before invocation. DIX meta request state machine group is the one passed to m0_dix_meta_req_init() function.

Definition at line 299 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_req_fini()

M0_INTERNAL void m0_dix_meta_req_fini ( struct m0_dix_meta_req req)

Finalises DIX meta request.

Definition at line 285 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_req_fini_lock()

M0_INTERNAL void m0_dix_meta_req_fini_lock ( struct m0_dix_meta_req req)

The same as m0_dix_meta_req_fini(), but takes request lock internally.

Definition at line 291 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_req_init()

M0_INTERNAL void m0_dix_meta_req_init ( struct m0_dix_meta_req req,
struct m0_dix_cli cli,
struct m0_sm_group grp 
)

Initialises DIX meta request.

It shall be called before passing request to other functions like m0_dix_root_read(), m0_dix_ldescr_put(), etc.

Definition at line 259 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_req_nr()

M0_INTERNAL int m0_dix_meta_req_nr ( const struct m0_dix_meta_req req)

Number of items in a user input vector for the given meta request.

Definition at line 321 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_meta_unlock()

M0_INTERNAL void m0_dix_meta_unlock ( struct m0_dix_meta_req req)

Releases lock for DIX meta request state machine group.

Definition at line 304 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_mreq_init()

M0_INTERNAL void m0_dix_mreq_init ( struct m0_dix_req req,
struct m0_dix_cli cli,
struct m0_sm_group grp 
)

Initialises DIX request operating with meta-indices. This function shall be used instead of m0_dix_req_init() if the request is the record operation over the meta-index ("root", "layout" or "layout-descr").

Definition at line 221 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_next()

M0_INTERNAL int m0_dix_next ( struct m0_dix_req req,
const struct m0_dix index,
const struct m0_bufvec start_keys,
const uint32_t *  recs_nr,
uint32_t  flags 
)

Gets next 'recs_nr[i]' records for each i-th key in 'start_keys'.

Size of recs_nr array should be >= start_keys->ov_vec.v_nr.

Requested record ranges may overlap. Duplicates in a result are not filtered.

Records with 'start_keys' keys are also accounted and included in the result unless COF_EXCLUDE_START_KEY flag is specified.

In order to start iteration from the first record user may specify 1-byte zero start key and specify COF_SLANT flag. COF_SLANT flag is also useful if start key may be not found in the index. In this case iteration starts with the smallest key following the start key.

'Flags' argument is a bitmask of m0_cas_op_flags values.

Precondition
keys_nr != 0
(flags & ~(COF_SLANT | COF_EXCLUDE_START_KEY)) == 0

Definition at line 2415 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_next_rep()

M0_INTERNAL void m0_dix_next_rep ( const struct m0_dix_req req,
uint64_t  key_idx,
uint64_t  val_idx,
struct m0_dix_next_reply rep 
)

Gets 'val_idx'-th value retrieved for 'key_idx'-th key as a result of m0_dix_next() request.

Function doesn't copy key/value data buffers, only assign pointers to received buffers. They are deallocated in m0_dix_req_fini(), unless m0_dix_next_rep_mlock() is called by user.

Precondition
m0_dix_item_rc(req, key_idx) == 0

Definition at line 2449 of file req.c.

Here is the caller graph for this function:

◆ m0_dix_next_rep_mlock()

M0_INTERNAL void m0_dix_next_rep_mlock ( struct m0_dix_req req,
uint32_t  key_idx,
uint32_t  val_idx 
)

Prevents deallocation of key/value buffers during request finalisation.

Applicable only for NEXT request. For 'key_idx'-th start key and 'val_idx'-th record value retrieved for it key/value buffers are locked in memory and user is responsible to deallocate them.

See also
m0_dix_next_rep()

Definition at line 2519 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_next_rep_nr()

M0_INTERNAL uint32_t m0_dix_next_rep_nr ( const struct m0_dix_req req,
uint64_t  key_idx 
)

Returns number of values retrieved for 'key_idx'-th key.

If number of values is less than requested, then end of index is reached.

Precondition
m0_dix_item_rc(req, key_idx) == 0

Definition at line 2468 of file req.c.

Here is the caller graph for this function:

◆ m0_dix_next_result_prepare()

M0_INTERNAL int m0_dix_next_result_prepare ( struct m0_dix_req req)

Performs merge sorting of records retrieved for NEXT operation.

Since NEXT operation queries all component catalogues for subsequent records, then on completion received records shall be sorted, duplicates shall be filtered and excessive records shall be thrown away from result.

Definition at line 252 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_put()

M0_INTERNAL int m0_dix_put ( struct m0_dix_req req,
const struct m0_dix index,
const struct m0_bufvec keys,
const struct m0_bufvec vals,
struct m0_dtx dtx,
uint32_t  flags 
)

Inserts records to a distributed index.

'Keys' and 'vals' buffer vectors are managed by user and shall be accessible until the request completion.

Precondition
keys->ov_vec.v_nr > 0
keys->ov_vec.v_nr == vals->ov_vec.v_nr
flags & ~(COF_OVERWRITE | COF_CROW | COF_SYNC_WAIT)) == 0

Definition at line 2326 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_pver()

M0_INTERNAL struct m0_pool_version * m0_dix_pver ( const struct m0_dix_cli cli,
const struct m0_dix dix 
)

Finds pool version structure by pool version fid specified in index layout descriptor.

Precondition
dix->dd_layout.dl_type == DIX_LTYPE_DESCR

Definition at line 309 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_rebalance_sw_onwire_fop_fini()

M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_fini ( void  )
See also
m0_cm_repreb_sw_onwire_fop_fini()

Definition at line 84 of file sw_fop.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_rebalance_sw_onwire_fop_init()

M0_INTERNAL void m0_dix_rebalance_sw_onwire_fop_init ( void  )
See also
m0_cm_repreb_sw_onwire_fop_init()

Definition at line 65 of file sw_fop.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_rebalance_sw_onwire_fop_setup()

M0_INTERNAL int m0_dix_rebalance_sw_onwire_fop_setup ( struct m0_cm cm,
struct m0_fop fop,
void(*)(struct m0_ref *)  fop_release,
uint64_t  proxy_id,
const char *  local_ep,
const struct m0_cm_sw sw,
const struct m0_cm_sw out_interval 
)
See also
m0_cm_repreb_sw_onwire_fop_setup()

Definition at line 92 of file sw_fop.c.

Here is the call graph for this function:

◆ m0_dix_repair_sw_onwire_fop_fini()

M0_INTERNAL void m0_dix_repair_sw_onwire_fop_fini ( void  )
See also
m0_cm_repreb_sw_onwire_fop_fini()

Definition at line 84 of file sw_fop.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_repair_sw_onwire_fop_init()

M0_INTERNAL void m0_dix_repair_sw_onwire_fop_init ( void  )
See also
m0_cm_repreb_sw_onwire_fop_init()

Definition at line 65 of file sw_fop.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_repair_sw_onwire_fop_setup()

M0_INTERNAL int m0_dix_repair_sw_onwire_fop_setup ( struct m0_cm cm,
struct m0_fop fop,
void(*)(struct m0_ref *)  fop_release,
uint64_t  proxy_id,
const char *  local_ep,
const struct m0_cm_sw sw,
const struct m0_cm_sw out_interval 
)
See also
m0_cm_repreb_sw_onwire_fop_setup()

Definition at line 92 of file sw_fop.c.

Here is the call graph for this function:

◆ m0_dix_req_cancel()

M0_INTERNAL void m0_dix_req_cancel ( struct m0_dix_req dreq)

Cancels launched dix index operation by cancelling rpc items.

Definition at line 1152 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_fini()

M0_INTERNAL void m0_dix_req_fini ( struct m0_dix_req req)

Finalises DIX request.

Precondition
M0_IN(req->dr_sm.sm_state, (DIXREQ_FINAL, DIXREQ_FAILURE))
m0_dix_req_is_locked()

Definition at line 2553 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_fini_lock()

M0_INTERNAL void m0_dix_req_fini_lock ( struct m0_dix_req req)

The same as m0_dix_req_fini(), but takes SM group lock internally.

Precondition
M0_IN(req->dr_sm.sm_state, (DIXREQ_FINAL, DIXREQ_FAILURE))
!m0_dix_req_is_locked()

Definition at line 2577 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_init()

M0_INTERNAL void m0_dix_req_init ( struct m0_dix_req req,
struct m0_dix_cli cli,
struct m0_sm_group grp 
)

Initialises DIX request.

Definition at line 228 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_is_locked()

M0_INTERNAL bool m0_dix_req_is_locked ( const struct m0_dix_req req)

Checks whether DIX request state machine group is locked.

Definition at line 196 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_lock()

M0_INTERNAL void m0_dix_req_lock ( struct m0_dix_req req)

Locks state machine group that is used by DIX request.

Definition at line 184 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_nr()

M0_INTERNAL uint64_t m0_dix_req_nr ( const struct m0_dix_req req)

Returns the number of results.

It's guaranteed that if m0_dix_req_generic_rc(req) == 0, then m0_dix_req_nr() equals to the number of requested items (indices to create/lookup/delete, records to insert/get/delete, etc.).

Definition at line 2504 of file req.c.

Here is the caller graph for this function:

◆ m0_dix_req_rc()

M0_INTERNAL int m0_dix_req_rc ( const struct m0_dix_req req)

Returns the return value of results.

Definition at line 2489 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_unlock()

M0_INTERNAL void m0_dix_req_unlock ( struct m0_dix_req req)

Unlocks state machine group that is used by DIX request.

Definition at line 190 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_req_wait()

M0_INTERNAL int m0_dix_req_wait ( struct m0_dix_req req,
uint64_t  states,
m0_time_t  to 
)

Blocks until DIX request reaches one of specified states or specified timeout is elapsed.

'states' is a bit-mask of m0_dix_req_state values built with M0_BITS() macro.

Definition at line 201 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_root_read()

M0_INTERNAL int m0_dix_root_read ( struct m0_dix_meta_req req)

Reads 'layout' and 'layout-descr' layouts from root index.

After meta request is finished the layouts are accessible through m0_dix_root_read_rep().

Definition at line 379 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_root_read_rep()

M0_INTERNAL int m0_dix_root_read_rep ( struct m0_dix_meta_req req,
struct m0_dix_ldesc layout,
struct m0_dix_ldesc ldescr 
)

Returns result of m0_dix_root_read() request.

Definition at line 443 of file meta.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_rs_fini()

M0_INTERNAL void m0_dix_rs_fini ( struct m0_dix_next_resultset rs)

Finalises result set for NEXT operation.

Definition at line 356 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_rs_init()

M0_INTERNAL int m0_dix_rs_init ( struct m0_dix_next_resultset rs,
uint32_t  start_keys_nr,
uint32_t  sctx_nr 
)

Initialise result set for NEXT operation.

Result set is a context for merge-sorting records retrieved from all component catalogues.

This function is actually internal and exported only for UT purposes. Normally it is called inside m0_dix_next_result_prepare().

Definition at line 342 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_sm_conf_fini()

M0_INTERNAL void m0_dix_sm_conf_fini ( void  )

Definition at line 2617 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_sm_conf_init()

M0_INTERNAL int m0_dix_sm_conf_init ( void  )

Definition at line 2609 of file req.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_target()

M0_INTERNAL void m0_dix_target ( struct m0_dix_linst inst,
uint64_t  unit,
struct m0_buf key,
uint64_t *  out_id 
)

Calculates target for specified 'unit' in parity group of the record with specified 'key'. Calculated target is stored in 'out_id'.

Definition at line 144 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_dix_tgt2sdev()

M0_INTERNAL struct m0_pooldev * m0_dix_tgt2sdev ( struct m0_dix_linst linst,
uint64_t  tgt 
)

Returns pool device structure by target (e.g. calculated by m0_dix_target()).

Definition at line 76 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ M0_TL_DECLARE()

M0_TL_DECLARE ( cas_rop  ,
M0_INTERNAL  ,
struct m0_dix_cas_rop   
)

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( cas_rop  ,
M0_INTERNAL  ,
struct m0_dix_cas_rop   
)

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( cas_rop  ,
M0_EXTERN   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( cas_rop  ,
"cas record operations"  ,
M0_INTERNAL  ,
struct m0_dix_cas_rop  ,
crp_linkage  ,
crp_magix  ,
M0_DIX_ROP_MAGIC  ,
M0_DIX_ROP_HEAD_MAGIC   
)

◆ M0_XCA_DOMAIN()

struct m0_dix_imask M0_XCA_DOMAIN ( rpc  )

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 404 of file m0dixinit.c.

Here is the call graph for this function:

◆ mask_bit_copy()

static void mask_bit_copy ( void *  buffer,
m0_bcount_t  pos,
void *  res,
m0_bcount_t  respos 
)
static

Definition at line 124 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ meta_req_cli()

static struct m0_dix_cli* meta_req_cli ( const struct m0_dix_meta_req req)
static

Definition at line 55 of file meta.c.

Here is the caller graph for this function:

◆ range_actual_size()

static m0_bcount_t range_actual_size ( const struct m0_ext range,
uint64_t  bs_len 
)
static

Definition at line 48 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ range_size()

static m0_bcount_t range_size ( const struct m0_ext range)
static

Definition at line 41 of file imask.c.

Here is the caller graph for this function:

◆ ranges_size()

static uint64_t ranges_size ( struct m0_ext range,
uint64_t  nr,
uint64_t  bs_len 
)
static

Definition at line 76 of file imask.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_fini()

static void sc_fini ( struct m0_dix_next_sort_ctx_arr ctx_arr)
static

Definition at line 333 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_init()

static int sc_init ( struct m0_dix_next_sort_ctx_arr ctx_arr,
uint32_t  nr 
)
static

Definition at line 324 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_key_pos_set()

static int sc_key_pos_set ( struct m0_dix_next_sort_ctx ctx,
uint32_t  key_idx,
const uint32_t *  recs_nr 
)
static

Sets sorting context current position to the first record retrieved for 'key_idx' starting key.

Todo:
: Why it is so?

Definition at line 104 of file next_merge.c.

Here is the caller graph for this function:

◆ sc_min_val_get()

static bool sc_min_val_get ( struct m0_dix_next_sort_ctx_arr ctxarr,
struct m0_cas_next_reply **  rep,
struct m0_dix_next_sort_ctx **  ret_ctx,
uint32_t *  ret_idx 
)
static

Searches for the minimal value in all sort contexts.

After minimal value is found, all sort contexts current positions are moved to the first value that is bigger than found minimal value.

Function out values: m0_cas_next_reply *rep - minimal value for all sort contexts m0_dix_next_sort_ctx *ret_ctx - sort context which contains "rep" ret_idx - number of rep in cas_next_rep array

Returns true if for current starting key there are no more records in all sorting contexts.

Definition at line 147 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_next()

static void sc_next ( struct m0_dix_next_sort_ctx ctx)
static

Definition at line 76 of file next_merge.c.

Here is the caller graph for this function:

◆ sc_rep_cmp()

static int sc_rep_cmp ( const struct m0_cas_next_reply a,
const struct m0_cas_next_reply b 
)
static

Definition at line 50 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_rep_eq()

static bool sc_rep_eq ( const struct m0_cas_next_reply a,
const struct m0_cas_next_reply b 
)
static

Definition at line 70 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_rep_get()

static int sc_rep_get ( struct m0_dix_next_sort_ctx ctx,
struct m0_cas_next_reply **  rep 
)
static

Definition at line 83 of file next_merge.c.

Here is the caller graph for this function:

◆ sc_rep_le()

static bool sc_rep_le ( const struct m0_cas_next_reply a,
const struct m0_cas_next_reply b 
)
static

Definition at line 64 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sc_result_add()

static void sc_result_add ( struct m0_dix_next_sort_ctx key_ctx,
uint32_t  cidx,
struct m0_dix_next_resultset rs,
uint32_t  key_id,
struct m0_cas_next_reply rep 
)
static

Definition at line 388 of file next_merge.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_is_valid()

static bool unit_is_valid ( struct m0_pdclust_attr attr,
uint64_t  unit 
)
static

Definition at line 139 of file layout.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ dix_cli_sm_conf

const struct m0_sm_conf dix_cli_sm_conf
static
Initial value:
= {
.scf_name = "dix_client",
.scf_nr_states = ARRAY_SIZE(dix_cli_states),
.scf_state = dix_cli_states,
.scf_trans_nr = ARRAY_SIZE(dix_cli_trans),
.scf_trans = dix_cli_trans
}
static struct m0_sm_state_descr dix_cli_states[]
Definition: client.c:41
static struct m0_sm_trans_descr dix_cli_trans[]
Definition: client.c:70
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 80 of file client.c.

◆ dix_cli_states

struct m0_sm_state_descr dix_cli_states[]
static
Initial value:
= {
.sd_name = "init",
.sd_allowed = M0_BITS(DIXCLI_STARTING,
},
.sd_name = "bootstrap_mode",
},
.sd_name = "starting",
},
.sd_name = "ready",
.sd_allowed = M0_BITS(DIXCLI_FINAL)
},
.sd_name = "final",
.sd_flags = M0_SDF_TERMINAL,
},
.sd_name = "failure",
}
}
#define M0_BITS(...)
Definition: misc.h:236

Definition at line 41 of file client.c.

◆ dix_cli_trans

struct m0_sm_trans_descr dix_cli_trans[]
static
Initial value:

Definition at line 70 of file client.c.

◆ dix_rebalance_cmt

struct m0_cm_type dix_rebalance_cmt

Definition at line 174 of file cm.h.

◆ dix_rebalance_sw_fom_type_ops

const struct m0_fom_type_ops dix_rebalance_sw_fom_type_ops
Initial value:
= {
}
static int dix_rebalance_sw_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: sw_fop.c:46

Definition at line 60 of file sw_fop.c.

◆ dix_rebalance_sw_onwire_fopt

struct m0_fop_type dix_rebalance_sw_onwire_fopt

Definition at line 42 of file sw_fop.c.

◆ dix_rebalance_sw_onwire_rep_fopt

struct m0_fop_type dix_rebalance_sw_onwire_rep_fopt

Definition at line 43 of file sw_fop.c.

◆ dix_repair_cmt

struct m0_cm_type dix_repair_cmt

Definition at line 173 of file cm.h.

◆ dix_repair_sw_fom_type_ops

const struct m0_fom_type_ops dix_repair_sw_fom_type_ops
Initial value:
= {
}
static int dix_repair_sw_fom_create(struct m0_fop *fop, struct m0_fom **m, struct m0_reqh *reqh)
Definition: sw_fop.c:46

Definition at line 60 of file sw_fop.c.

◆ dix_repair_sw_onwire_fopt

struct m0_fop_type dix_repair_sw_onwire_fopt

Definition at line 42 of file sw_fop.c.

◆ dix_repair_sw_onwire_rep_fopt

struct m0_fop_type dix_repair_sw_onwire_rep_fopt

Definition at line 43 of file sw_fop.c.

◆ dix_req_sm_conf

struct m0_sm_conf dix_req_sm_conf
Initial value:
= {
.scf_name = "dix_req",
.scf_nr_states = ARRAY_SIZE(dix_req_states),
.scf_state = dix_req_states,
.scf_trans_nr = ARRAY_SIZE(dix_req_trans),
.scf_trans = dix_req_trans
}
static struct m0_sm_trans_descr dix_req_trans[]
Definition: req.c:107
static struct m0_sm_state_descr dix_req_states[]
Definition: req.c:50
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 135 of file req.c.

◆ dix_req_states

struct m0_sm_state_descr dix_req_states[]
static

Definition at line 50 of file req.c.

◆ dix_req_trans

struct m0_sm_trans_descr dix_req_trans[]
static
Initial value:
= {
{ "layouts-known", DIXREQ_INIT, DIXREQ_DISCOVERY_DONE },
{ "find-layouts", DIXREQ_INIT, DIXREQ_LAYOUT_DISCOVERY },
{ "resolve-lids", DIXREQ_INIT, DIXREQ_LID_DISCOVERY },
{ "copy-fail", DIXREQ_INIT, DIXREQ_FAILURE },
{ "not-resolved", DIXREQ_LID_DISCOVERY, DIXREQ_FAILURE },
{ "meta-updated", DIXREQ_META_UPDATE, DIXREQ_INPROGRESS },
{ "crow-or-fail", DIXREQ_META_UPDATE, DIXREQ_FINAL },
{ "update-fail", DIXREQ_META_UPDATE, DIXREQ_FAILURE },
{ "get-req-fail", DIXREQ_INPROGRESS, DIXREQ_GET_RESEND },
{ "rpc-failure", DIXREQ_INPROGRESS, DIXREQ_FAILURE },
{ "req-processed", DIXREQ_INPROGRESS, DIXREQ_FINAL },
{ "inp-del-ph2", DIXREQ_INPROGRESS, DIXREQ_DEL_PHASE2 },
{ "del-ph2-final", DIXREQ_DEL_PHASE2, DIXREQ_FINAL },
{ "del-ph2-fail", DIXREQ_DEL_PHASE2, DIXREQ_FAILURE },
{ "all-cctg-fail", DIXREQ_GET_RESEND, DIXREQ_FAILURE },
}
Todo:
Check it.

Definition at line 107 of file req.c.

◆ m0_dix_layout_fid [1/2]

M0_INTERNAL const struct m0_fid m0_dix_layout_fid = DFID(0,2)

Definition at line 45 of file meta.c.

◆ m0_dix_layout_fid [2/2]

M0_EXTERN const struct m0_fid m0_dix_layout_fid

Definition at line 90 of file meta.h.

◆ m0_dix_ldescr_fid [1/2]

M0_INTERNAL const struct m0_fid m0_dix_ldescr_fid = DFID(0,3)

Definition at line 46 of file meta.c.

◆ m0_dix_ldescr_fid [2/2]

M0_EXTERN const struct m0_fid m0_dix_ldescr_fid

Definition at line 91 of file meta.h.

◆ m0_dix_root_fid [1/2]

M0_INTERNAL const struct m0_fid m0_dix_root_fid = DFID(0,1)

Definition at line 44 of file meta.c.

◆ m0_dix_root_fid [2/2]

M0_EXTERN const struct m0_fid m0_dix_root_fid

Definition at line 89 of file meta.h.

◆ M0_XCA_DOMAIN

struct m0_dix_linst M0_XCA_DOMAIN

◆ M0_XCA_ENUM

enum dix_req_type M0_XCA_ENUM

◆ max_rpc_msg_size

uint32_t max_rpc_msg_size = M0_RPC_DEF_MAX_RPC_MSG_SIZE
static

Definition at line 72 of file m0dixinit.c.

◆ tm_recv_queue_min_len

uint32_t tm_recv_queue_min_len = 10
static

Definition at line 71 of file m0dixinit.c.