Motr  M0
SNS copy machine
Collaboration diagram for SNS copy machine:

Modules

 SNS copy machine Copy packet
 
 SNS copy machine aggregation group
 
 SNS copy machine file context
 
 SNS copy machine service
 

Data Structures

struct  m0_sns_cm_buf_pool
 
struct  m0_sns_cm_helpers
 
struct  m0_sns_cm_rm_ctx
 
struct  m0_sns_cm
 
struct  m0_sns_cm_iter_file_ctx
 
struct  m0_sns_cm_iter
 

Enumerations

enum  { SNS_SEG_NR = 10, SNS_SEG_SIZE = 4096, SNS_COB_FID_START = 4 }
 
enum  m0_sns_cm_op {
  SNS_INVALID = 0, SNS_REPAIR = 1 << 1, SNS_REBALANCE = 1 << 2, SNS_REPAIR_QUIESCE = 1 << 3,
  SNS_REBALANCE_QUIESCE = 1 << 4, SNS_REPAIR_STATUS = 1 << 5, SNS_REBALANCE_STATUS = 1 << 6, SNS_REPAIR_ABORT = 1 << 7,
  SNS_REBALANCE_ABORT = 1 << 8
}
 
enum  m0_sns_cm_status {
  SNS_CM_STATUS_INVALID = 0, SNS_CM_STATUS_IDLE = 1, SNS_CM_STATUS_STARTED = 2, SNS_CM_STATUS_FAILED = 3,
  SNS_CM_STATUS_PAUSED = 4, SNS_CM_STATUS_NR
}
 
enum  m0_sns_cm_local_unit_type { M0_SNS_CM_UNIT_LOCAL, M0_SNS_CM_UNIT_HOLE_EOF, M0_SNS_CM_UNIT_INVALID }
 
enum  {
  SNS_DEFAULT_FILE_SIZE = 1 << 17, SNS_DEFAULT_N = 3, SNS_DEFAULT_K = 1, SNS_DEFAULT_S = 1,
  SNS_DEFAULT_P = 5, SNS_DEFAULT_UNIT_SIZE = 1 << (11 + SNS_DEFAULT_LAYOUT_ID)
}
 
enum  { SNS_REPAIR_ITER_MAGIX = 0x33BAADF00DCAFE77 }
 
enum  cm_data_iter_phase {
  ITPH_INIT, ITPH_IDLE, ITPH_COB_NEXT, ITPH_GROUP_NEXT,
  ITPH_FID_NEXT, ITPH_FID_LOCK, ITPH_FID_LOCK_WAIT, ITPH_FID_ATTR_LAYOUT,
  ITPH_CP_SETUP, ITPH_AG_SETUP, ITPH_FINI, ITPH_NR
}
 

Functions

M0_INTERNAL struct m0_sns_cmcm2sns (struct m0_cm *cm)
 
M0_INTERNAL int m0_sns_cm_type_register (void)
 
M0_INTERNAL void m0_sns_cm_type_deregister (void)
 
M0_INTERNAL struct m0_cm_cpm0_sns_cm_cp_alloc (struct m0_cm *cm)
 
static void bp_below_threshold (struct m0_net_buffer_pool *bp)
 
static void buf_available (struct m0_net_buffer_pool *pool)
 
static void sns_cm_bp_init (struct m0_sns_cm_buf_pool *sbp)
 
static void sns_cm_bp_fini (struct m0_sns_cm_buf_pool *sbp)
 
 M0_TL_DESCR_DECLARE (cs_eps, extern)
 
 M0_TL_DECLARE (cs_eps, M0_INTERNAL, struct cs_endpoint_and_xprt)
 
M0_INTERNAL int m0_sns_cm_rm_init (struct m0_sns_cm *scm)
 
M0_INTERNAL int m0_sns_cm_setup (struct m0_cm *cm)
 
M0_INTERNAL bool m0_sns_is_peer (struct m0_cm *cm, struct m0_reqh_service_ctx *ctx)
 
M0_INTERNAL size_t m0_sns_cm_buffer_pool_provision (struct m0_net_buffer_pool *bp, size_t bufs_nr)
 
M0_INTERNAL int m0_sns_cm_prepare (struct m0_cm *cm)
 
M0_INTERNAL int m0_sns_cm_fail_dev_log (struct m0_cm *cm, enum m0_pool_nd_state state)
 
M0_INTERNAL int m0_sns_cm_start (struct m0_cm *cm)
 
M0_INTERNAL void m0_sns_cm_rm_fini (struct m0_sns_cm *scm)
 
static void buffer_pool_prune (struct m0_net_buffer_pool *bp)
 
static void sns_cm_buffer_pools_prune (struct m0_sns_cm *scm)
 
static bool sns_cm_status_get (struct m0_sns_cm *scm, size_t *tread, size_t *twrite)
 
M0_INTERNAL void m0_sns_cm_stop (struct m0_cm *cm)
 
M0_INTERNAL void m0_sns_cm_print_status (struct m0_sns_cm *scm)
 
M0_INTERNAL void m0_sns_cm_ha_msg (struct m0_cm *cm, struct m0_ha_msg *msg, int rc)
 
M0_INTERNAL void m0_sns_cm_fini (struct m0_cm *cm)
 
M0_INTERNAL uint64_t m0_sns_cm_cp_buf_nr (struct m0_net_buffer_pool *bp, uint64_t data_seg_nr)
 
M0_INTERNAL void m0_sns_cm_buf_wait (struct m0_sns_cm_buf_pool *sbp, struct m0_fom *fom)
 
M0_INTERNAL int m0_sns_cm_buf_attach (struct m0_net_buffer_pool *bp, struct m0_cm_cp *cp)
 
M0_INTERNAL uint64_t m0_sns_cm_data_seg_nr (struct m0_sns_cm *scm, struct m0_pdclust_layout *pl)
 
M0_INTERNAL int64_t m0_sns_cm_incoming_reserve_bufs (struct m0_sns_cm *scm, const struct m0_cm_ag_id *id)
 
M0_INTERNAL int m0_sns_cm_has_space_for (struct m0_sns_cm *scm, struct m0_pdclust_layout *pl, uint64_t nr_bufs)
 
M0_INTERNAL void m0_sns_cm_reserve_space (struct m0_sns_cm *scm, size_t nr_bufs)
 
M0_INTERNAL void m0_sns_cm_cancel_reservation (struct m0_sns_cm *scm, size_t nr_bufs)
 
M0_INTERNAL int m0_sns_cm_ag_next (struct m0_cm *cm, const struct m0_cm_ag_id *id_curr, struct m0_cm_ag_id *id_next)
 
M0_INTERNAL void m0_sns_cm_buffer_pools_prune (struct m0_cm *cm)
 
M0_INTERNAL struct m0_net_bufferm0_sns_cm_buffer_get (struct m0_net_buffer_pool *bp, size_t colour)
 
M0_INTERNAL void m0_sns_cm_buffer_put (struct m0_net_buffer_pool *bp, struct m0_net_buffer *buf, uint64_t colour)
 
M0_INTERNAL void m0_sns_cm_complete (struct m0_cm *cm)
 
M0_INTERNAL enum sns_repair_state m0_sns_cm_fid_repair_done (struct m0_fid *gfid, struct m0_reqh *reqh, enum m0_pool_nd_state device_state)
 
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_init (void)
 
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_fini (void)
 
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_init (void)
 
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_fini (void)
 
M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_init (void)
 
M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_fini (void)
 
M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_init (void)
 
M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_fini (void)
 
M0_INTERNAL int m0_sns_cm_ut_file_size_layout (struct m0_sns_cm_file_ctx *fctx)
 
M0_INTERNAL void m0_sns_cm_unit2cobfid (struct m0_sns_cm_file_ctx *fctx, const struct m0_pdclust_src_addr *sa, struct m0_pdclust_tgt_addr *ta, struct m0_fid *cfid_out)
 
M0_INTERNAL uint32_t m0_sns_cm_device_index_get (uint64_t group, uint64_t unit_number, struct m0_sns_cm_file_ctx *fctx)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_unit2cobindex (struct m0_sns_cm_ag *sag, uint64_t unit)
 
