Motr  M0
FIS Internals

Data Structures

struct  m0_fi_command_fom
 

Functions

static bool fi_str_not_empty (const char *s)
 
M0_INTERNAL int m0_fi_command_post_sync (struct m0_rpc_session *sess, const char *func, const char *tag, enum m0_fi_disp disp, uint32_t num1, uint32_t num2)
 
static int fi_command_fom_create (struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)
 
static void fi_command_fom_fini (struct m0_fom *fom)
 
static int fi_command_execute (const struct m0_fi_command_req *req)
 
static int fi_command_fom_tick (struct m0_fom *fom)
 
static size_t fi_command_fom_locality (const struct m0_fom *fom)
 
M0_INTERNAL void m0_fi_command_fop_init (void)
 
M0_INTERNAL void m0_fi_command_fop_fini (void)
 
static int fis_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static int fis_start (struct m0_reqh_service *service)
 
static void fis_stop (struct m0_reqh_service *service)
 
static void fis_fini (struct m0_reqh_service *service)
 
 M0_BOB_DEFINE (M0_INTERNAL, &fis_bob, m0_reqh_fi_service)
 
M0_INTERNAL int m0_fis_register (void)
 
M0_INTERNAL void m0_fis_unregister (void)
 

Variables

struct m0_fi_command_fom M0_XCA_DOMAIN
 
const struct m0_fom_ops fi_command_fom_ops
 
const struct m0_fom_type_ops m0_fi_command_fom_type_ops
 
struct m0_fop_type m0_fi_command_req_fopt
 
struct m0_fop_type m0_fi_command_rep_fopt
 
static const struct m0_reqh_service_type_ops fis_type_ops
 
static const struct m0_reqh_service_ops fis_ops
 
struct m0_reqh_service_type m0_fis_type
 
static const struct m0_bob_type fis_bob
 

Detailed Description

Function Documentation

◆ fi_command_execute()

static int fi_command_execute ( const struct m0_fi_command_req req)
static

Definition at line 97 of file fi_command_fom.c.

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

◆ fi_command_fom_create()

static int fi_command_fom_create ( struct m0_fop fop,
struct m0_fom **  out,
struct m0_reqh reqh 
)
static

Definition at line 61 of file fi_command_fom.c.

Here is the call graph for this function:

◆ fi_command_fom_fini()

static void fi_command_fom_fini ( struct m0_fom fom)
static

Definition at line 89 of file fi_command_fom.c.

Here is the call graph for this function:

◆ fi_command_fom_locality()

static size_t fi_command_fom_locality ( const struct m0_fom fom)
static

Definition at line 147 of file fi_command_fom.c.

Here is the call graph for this function:

◆ fi_command_fom_tick()

static int fi_command_fom_tick ( struct m0_fom fom)
static

Definition at line 134 of file fi_command_fom.c.

Here is the call graph for this function:

◆ fi_str_not_empty()

static bool fi_str_not_empty ( const char *  s)
static

Definition at line 51 of file fi_command.c.

Here is the caller graph for this function:

◆ fis_allocate()

static int fis_allocate ( struct m0_reqh_service **  service,
const struct m0_reqh_service_type stype 
)
static

Allocates m0_reqh_fi_service instance and initialises it as BOB. Exposes standard m0_reqh_service interface outside for registration with REQH.

Definition at line 115 of file fi_service.c.

Here is the call graph for this function:

◆ fis_fini()

static void fis_fini ( struct m0_reqh_service service)
static

Definition at line 80 of file fi_service.c.

◆ fis_start()

static int fis_start ( struct m0_reqh_service service)
static
Note
FI command fops become acceptable only in case fault injection service appears in configuration database and started normal way.

Definition at line 62 of file fi_service.c.

Here is the call graph for this function:

◆ fis_stop()

static void fis_stop ( struct m0_reqh_service service)
static

Definition at line 73 of file fi_service.c.

Here is the call graph for this function:

◆ M0_BOB_DEFINE()

M0_BOB_DEFINE ( M0_INTERNAL  ,
fis_bob,
m0_reqh_fi_service   
)

◆ m0_fi_command_fop_fini()

M0_INTERNAL void m0_fi_command_fop_fini ( void  )

Definition at line 66 of file fi_command_fops.c.

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

◆ m0_fi_command_fop_init()

M0_INTERNAL void m0_fi_command_fop_init ( void  )

Definition at line 46 of file fi_command_fops.c.

Here is the caller graph for this function:

◆ m0_fi_command_post_sync()

M0_INTERNAL int m0_fi_command_post_sync ( struct m0_rpc_session sess,
const char *  func,
const char *  tag,
enum m0_fi_disp  disp,
uint32_t  num1,
uint32_t  num2 
)

Posts fault injection command over already existing rpc session. Remote side to execute fault injection command in accordance with function name, tag and disposition. The command is executed synchronously providing m0_fi_command_rep::fcp_rc as a return code.

Parameters
sess- a valid rpc session
func- function name to fail on remote side
tag- tag the function to fail at
disp- fault disposition
num1- 1st numerical (e.g. p in m0_fi_enable_random())
num2- 2nd numerical (e.g. m in m0_fi_enable_off_n_on_m())

Definition at line 56 of file fi_command.c.

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

◆ m0_fis_register()

M0_INTERNAL int m0_fis_register ( void  )

Definition at line 132 of file fi_service.c.

Here is the call graph for this function:

◆ m0_fis_unregister()

M0_INTERNAL void m0_fis_unregister ( void  )

Definition at line 139 of file fi_service.c.

Here is the call graph for this function:

Variable Documentation

◆ fi_command_fom_ops

const struct m0_fom_ops fi_command_fom_ops
Initial value:
= {
.fo_fini = fi_command_fom_fini,
.fo_tick = fi_command_fom_tick,
.fo_home_locality = fi_command_fom_locality
}
static int fi_command_fom_tick(struct m0_fom *fom)
static size_t fi_command_fom_locality(const struct m0_fom *fom)
static void fi_command_fom_fini(struct m0_fom *fom)

Definition at line 158 of file fi_command_fom.c.

◆ fis_bob

const struct m0_bob_type fis_bob
static
Initial value:
= {
.bt_name = FI_SERVICE_NAME,
.bt_magix_offset = offsetof(struct m0_reqh_fi_service, fis_magic),
.bt_magix = M0_FI_SERVICE_MAGIC,
.bt_check = NULL
}
#define NULL
Definition: misc.h:38
#define FI_SERVICE_NAME
Definition: fi_service.h:69
#define offsetof(typ, memb)
Definition: misc.h:29

Definition at line 102 of file fi_service.c.

◆ fis_ops

const struct m0_reqh_service_ops fis_ops
static
Initial value:
= {
.rso_start = fis_start,
.rso_stop = fis_stop,
.rso_fini = fis_fini,
}
static void fis_fini(struct m0_reqh_service *service)
Definition: fi_service.c:80
static void fis_stop(struct m0_reqh_service *service)
Definition: fi_service.c:73
static int fis_start(struct m0_reqh_service *service)
Definition: fi_service.c:62

Definition at line 89 of file fi_service.c.

◆ fis_type_ops

const struct m0_reqh_service_type_ops fis_type_ops
static
Initial value:
= {
.rsto_service_allocate = fis_allocate
}
static int fis_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: fi_service.c:115

Definition at line 85 of file fi_service.c.

◆ m0_fi_command_fom_type_ops

const struct m0_fom_type_ops m0_fi_command_fom_type_ops
Initial value:
= {
.fto_create = fi_command_fom_create
}
static int fi_command_fom_create(struct m0_fop *fop, struct m0_fom **out, struct m0_reqh *reqh)

Definition at line 154 of file fi_command_fom.c.

◆ m0_fi_command_rep_fopt

struct m0_fop_type m0_fi_command_rep_fopt

Definition at line 44 of file fi_command_fops.c.

◆ m0_fi_command_req_fopt

struct m0_fop_type m0_fi_command_req_fopt

Definition at line 43 of file fi_command_fops.c.

◆ m0_fis_type

struct m0_reqh_service_type m0_fis_type
Initial value:
= {
.rst_name = FI_SERVICE_NAME,
.rst_ops = &fis_type_ops,
.rst_level = M0_RPC_SVC_LEVEL,
.rst_typecode = M0_CST_FIS,
}
#define FI_SERVICE_NAME
Definition: fi_service.h:69
static const struct m0_reqh_service_type_ops fis_type_ops
Definition: fi_service.c:85

Definition at line 95 of file fi_service.c.

◆ M0_XCA_DOMAIN

struct m0_fi_command_fom M0_XCA_DOMAIN