Motr  M0
cm.c File Reference
#include "lib/trace.h"
#include "lib/memory.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/misc.h"
#include "lib/finject.h"
#include "lib/chan.h"
#include "lib/locality.h"
#include "lib/types.h"
#include "fop/fop.h"
#include "pool/pool_machine.h"
#include "motr/setup.h"
#include "net/net.h"
#include "ioservice/io_service.h"
#include "reqh/reqh.h"
#include "rpc/rpc.h"
#include "cob/ns_iter.h"
#include "cm/proxy.h"
#include "sns/cm/ha.h"
#include "ha/msg.h"
#include "sns/cm/cm_utils.h"
#include "sns/cm/iter.h"
#include "sns/cm/cm.h"
#include "sns/cm/cp.h"
#include "sns/cm/ag.h"
#include "sns/cm/file.h"
#include "rm/rm_service.h"
#include "conf/diter.h"
Include dependency graph for cm.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SNSCM
 

Enumerations

enum  { SNS_SEG_NR = 10, SNS_SEG_SIZE = 4096, SNS_COB_FID_START = 4 }
 

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)
 

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
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SNSCM

Definition at line 23 of file cm.c.