M0_INTERNAL int m0_sns_cm_cob_locate (struct m0_cob_domain *cdom, const struct m0_fid *cob_fid)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_local_units (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_global_units (const struct m0_sns_cm_ag *sag, struct m0_pdclust_layout *pl)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_data_units (const struct m0_pdclust_layout *pl)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_parity_units (const struct m0_pdclust_layout *pl)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_nr_spare_units (const struct m0_pdclust_layout *pl)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_size (const struct m0_pdclust_layout *pl)
 
M0_INTERNAL bool m0_sns_cm_is_cob_repaired (struct m0_poolmach *pm, uint32_t cob_index)
 
M0_INTERNAL bool m0_sns_cm_is_cob_repairing (struct m0_poolmach *pm, uint32_t cob_index)
 
M0_INTERNAL bool m0_sns_cm_is_cob_rebalancing (struct m0_poolmach *pm, uint32_t cob_index)
 
M0_INTERNAL bool m0_sns_cm_unit_is_spare (struct m0_sns_cm_file_ctx *fctx, uint64_t group_nr, uint64_t spare_nr)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_spare_unit_nr (const struct m0_pdclust_layout *pl, uint64_t fidx)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_unit_start (const struct m0_sns_cm *scm, const struct m0_pdclust_layout *pl)
 
M0_INTERNAL uint64_t m0_sns_cm_ag_unit_end (const struct m0_sns_cm *scm, const struct m0_pdclust_layout *pl)
 
M0_INTERNAL int m0_sns_cm_ag_tgt_unit2cob (struct m0_sns_cm_ag *sag, uint64_t tgt_unit, struct m0_fid *cobfid)
 
static const char * local_ep (const struct m0_cm *cm)
 
static struct m0_conf_servicecm_conf_service_get (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid)
 
M0_INTERNAL const char * m0_sns_cm_tgt_ep (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid, struct m0_conf_obj **hostage)
 
M0_INTERNAL bool m0_sns_cm_is_local_cob (const struct m0_cm *cm, const struct m0_pool_version *pv, const struct m0_fid *cob_fid)
 
M0_INTERNAL size_t m0_sns_cm_ag_unrepaired_units (const struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group, struct m0_bitmap *fmap_out)
 
M0_INTERNAL bool m0_sns_cm_ag_is_relevant (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, const struct m0_cm_ag_id *id)
 
M0_INTERNAL int m0_sns_cm_ag_in_cp_units (const struct m0_sns_cm *scm, const struct m0_cm_ag_id *id, struct m0_sns_cm_file_ctx *fctx, uint32_t *in_cp_nr, uint32_t *in_units_nr, struct m0_cm_proxy_in_count *pcount)
 
M0_INTERNAL bool m0_sns_cm_fid_is_valid (const struct m0_sns_cm *snscm, const struct m0_fid *fid)
 
M0_INTERNAL struct m0_reqhm0_sns_cm2reqh (const struct m0_sns_cm *snscm)
 
M0_INTERNAL bool m0_sns_cm_disk_has_dirty_pver (struct m0_cm *cm, struct m0_conf_drive *disk, bool clear)
 
M0_INTERNAL bool m0_sns_cm_pver_is_dirty (struct m0_pool_version *pver)
 
M0_INTERNAL void m0_sns_cm_pver_dirty_set (struct m0_pool_version *pver)
 
M0_INTERNAL int m0_sns_cm_pool_ha_nvec_alloc (struct m0_pool *pool, enum m0_pool_nd_state state, struct m0_ha_nvec *nvec)
 
M0_INTERNAL bool m0_sns_cm_group_has_local_presence (struct m0_sns_cm_file_ctx *fctx, uint32_t units_per_group, uint64_t group)
 
M0_INTERNAL enum m0_sns_cm_local_unit_type m0_sns_cm_local_unit_type_get (struct m0_sns_cm_file_ctx *fctx, uint64_t group, uint64_t unit)
 
M0_INTERNAL bool m0_sns_cm_ag_relevant_is_done (const struct m0_cm_aggr_group *ag, uint64_t nr_cps_fini)
 
 M0_BOB_DEFINE (static, &iter_bob, m0_sns_cm_iter)
 
M0_INTERNAL struct m0_sns_cmit2sns (struct m0_sns_cm_iter *it)
 
static enum cm_data_iter_phase iter_phase (const struct m0_sns_cm_iter *it)
 
static void iter_phase_set (struct m0_sns_cm_iter *it, int phase)
 
static bool iter_layout_invariant (enum cm_data_iter_phase phase, const struct m0_sns_cm_iter_file_ctx *ifc)
 
static bool iter_invariant (const struct m0_sns_cm_iter *it)
 
static void unit_to_cobfid (struct m0_sns_cm_iter_file_ctx *ifc, struct m0_fid *cob_fid_out)
 
M0_INTERNAL int __fid_next (struct m0_sns_cm_iter *it, struct m0_fid *fid_next)
 
static int __file_context_init (struct m0_sns_cm_iter *it)
 
static int group__next (struct m0_sns_cm_iter *it)
 
static int iter_fid_attr_layout (struct m0_sns_cm_iter *it)
 
static int iter_fid_lock (struct m0_sns_cm_iter *it)
 
static int iter_fid_lock_wait (struct m0_sns_cm_iter *it)
 
static int iter_fid_next (struct m0_sns_cm_iter *it)
 
static bool __has_incoming (struct m0_sns_cm *scm, struct m0_sns_cm_file_ctx *fctx, uint64_t group)
 
static bool __group_skip (struct m0_sns_cm_iter *it, uint64_t group)
 
static int __group_alloc (struct m0_sns_cm *scm, struct m0_fid *gfid, uint64_t group, struct m0_pdclust_layout *pl, bool has_incoming, struct m0_cm_aggr_group **ag)
 
static int __group_next (struct m0_sns_cm_iter *it)
 
static int iter_group_next (struct m0_sns_cm_iter *it)
 
static int iter_ag_setup (struct m0_sns_cm_iter *it)
 
static bool unit_has_data (struct m0_sns_cm *scm, uint32_t unit)
 
static int iter_cp_setup (struct m0_sns_cm_iter *it)
 
static int iter_cob_next (struct m0_sns_cm_iter *it)
 
M0_INTERNAL int iter_idle (struct m0_sns_cm_iter *it)
 
M0_INTERNAL int m0_sns_cm_iter_next (struct m0_cm *cm, struct m0_cm_cp *cp)
 
M0_INTERNAL int m0_sns_cm_iter_init (struct m0_sns_cm_iter *it)
 
M0_INTERNAL int m0_sns_cm_iter_start (struct m0_sns_cm_iter *it)
 
M0_INTERNAL void m0_sns_cm_iter_stop (struct m0_sns_cm_iter *it)
 
M0_INTERNAL void m0_sns_cm_iter_fini (struct m0_sns_cm_iter *it)
 
M0_INTERNAL void m0_sns_cm_iter_tgt_unit_to_cob (struct m0_sns_cm_ag *rag)
 
M0_INTERNAL uint64_t m0_sns_cm_iter_failures_nr (const struct m0_sns_cm_iter *it)
 
M0_INTERNAL ssize_t m0_sns_cm_iter_file_size (struct m0_fid *gfid)
 
M0_INTERNAL int m0_sns_cm_fctx_pm (struct m0_sns_cm_file_ctx *fctx, struct m0_fid *gfid, struct m0_poolmach **mach)
 

Variables

M0_EXTERN struct m0_cm_type sns_repair_cmt
 
M0_EXTERN struct m0_cm_type sns_rebalance_cmt
 
const struct m0_sns_cm_helpers repair_helpers
 
const struct m0_sns_cm_helpers rebalance_helpers
 
const struct m0_net_buffer_pool_ops bp_ops
 
enum { ... }  M0_XCA_DOMAIN
 
static const struct m0_bob_type iter_bob
 
static int(* iter_action [])(struct m0_sns_cm_iter *it)
 
static struct m0_sm_state_descr cm_iter_sd [ITPH_NR]
 
static const struct m0_sm_conf cm_iter_sm_conf
 

Detailed Description

SNS copy machine is a replicated state machine, which performs data restructuring and handles device, container, node, &c failures.

See also
The SNS copy machine DLD

SNS copy machine implements a copy machine in-order to re-structure data efficiently in an event of a failure. It uses GOB (global file object) and COB (component object) infrastructure with parity de-clustering layout.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SNS_SEG_NR 
SNS_SEG_SIZE 
SNS_COB_FID_START 

Currently m0t1fs uses default fid_start = 4, where 0 - 3 are reserved for special purpose fids.

See also
fid_start part in overview section for details.

Definition at line 371 of file cm.c.

◆ anonymous enum

anonymous enum
Enumerator
SNS_DEFAULT_FILE_SIZE 
SNS_DEFAULT_N 
SNS_DEFAULT_K 
SNS_DEFAULT_S 
SNS_DEFAULT_P 
SNS_DEFAULT_UNIT_SIZE 

Definition at line 51 of file cm_utils.c.

◆ anonymous enum

anonymous enum
Enumerator
SNS_REPAIR_ITER_MAGIX 

Definition at line 52 of file iter.c.

◆ cm_data_iter_phase

Enumerator
ITPH_INIT 
ITPH_IDLE 

Iterator is in this phase when m0_cm:cm_ops::cmo_data_next() is first invoked as part of m0_cm_start() and m0_cm_cp_pump_start(), from m0_cm_data_next(). This starts the sns repair data iterator and sets the iterator to first local data unit of a parity group from a GOB (file) that needs repair.

ITPH_COB_NEXT 

Iterator is in this phase until all the local data units of a parity group are serviced (i.e. copy packets are created).

ITPH_GROUP_NEXT 

Iterator transitions to this phase to select next parity group that needs to be repaired, and has local data units.

ITPH_FID_NEXT 

Iterator transitions to this phase in-order to select next GOB that needs repair.

ITPH_FID_LOCK 

Iterator tries to acquire the async rm file lock in this phase.

ITPH_FID_LOCK_WAIT 

Iterator waits for the rm file lock to be acquired in this phase.

ITPH_FID_ATTR_LAYOUT 

Fetch file attributes and layout.

ITPH_CP_SETUP 

Once next local data unit of parity group needing repair is calculated along with its corresponding COB fid, the pre allocated copy packet by the copy machine pump FOM is populated with required details.

See also
struct m0_sns_cm_cp
ITPH_AG_SETUP 

Once the aggregation group is created and initialised, we need to acquire buffers for accumulator copy packet in the aggregation group falure contexts. This operation may block.

See also
m0_sns_cm_ag::sag_fc
struct m0_sns_cm_ag_failure_ctx
ITPH_FINI 

Iterator is finalised after the sns repair operation is complete. This is done as part of m0_cm_stop().

ITPH_NR 

Definition at line 65 of file iter.c.

◆ m0_sns_cm_local_unit_type

Enumerator
M0_SNS_CM_UNIT_LOCAL 
M0_SNS_CM_UNIT_HOLE_EOF 
M0_SNS_CM_UNIT_INVALID 

Definition at line 128 of file cm.h.

◆ m0_sns_cm_op

Operation that sns copy machine is carrying out.

Todo:
: Remove once Halon supports successor enum m0_cm_op.
Enumerator
SNS_INVALID 
SNS_REPAIR 
SNS_REBALANCE 
SNS_REPAIR_QUIESCE 
SNS_REBALANCE_QUIESCE 
SNS_REPAIR_STATUS 
SNS_REBALANCE_STATUS 
SNS_REPAIR_ABORT 
SNS_REBALANCE_ABORT 

Definition at line 103 of file cm.h.

◆ m0_sns_cm_status

sns copy machine status

Todo:
: Remove once Halon supports successor enum m0_cm_status.
Enumerator
SNS_CM_STATUS_INVALID 
SNS_CM_STATUS_IDLE 
SNS_CM_STATUS_STARTED 
SNS_CM_STATUS_FAILED 
SNS_CM_STATUS_PAUSED 
SNS_CM_STATUS_NR 

Definition at line 119 of file cm.h.

Function Documentation

◆ __fid_next()

M0_INTERNAL int __fid_next ( struct m0_sns_cm_iter it,
struct m0_fid fid_next 
)

Definition at line 188 of file iter.c.

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

◆ __file_context_init()

static int __file_context_init ( struct m0_sns_cm_iter it)
static

Definition at line 208 of file iter.c.

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

◆ __group_alloc()

static int __group_alloc ( struct m0_sns_cm scm,
struct m0_fid gfid,
uint64_t  group,
struct m0_pdclust_layout pl,
bool  has_incoming,
struct m0_cm_aggr_group **  ag 
)
static

Definition at line 405 of file iter.c.

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

◆ __group_next()

static int __group_next ( struct m0_sns_cm_iter it)
static

Finds parity group having units belonging to the failed container. This iterates through each parity group of the file, and its units. A COB id is calculated for each unit and checked if ti belongs to the failed container, if yes then the group is selected for processing. This is invoked from ITPH_GROUP_NEXT phase.

Definition at line 474 of file iter.c.

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

◆ __group_skip()

static bool __group_skip ( struct m0_sns_cm_iter it,
uint64_t  group 
)
static

Definition at line 378 of file iter.c.

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

◆ __has_incoming()

static bool __has_incoming ( struct m0_sns_cm scm,
struct m0_sns_cm_file_ctx fctx,
uint64_t  group 
)
static

Definition at line 363 of file iter.c.

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

◆ bp_below_threshold()

static void bp_below_threshold ( struct m0_net_buffer_pool bp)
static

Definition at line 421 of file cm.c.

◆ buf_available()

static void buf_available ( struct m0_net_buffer_pool pool)
static

Definition at line 426 of file cm.c.

Here is the call graph for this function:

◆ buffer_pool_prune()

static void buffer_pool_prune ( struct m0_net_buffer_pool bp)
static

Definition at line 681 of file cm.c.

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

◆ cm2sns()

M0_INTERNAL struct m0_sns_cm * cm2sns ( struct m0_cm cm)

Definition at line 389 of file cm.c.

Here is the caller graph for this function:

◆ cm_conf_service_get()

static struct m0_conf_service* cm_conf_service_get ( const struct m0_cm cm,
const struct m0_pool_version pv,
const struct m0_fid cob_fid 
)
static

Gets IO service which given cob is associated with.

Note
The returned conf object has to be m0_confc_close()d eventually.
Postcondition
retval->cs_type == M0_CST_IOS
retval->cs_endpoints[0] != NULL

Definition at line 414 of file cm_utils.c.

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

◆ group__next()

static int group__next ( struct m0_sns_cm_iter it)
static

Definition at line 242 of file iter.c.

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

◆ it2sns()

M0_INTERNAL struct m0_sns_cm* it2sns ( struct m0_sns_cm_iter it)

Definition at line 119 of file iter.c.

Here is the caller graph for this function:

◆ iter_ag_setup()

static int iter_ag_setup ( struct m0_sns_cm_iter it)
static

Configures aggregation group, acquires buffers for accumulator copy packet in the aggregation group failure contexts.

See also
struct m0_sns_cm_ag::sag_fc
struct m0_sns_cm_ag_failure_ctx
m0_sns_cm_ag_setup()

Definition at line 567 of file iter.c.

Here is the call graph for this function:

◆ iter_cob_next()

static int iter_cob_next ( struct m0_sns_cm_iter it)
static

Finds next local COB corresponding to a unit in the parity group to perform read/write. For each unit in the given parity group, it calculates its corresponding COB fid, and checks if the COB is local. If no local COB is found for a given parity group after iterating through all its units, next parity group is calculated, else the pre-allocated copy packet is populated with required stob details details.

See also
iter_cp_setup()
Note
cob_next returns COB fid only for local data and parity units in a parity group.

Definition at line 690 of file iter.c.

Here is the call graph for this function:

◆ iter_cp_setup()

static int iter_cp_setup ( struct m0_sns_cm_iter it)
static

Configures the given copy packet with aggregation group and stob details.

Definition at line 612 of file iter.c.

Here is the call graph for this function:

◆ iter_fid_attr_layout()

static int iter_fid_attr_layout ( struct m0_sns_cm_iter it)
static

Fetches file attributes and layout for GOB.

Definition at line 253 of file iter.c.

Here is the call graph for this function:

◆ iter_fid_lock()

static int iter_fid_lock ( struct m0_sns_cm_iter it)
static

Definition at line 280 of file iter.c.

Here is the call graph for this function:

◆ iter_fid_lock_wait()

static int iter_fid_lock_wait ( struct m0_sns_cm_iter it)
static

Definition at line 303 of file iter.c.

Here is the call graph for this function:

◆ iter_fid_next()

static int iter_fid_next ( struct m0_sns_cm_iter it)
static

Fetches next GOB fid.

Definition at line 329 of file iter.c.

Here is the call graph for this function:

◆ iter_group_next()

static int iter_group_next ( struct m0_sns_cm_iter it)
static

Finds the next parity group to process.

Note
This operation may block while fetching the file size, as part of file attributes.

Definition at line 554 of file iter.c.

Here is the call graph for this function:

◆ iter_idle()

M0_INTERNAL int iter_idle ( struct m0_sns_cm_iter it)

Transitions the data iterator (m0_sns_cm::sc_it) to ITPH_FID_NEXT in-order to find the first GOB and parity group that needs repair.

Definition at line 739 of file iter.c.

Here is the call graph for this function:

◆ iter_invariant()

static bool iter_invariant ( const struct m0_sns_cm_iter it)
static

Definition at line 159 of file iter.c.

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

◆ iter_layout_invariant()

static bool iter_layout_invariant ( enum cm_data_iter_phase  phase,
const struct m0_sns_cm_iter_file_ctx ifc 
)
static

Definition at line 141 of file iter.c.

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

◆ iter_phase()

static enum cm_data_iter_phase iter_phase ( const struct m0_sns_cm_iter it)
static

Returns current iterator phase.

Definition at line 127 of file iter.c.

Here is the caller graph for this function:

◆ iter_phase_set()

static void iter_phase_set ( struct m0_sns_cm_iter it,
int  phase 
)
static

Sets iterator phase.

Definition at line 135 of file iter.c.

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

◆ local_ep()

static const char* local_ep ( const struct m0_cm cm)
static

Definition at line 397 of file cm_utils.c.

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

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( static  ,
iter_bob,
m0_sns_cm_iter   
)

◆ m0_sns_cm2reqh()

M0_INTERNAL struct m0_reqh * m0_sns_cm2reqh ( const struct m0_sns_cm snscm)

Definition at line 547 of file cm_utils.c.

Here is the caller graph for this function:

◆ m0_sns_cm_ag_in_cp_units()

M0_INTERNAL int m0_sns_cm_ag_in_cp_units ( const struct m0_sns_cm scm,
const struct m0_cm_ag_id id,
struct m0_sns_cm_file_ctx fctx,
uint32_t *  in_cp_nr,
uint32_t *  in_units_nr,
struct m0_cm_proxy_in_count pcount 
)

Definition at line 526 of file cm_utils.c.

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

◆ m0_sns_cm_ag_is_relevant()

M0_INTERNAL bool m0_sns_cm_ag_is_relevant ( struct m0_sns_cm scm,
struct m0_sns_cm_file_ctx fctx,
const struct m0_cm_ag_id id 
)

Returns true if the given aggregation group corresponding to the id is relevant. Thus if a node hosts the spare unit of the given aggregation group and which is not the failed unit of the group, the group is considered for the repair.

Definition at line 505 of file cm_utils.c.

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

◆ m0_sns_cm_ag_next()

M0_INTERNAL int m0_sns_cm_ag_next ( struct m0_cm cm,
const struct m0_cm_ag_id id_curr,
struct m0_cm_ag_id id_next 
)

Definition at line 938 of file cm.c.

Here is the call graph for this function:

◆ m0_sns_cm_ag_nr_data_units()

M0_INTERNAL uint64_t m0_sns_cm_ag_nr_data_units ( const struct m0_pdclust_layout pl)

Definition at line 222 of file cm_utils.c.

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

◆ m0_sns_cm_ag_nr_global_units()

M0_INTERNAL uint64_t m0_sns_cm_ag_nr_global_units ( const struct m0_sns_cm_ag sag,
struct m0_pdclust_layout pl 
)

Definition at line 215 of file cm_utils.c.

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

◆ m0_sns_cm_ag_nr_local_units()

M0_INTERNAL uint64_t m0_sns_cm_ag_nr_local_units ( struct m0_sns_cm scm,
struct m0_sns_cm_file_ctx fctx,
uint64_t  group 
)

Calculates number of local data units for a given parity group. This is invoked when new struct m0_sns_cm_ag instance is allocated, from m0_cm_aggr_group_alloc(). This is done in context of sns copy machine data iterator during the latter's ITPH_CP_SETUP phase. Thus we need not calculate the new GOB layout and corresponding pdclust instance, instead used the ones already calculated and save in the iterator, but we take GOB fid and group number as the parameters to this function in-order to perform sanity checks.

Definition at line 176 of file cm_utils.c.

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

◆ m0_sns_cm_ag_nr_parity_units()

M0_INTERNAL uint64_t m0_sns_cm_ag_nr_parity_units ( const struct m0_pdclust_layout pl)

Definition at line 228 of file cm_utils.c.

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

◆ m0_sns_cm_ag_nr_spare_units()

M0_INTERNAL uint64_t m0_sns_cm_ag_nr_spare_units ( const struct m0_pdclust_layout pl)

Definition at line 234 of file cm_utils.c.

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

◆ m0_sns_cm_ag_relevant_is_done()

M0_INTERNAL bool m0_sns_cm_ag_relevant_is_done ( const struct m0_cm_aggr_group ag,
uint64_t  nr_cps_fini 
)

◆ m0_sns_cm_ag_size()

M0_INTERNAL uint64_t m0_sns_cm_ag_size ( const struct m0_pdclust_layout pl)

Definition at line 239 of file cm_utils.c.

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

◆ m0_sns_cm_ag_spare_unit_nr()

M0_INTERNAL uint64_t m0_sns_cm_ag_spare_unit_nr ( const struct m0_pdclust_layout pl,
uint64_t  fidx 
)

Returns index of spare unit in the parity group, given the failure index in the group.

Definition at line 362 of file cm_utils.c.

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

◆ m0_sns_cm_ag_tgt_unit2cob()

M0_INTERNAL int m0_sns_cm_ag_tgt_unit2cob ( struct m0_sns_cm_ag sag,
uint64_t  tgt_unit,
struct m0_fid cobfid 
)

Calculates and returns the cobfid for the given group and the target unit of the file (represented by the gobfid).

Definition at line 381 of file cm_utils.c.

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

◆ m0_sns_cm_ag_unit2cobindex()

M0_INTERNAL uint64_t m0_sns_cm_ag_unit2cobindex ( struct m0_sns_cm_ag sag,
uint64_t  unit 
)

Definition at line 143 of file cm_utils.c.

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

◆ m0_sns_cm_ag_unit_end()

M0_INTERNAL uint64_t m0_sns_cm_ag_unit_end ( const struct m0_sns_cm scm,
const struct m0_pdclust_layout pl 
)

Returns end index of the unit in the aggregation group relevant to the sns copy machine operation.

See also
m0_sns_cm_op

Definition at line 375 of file cm_utils.c.

Here is the caller graph for this function:

◆ m0_sns_cm_ag_unit_start()

M0_INTERNAL uint64_t m0_sns_cm_ag_unit_start ( const struct m0_sns_cm scm,
const struct m0_pdclust_layout pl 
)

Returns starting index of the unit in the aggregation group relevant to the sns copy machine operation.

See also
m0_sns_cm_op

Definition at line 369 of file cm_utils.c.

Here is the caller graph for this function:

◆ m0_sns_cm_ag_unrepaired_units()

M0_INTERNAL size_t m0_sns_cm_ag_unrepaired_units ( const struct m0_sns_cm scm,
struct m0_sns_cm_file_ctx fctx,
uint64_t  group,
struct m0_bitmap fmap_out 
)

Definition at line 464 of file cm_utils.c.

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

◆ m0_sns_cm_buf_attach()

M0_INTERNAL int m0_sns_cm_buf_attach ( struct m0_net_buffer_pool bp,
struct m0_cm_cp cp 
)

Definition at line 810 of file cm.c.

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

◆ m0_sns_cm_buf_wait()

M0_INTERNAL void m0_sns_cm_buf_wait ( struct m0_sns_cm_buf_pool sbp,
struct m0_fom fom 
)

Definition at line 803 of file cm.c.

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

◆ m0_sns_cm_buffer_get()

M0_INTERNAL struct m0_net_buffer* m0_sns_cm_buffer_get ( struct m0_net_buffer_pool bp,
size_t  colour 
)

◆ m0_sns_cm_buffer_pool_provision()

M0_INTERNAL size_t m0_sns_cm_buffer_pool_provision ( struct m0_net_buffer_pool bp,
size_t  bufs_nr 
)

Definition at line 548 of file cm.c.

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

◆ m0_sns_cm_buffer_pools_prune()

M0_INTERNAL void m0_sns_cm_buffer_pools_prune ( struct m0_cm cm)

◆ m0_sns_cm_buffer_put()

M0_INTERNAL void m0_sns_cm_buffer_put ( struct m0_net_buffer_pool bp,
struct m0_net_buffer buf,
uint64_t  colour 
)

◆ m0_sns_cm_cancel_reservation()

M0_INTERNAL void m0_sns_cm_cancel_reservation ( struct m0_sns_cm scm,
size_t  nr_bufs 
)

Definition at line 926 of file cm.c.

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

◆ m0_sns_cm_cob_locate()

M0_INTERNAL int m0_sns_cm_cob_locate ( struct m0_cob_domain cdom,
const struct m0_fid cob_fid 
)

Searches for given cob_fid in the local cob domain.

Definition at line 157 of file cm_utils.c.

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

◆ m0_sns_cm_complete()

M0_INTERNAL void m0_sns_cm_complete ( struct m0_cm cm)

◆ m0_sns_cm_cp_alloc()

M0_INTERNAL struct m0_cm_cp * m0_sns_cm_cp_alloc ( struct m0_cm cm)

Definition at line 410 of file cm.c.

Here is the caller graph for this function:

◆ m0_sns_cm_cp_buf_nr()

M0_INTERNAL uint64_t m0_sns_cm_cp_buf_nr ( struct m0_net_buffer_pool bp,
uint64_t  data_seg_nr 
)

Definition at line 795 of file cm.c.

Here is the caller graph for this function:

◆ m0_sns_cm_data_seg_nr()

M0_INTERNAL uint64_t m0_sns_cm_data_seg_nr ( struct m0_sns_cm scm,
struct m0_pdclust_layout pl 
)

Definition at line 845 of file cm.c.

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

◆ m0_sns_cm_device_index_get()

M0_INTERNAL uint32_t m0_sns_cm_device_index_get ( uint64_t  group,
uint64_t  unit_number,
struct m0_sns_cm_file_ctx fctx 
)

Definition at line 126 of file cm_utils.c.

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

◆ m0_sns_cm_disk_has_dirty_pver()

M0_INTERNAL bool m0_sns_cm_disk_has_dirty_pver ( struct m0_cm cm,
struct m0_conf_drive disk,
bool  clear 
)

Definition at line 552 of file cm_utils.c.

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

◆ m0_sns_cm_fail_dev_log()

M0_INTERNAL int m0_sns_cm_fail_dev_log ( struct m0_cm cm,
enum m0_pool_nd_state  state 
)

Definition at line 605 of file cm.c.

Here is the caller graph for this function:

◆ m0_sns_cm_fctx_pm()

M0_INTERNAL int m0_sns_cm_fctx_pm ( struct m0_sns_cm_file_ctx fctx,
struct m0_fid gfid,
struct m0_poolmach **  mach 
)

Returns struct m0_poolmach for the given file identified by .

◆ m0_sns_cm_fid_is_valid()

M0_INTERNAL bool m0_sns_cm_fid_is_valid ( const struct m0_sns_cm snscm,
const struct m0_fid fid 
)

Definition at line 539 of file cm_utils.c.

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

◆ m0_sns_cm_fid_repair_done()

M0_INTERNAL enum sns_repair_state m0_sns_cm_fid_repair_done ( struct m0_fid gfid,
struct m0_reqh reqh,
enum m0_pool_nd_state  device_state 
)

Returns state of SNS repair process with respect to .

Parameters
gfidInput global fid for which SNS repair state has to be retrieved.
reqhParent request handler object.
Precondition
m0_fid_is_valid(gfid) && reqh != NULL. 1 if SNS repair has not started at all. 2 if SNS repair has started but not completed for . 3 if SNS repair has started and completed for .

Definition at line 187 of file cm.c.

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

◆ m0_sns_cm_fini()

M0_INTERNAL void m0_sns_cm_fini ( struct m0_cm cm)

Definition at line 773 of file cm.c.

Here is the call graph for this function:

◆ m0_sns_cm_group_has_local_presence()

M0_INTERNAL bool m0_sns_cm_group_has_local_presence ( struct m0_sns_cm_file_ctx fctx,
uint32_t  units_per_group,
uint64_t  group 
)

Definition at line 610 of file cm_utils.c.

Here is the call graph for this function:

◆ m0_sns_cm_ha_msg()

M0_INTERNAL void m0_sns_cm_ha_msg ( struct m0_cm cm,
struct m0_ha_msg msg,
int  rc 
)

Definition at line 756 of file cm.c.

Here is the call graph for this function:

◆ m0_sns_cm_has_space_for()

M0_INTERNAL int m0_sns_cm_has_space_for ( struct m0_sns_cm scm,
struct m0_pdclust_layout pl,
uint64_t  nr_bufs 
)

Returns true iff the copy machine has enough space to receive all the copy packets from the given relevant group "id". Reserves buffers from incoming buffer pool struct m0_sns_cm::sc_ibp corresponding to all the incoming copy packets. e.g. sns repair copy machine checks if the incoming buffer pool has enough free buffers to receive all the remote units corresponding to a parity group.

Definition at line 894 of file cm.c.

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

◆ m0_sns_cm_incoming_reserve_bufs()

M0_INTERNAL int64_t m0_sns_cm_incoming_reserve_bufs ( struct m0_sns_cm scm,
const struct m0_cm_ag_id id 
)

Definition at line 859 of file cm.c.

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

◆ m0_sns_cm_is_cob_rebalancing()

M0_INTERNAL bool m0_sns_cm_is_cob_rebalancing ( struct m0_poolmach pm,
uint32_t  cob_index 
)

Definition at line 266 of file cm_utils.c.

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

◆ m0_sns_cm_is_cob_repaired()

M0_INTERNAL bool m0_sns_cm_is_cob_repaired ( struct m0_poolmach pm,
uint32_t  cob_index 
)

Definition at line 246 of file cm_utils.c.

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

◆ m0_sns_cm_is_cob_repairing()

M0_INTERNAL bool m0_sns_cm_is_cob_repairing ( struct m0_poolmach pm,
uint32_t  cob_index 
)

Definition at line 256 of file cm_utils.c.

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

◆ m0_sns_cm_is_local_cob()

M0_INTERNAL bool m0_sns_cm_is_local_cob ( const struct m0_cm cm,
const struct m0_pool_version pv,
const struct m0_fid cob_fid 
)

Definition at line 449 of file cm_utils.c.

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

◆ m0_sns_cm_iter_failures_nr()

M0_INTERNAL uint64_t m0_sns_cm_iter_failures_nr ( const struct m0_sns_cm_iter it)

◆ m0_sns_cm_iter_file_size()

M0_INTERNAL ssize_t m0_sns_cm_iter_file_size ( struct m0_fid gfid)

◆ m0_sns_cm_iter_fini()

M0_INTERNAL void m0_sns_cm_iter_fini ( struct m0_sns_cm_iter it)

Definition at line 922 of file iter.c.

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

◆ m0_sns_cm_iter_init()

M0_INTERNAL int m0_sns_cm_iter_init ( struct m0_sns_cm_iter it)

Definition at line 871 of file iter.c.

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

◆ m0_sns_cm_iter_next()

M0_INTERNAL int m0_sns_cm_iter_next ( struct m0_cm cm,
struct m0_cm_cp cp 
)

Calculates next data object to be re-structured and accordingly populates the given copy packet.

Iterates over parity groups in global fid order, calculates next data or parity unit from the parity group to be read, calculates cob fid for the parity unit, creates and initialises new aggregation group corresponding to the parity group if required, and fills this information in the given copy packet. After initialising copy packet with the stob details, an empty buffer from the struct m0_sns_cm::rc_obp buffer pool is attached to the copy packet.

Definition at line 762 of file iter.c.

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

◆ m0_sns_cm_iter_start()

M0_INTERNAL int m0_sns_cm_iter_start ( struct m0_sns_cm_iter it)

Definition at line 888 of file iter.c.

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

◆ m0_sns_cm_iter_stop()

M0_INTERNAL void m0_sns_cm_iter_stop ( struct m0_sns_cm_iter it)

Definition at line 908 of file iter.c.

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

◆ m0_sns_cm_iter_tgt_unit_to_cob()

M0_INTERNAL void m0_sns_cm_iter_tgt_unit_to_cob ( struct m0_sns_cm_ag rag)

Calculates fid of the COB containing the spare unit, and its index into the COB for the given failure index in the aggregation group.

See also
m0_sns_cm_ag::sag_tgts
m0_sns_cm_ag_tgt_addr::tgt_cob_index
m0_sns_cm_ag_tgt_addr::tgt_cobfid

◆ m0_sns_cm_local_unit_type_get()

M0_INTERNAL enum m0_sns_cm_local_unit_type m0_sns_cm_local_unit_type_get ( struct m0_sns_cm_file_ctx fctx,
uint64_t  group,
uint64_t  unit 
)

Definition at line 634 of file cm_utils.c.

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

◆ m0_sns_cm_pool_ha_nvec_alloc()

M0_INTERNAL int m0_sns_cm_pool_ha_nvec_alloc ( struct m0_pool pool,
enum m0_pool_nd_state  state,
struct m0_ha_nvec nvec 
)

Definition at line 585 of file cm_utils.c.

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

◆ m0_sns_cm_prepare()

M0_INTERNAL int m0_sns_cm_prepare ( struct m0_cm cm)

Definition at line 561 of file cm.c.

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

◆ m0_sns_cm_print_status()

M0_INTERNAL void m0_sns_cm_print_status ( struct m0_sns_cm scm)

Definition at line 742 of file cm.c.

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

◆ m0_sns_cm_pver_dirty_set()

M0_INTERNAL void m0_sns_cm_pver_dirty_set ( struct m0_pool_version pver)

Definition at line 580 of file cm_utils.c.

Here is the caller graph for this function:

◆ m0_sns_cm_pver_is_dirty()

M0_INTERNAL bool m0_sns_cm_pver_is_dirty ( struct m0_pool_version pver)

Definition at line 575 of file cm_utils.c.

Here is the caller graph for this function:

◆ m0_sns_cm_rebalance_sw_onwire_fop_fini()

M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_fini ( void  )

Definition at line 81 of file sw_onwire_fop.c.

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

◆ m0_sns_cm_rebalance_sw_onwire_fop_init()

M0_INTERNAL void m0_sns_cm_rebalance_sw_onwire_fop_init ( void  )

Definition at line 63 of file sw_onwire_fop.c.

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

◆ m0_sns_cm_rebalance_trigger_fop_fini()

M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_fini ( void  )

Definition at line 42 of file trigger_fop.c.

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

◆ m0_sns_cm_rebalance_trigger_fop_init()

M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_init ( void  )

Definition at line 54 of file trigger_fop.c.

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

◆ m0_sns_cm_repair_sw_onwire_fop_fini()

M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_fini ( void  )

Definition at line 81 of file sw_onwire_fop.c.

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

◆ m0_sns_cm_repair_sw_onwire_fop_init()

M0_INTERNAL void m0_sns_cm_repair_sw_onwire_fop_init ( void  )

Definition at line 63 of file sw_onwire_fop.c.

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

◆ m0_sns_cm_repair_trigger_fop_fini()

M0_INTERNAL void m0_sns_cm_repair_trigger_fop_fini ( void  )

Definition at line 43 of file trigger_fop.c.

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

◆ m0_sns_cm_repair_trigger_fop_init()

M0_INTERNAL void m0_sns_cm_repair_trigger_fop_init ( void  )

Definition at line 55 of file trigger_fop.c.

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

◆ m0_sns_cm_reserve_space()

M0_INTERNAL void m0_sns_cm_reserve_space ( struct m0_sns_cm scm,
size_t  nr_bufs 
)

Definition at line 916 of file cm.c.

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

◆ m0_sns_cm_rm_fini()

M0_INTERNAL void m0_sns_cm_rm_fini ( struct m0_sns_cm scm)

Definition at line 670 of file cm.c.

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

◆ m0_sns_cm_rm_init()

M0_INTERNAL int m0_sns_cm_rm_init ( struct m0_sns_cm scm)

Definition at line 451 of file cm.c.

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

◆ m0_sns_cm_setup()

M0_INTERNAL int m0_sns_cm_setup ( struct m0_cm cm)

Definition at line 487 of file cm.c.

Here is the call graph for this function:

◆ m0_sns_cm_start()

M0_INTERNAL int m0_sns_cm_start ( struct m0_cm cm)

Definition at line 641 of file cm.c.

Here is the call graph for this function:

◆ m0_sns_cm_stop()

M0_INTERNAL void m0_sns_cm_stop ( struct m0_cm cm)

Definition at line 716 of file cm.c.

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

◆ m0_sns_cm_tgt_ep()

M0_INTERNAL const char * m0_sns_cm_tgt_ep ( const struct m0_cm cm,
const struct m0_pool_version pv,
const struct m0_fid gfid,
struct m0_conf_obj **  hostage 
)

Gets endpoint address of the IO service which given cob is associated with.

Note
m0_sns_cm_tgt_ep() pins a m0_conf_service object and returns its reference to caller via ‘hostage’ parameter. The user should m0_confc_close() this object after using the endpoint string.

Definition at line 434 of file cm_utils.c.

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

◆ m0_sns_cm_type_deregister()

M0_INTERNAL void m0_sns_cm_type_deregister ( void  )

Definition at line 404 of file cm.c.

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

◆ m0_sns_cm_type_register()

M0_INTERNAL int m0_sns_cm_type_register ( void  )

Definition at line 394 of file cm.c.

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

◆ m0_sns_cm_unit2cobfid()

M0_INTERNAL void m0_sns_cm_unit2cobfid ( struct m0_sns_cm_file_ctx fctx,
const struct m0_pdclust_src_addr sa,
struct m0_pdclust_tgt_addr ta,
struct m0_fid cfid_out 
)

Returns cob fid for the sa->sa_unit.

See also
m0_fd_fwd_map

Definition at line 117 of file cm_utils.c.

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

◆ m0_sns_cm_unit_is_spare()

M0_INTERNAL bool m0_sns_cm_unit_is_spare ( struct m0_sns_cm_file_ctx fctx,
uint64_t  group_nr,
uint64_t  spare_nr 
)

Definition at line 277 of file cm_utils.c.

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

◆ m0_sns_cm_ut_file_size_layout()

M0_INTERNAL int m0_sns_cm_ut_file_size_layout ( struct m0_sns_cm_file_ctx fctx)

Builds temporary layout and uses default file size for given gob_fid. Only for UT purposes.

Definition at line 68 of file cm_utils.c.

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

◆ m0_sns_is_peer()

M0_INTERNAL bool m0_sns_is_peer ( struct m0_cm cm,
struct m0_reqh_service_ctx ctx 
)

Definition at line 542 of file cm.c.

◆ M0_TL_DECLARE()

M0_TL_DECLARE ( cs_eps  ,
M0_INTERNAL  ,
struct cs_endpoint_and_xprt   
)

◆ M0_TL_DESCR_DECLARE()

M0_TL_DESCR_DECLARE ( cs_eps  ,
extern   
)

◆ sns_cm_bp_fini()

static void sns_cm_bp_fini ( struct m0_sns_cm_buf_pool sbp)
static

Definition at line 443 of file cm.c.

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

◆ sns_cm_bp_init()

static void sns_cm_bp_init ( struct m0_sns_cm_buf_pool sbp)
static

Definition at line 438 of file cm.c.

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

◆ sns_cm_buffer_pools_prune()

static void sns_cm_buffer_pools_prune ( struct m0_sns_cm scm)
static

Definition at line 689 of file cm.c.

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

◆ sns_cm_status_get()

static bool sns_cm_status_get ( struct m0_sns_cm scm,
size_t *  tread,
size_t *  twrite 
)
static

Definition at line 697 of file cm.c.

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

◆ unit_has_data()

static bool unit_has_data ( struct m0_sns_cm scm,
uint32_t  unit 
)
static

Definition at line 588 of file iter.c.

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

◆ unit_to_cobfid()

static void unit_to_cobfid ( struct m0_sns_cm_iter_file_ctx ifc,
struct m0_fid cob_fid_out 
)
static

Calculates COB fid for m0_sns_cm_iter_file_ctx::ifc_sa. Saves calculated struct m0_pdclust_tgt_addr in m0_sns_cm_iter_file_ctx::ifc_ta.

Definition at line 173 of file iter.c.

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

Variable Documentation

◆ bp_ops

const struct m0_net_buffer_pool_ops bp_ops
Initial value:
= {
.nbpo_not_empty = buf_available,
.nbpo_below_threshold = bp_below_threshold
}
static void buf_available(struct m0_net_buffer_pool *pool)
Definition: cm.c:426
static void bp_below_threshold(struct m0_net_buffer_pool *bp)
Definition: cm.c:421

Definition at line 433 of file cm.c.

◆ cm_iter_sd

struct m0_sm_state_descr cm_iter_sd[ITPH_NR]
static

Definition at line 805 of file iter.c.

◆ cm_iter_sm_conf

const struct m0_sm_conf cm_iter_sm_conf
static
Initial value:
= {
.scf_name = "sm: cm_iter_conf",
.scf_nr_states = ARRAY_SIZE(cm_iter_sd),
.scf_state = cm_iter_sd
}
static struct m0_sm_state_descr cm_iter_sd[ITPH_NR]
Definition: iter.c:805
#define ARRAY_SIZE(a)
Definition: misc.h:45

Definition at line 865 of file iter.c.

◆ iter_action

int(* iter_action[])(struct m0_sns_cm_iter *it)
static
Initial value:
= {
}
static int iter_ag_setup(struct m0_sns_cm_iter *it)
Definition: iter.c:567
static int iter_fid_attr_layout(struct m0_sns_cm_iter *it)
Definition: iter.c:253
M0_INTERNAL int iter_idle(struct m0_sns_cm_iter *it)
Definition: iter.c:739
static int iter_group_next(struct m0_sns_cm_iter *it)
Definition: iter.c:554
static int iter_fid_next(struct m0_sns_cm_iter *it)
Definition: iter.c:329
Definition: iter.c:74
static int iter_fid_lock_wait(struct m0_sns_cm_iter *it)
Definition: iter.c:303
static int iter_cob_next(struct m0_sns_cm_iter *it)
Definition: iter.c:690
static int iter_fid_lock(struct m0_sns_cm_iter *it)
Definition: iter.c:280
static int iter_cp_setup(struct m0_sns_cm_iter *it)
Definition: iter.c:612

Definition at line 746 of file iter.c.

◆ iter_bob

const struct m0_bob_type iter_bob
static
Initial value:
= {
.bt_name = "sns cm data iterator",
.bt_magix_offset = M0_MAGIX_OFFSET(struct m0_sns_cm_iter, si_magix),
.bt_magix = SNS_REPAIR_ITER_MAGIX,
.bt_check = NULL
}
#define NULL
Definition: misc.h:38
#define M0_MAGIX_OFFSET(type, field)
Definition: misc.h:356

Definition at line 56 of file iter.c.

◆ M0_XCA_DOMAIN

enum { ... } M0_XCA_DOMAIN

◆ rebalance_helpers

const struct m0_sns_cm_helpers rebalance_helpers

Definition at line 356 of file helpers.c.

◆ repair_helpers

const struct m0_sns_cm_helpers repair_helpers

Definition at line 238 of file helpers.c.

◆ sns_rebalance_cmt

M0_EXTERN struct m0_cm_type sns_rebalance_cmt

Definition at line 384 of file cm.c.

◆ sns_repair_cmt

M0_EXTERN struct m0_cm_type sns_repair_cmt

Definition at line 383 of file cm.c.