Motr  M0
cp_common.c File Reference
Include dependency graph for cp_common.c:

Go to the source code of this file.

Enumerations

enum  {
  PDCLUST_N = 8, PDCLUST_K = 2, PDCLUST_S = 2, PDCLUST_P = 24,
  PDCLUST_UNIT_SIZE = 4096
}
 
enum  { LINUX_STOB = 1, AD_STOB = 2 }
 

Functions

void bv_populate (struct m0_bufvec *b, char data, uint32_t seg_nr, uint32_t seg_size)
 
void bv_alloc_populate (struct m0_bufvec *b, char data, uint32_t seg_nr, uint32_t seg_size)
 
void bv_compare (struct m0_bufvec *b1, struct m0_bufvec *b2, uint32_t seg_nr, uint32_t seg_size)
 
void bv_free (struct m0_bufvec *b)
 
void cp_prepare (struct m0_cm_cp *cp, struct m0_net_buffer *buf, uint32_t bv_seg_nr, uint32_t bv_seg_size, struct m0_sns_cm_ag *sns_ag, char data, struct m0_fom_ops *cp_fom_ops, struct m0_reqh *reqh, uint64_t cp_ag_idx, bool is_acc_cp, struct m0_cm *cm)
 
struct m0_sns_cmreqh2snscm (struct m0_reqh *reqh)
 
static int cs_init_setup_env (struct m0_motr *sctx, int stob_type)
 
int cs_init (struct m0_motr *sctx)
 
int cs_init_with_ad_stob (struct m0_motr *sctx)
 
void cs_fini (struct m0_motr *sctx)
 
void layout_gen (struct m0_pdclust_layout **pdlay, struct m0_reqh *reqh)
 
void layout_destroy (struct m0_pdclust_layout *pdlay)
 
void pool_mach_transit (struct m0_reqh *reqh, struct m0_poolmach *pm, uint64_t fd, enum m0_pool_nd_state state)
 

Variables

const char log_file_name [] = "sr_ut.errlog"
 
char * sns_cm_ut_svc_ad []
 
char * sns_cm_ut_svc_linux []
 
FILE * lfile
 
struct m0_motr sctx
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PDCLUST_N 
PDCLUST_K 
PDCLUST_S 
PDCLUST_P 
PDCLUST_UNIT_SIZE 

Definition at line 60 of file cp_common.c.

◆ anonymous enum

anonymous enum
Enumerator
LINUX_STOB 
AD_STOB 

Definition at line 67 of file cp_common.c.

Function Documentation

◆ bv_alloc_populate()

void bv_alloc_populate ( struct m0_bufvec b,
char  data,
uint32_t  seg_nr,
uint32_t  seg_size 
)

Definition at line 84 of file cp_common.c.

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

◆ bv_compare()

void bv_compare ( struct m0_bufvec b1,
struct m0_bufvec b2,
uint32_t  seg_nr,
uint32_t  seg_size 
)

Definition at line 95 of file cp_common.c.

Here is the caller graph for this function:

◆ bv_free()

void bv_free ( struct m0_bufvec b)

Definition at line 115 of file cp_common.c.

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

◆ bv_populate()

void bv_populate ( struct m0_bufvec b,
char  data,
uint32_t  seg_nr,
uint32_t  seg_size 
)

Definition at line 71 of file cp_common.c.

Here is the caller graph for this function:

◆ cp_prepare()

void cp_prepare ( struct m0_cm_cp cp,
struct m0_net_buffer buf,
uint32_t  bv_seg_nr,
uint32_t  bv_seg_size,
struct m0_sns_cm_ag sns_ag,
char  data,
struct m0_fom_ops cp_fom_ops,
struct m0_reqh reqh,
uint64_t  cp_ag_idx,
bool  is_acc_cp,
struct m0_cm cm 
)

Definition at line 120 of file cp_common.c.

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

◆ cs_fini()

void cs_fini ( struct m0_motr sctx)

Definition at line 221 of file cp_common.c.

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

◆ cs_init()

int cs_init ( struct m0_motr sctx)

Definition at line 206 of file cp_common.c.

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

◆ cs_init_setup_env()

static int cs_init_setup_env ( struct m0_motr sctx,
int  stob_type 
)
static

Definition at line 173 of file cp_common.c.

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

◆ cs_init_with_ad_stob()

int cs_init_with_ad_stob ( struct m0_motr sctx)

Definition at line 215 of file cp_common.c.

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

◆ layout_destroy()

void layout_destroy ( struct m0_pdclust_layout pdlay)

Definition at line 257 of file cp_common.c.

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

◆ layout_gen()

void layout_gen ( struct m0_pdclust_layout **  pdlay,
struct m0_reqh reqh 
)

Definition at line 227 of file cp_common.c.

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

◆ pool_mach_transit()

void pool_mach_transit ( struct m0_reqh reqh,
struct m0_poolmach pm,
uint64_t  fd,
enum m0_pool_nd_state  state 
)

Definition at line 262 of file cp_common.c.

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

◆ reqh2snscm()

struct m0_sns_cm* reqh2snscm ( struct m0_reqh reqh)

Definition at line 160 of file cp_common.c.

Here is the call graph for this function:

Variable Documentation

◆ lfile

FILE* lfile

Definition at line 58 of file cp_common.c.

◆ log_file_name

const char log_file_name[] = "sr_ut.errlog"

Definition at line 33 of file cp_common.c.

◆ sctx

struct m0_motr sctx

Definition at line 59 of file cp_common.c.

◆ sns_cm_ut_svc_ad

char* sns_cm_ut_svc_ad[]
Initial value:
= {
"m0d", "-T", "AD",
"-D", "sr_db", "-S", "sr_stob",
"-A", "linuxstob:sr_addb_stob",
"-w", "10",
"-G", M0_NET_XPRT_PREFIX_DEFAULT":0@lo:12345:34:1",
"-e", M0_NET_XPRT_PREFIX_DEFAULT":0@lo:12345:34:1",
"-H", "0@lo:12345:34:1",
"-c", M0_UT_PATH("conf.xc")
}
#define M0_NET_XPRT_PREFIX_DEFAULT
Definition: net.h:98
#define M0_UT_CONF_PROCESS
Definition: misc.h:45
#define M0_UT_PATH(name)
Definition: misc.h:41

Definition at line 34 of file cp_common.c.

◆ sns_cm_ut_svc_linux

char* sns_cm_ut_svc_linux[]
Initial value:
= {
"m0d", "-T", "LINUX",
"-D", "sr_db", "-S", "sr_stob",
"-A", "linuxstob:sr_addb_stob",
"-w", "10",
"-G", M0_NET_XPRT_PREFIX_DEFAULT":0@lo:12345:34:1",
"-e", M0_NET_XPRT_PREFIX_DEFAULT":0@lo:12345:34:1",
"-H", "0@lo:12345:34:1",
"-c", M0_UT_PATH("conf.xc")
}
#define M0_NET_XPRT_PREFIX_DEFAULT
Definition: net.h:98
#define M0_UT_CONF_PROCESS
Definition: misc.h:45
#define M0_UT_PATH(name)
Definition: misc.h:41

Definition at line 46 of file cp_common.c.