Motr  M0
cm.c File Reference
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/errno.h"
#include "lib/memory.h"
#include "fop/fop.h"
#include "reqh/reqh.h"
#include "conf/obj_ops.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/file.h"
#include "sns/cm/rebalance/ag.h"
Include dependency graph for cm.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SNSCM
 

Functions

M0_INTERNAL int m0_sns_cm_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 struct m0_cm_cprebalance_cm_cp_alloc (struct m0_cm *cm)
 
static int rebalance_cm_prepare (struct m0_cm *cm)
 
static void rebalance_cm_stop (struct m0_cm *cm)
 
static int rebalance_cm_get_space_for (struct m0_cm *cm, const struct m0_cm_ag_id *id, size_t *count)
 

Variables

const struct m0_sns_cm_helpers rebalance_helpers
 
const struct m0_cm_cp_ops m0_sns_cm_rebalance_cp_ops
 
const struct m0_cm_ops sns_rebalance_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_SNSCM

Definition at line 23 of file cm.c.

Function Documentation

◆ rebalance_cm_cp_alloc()

static struct m0_cm_cp* rebalance_cm_cp_alloc ( struct m0_cm cm)
static

Definition at line 54 of file cm.c.

◆ rebalance_cm_get_space_for()

static int rebalance_cm_get_space_for ( struct m0_cm cm,
const struct m0_cm_ag_id id,
size_t *  count 
)
static

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 160 of file cm.c.

Here is the call graph for this function:

◆ rebalance_cm_prepare()

static int rebalance_cm_prepare ( struct m0_cm cm)
static

Definition at line 65 of file cm.c.

Here is the call graph for this function:

◆ rebalance_cm_stop()

static void rebalance_cm_stop ( struct m0_cm cm)
static

Definition at line 82 of file cm.c.

Here is the call graph for this function: