Motr  M0
MD Service Operations

Data Structures

struct  m0_reqh_md_service
 

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_MDS
 

Functions

static int mds_allocate (struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
 
static void mds_fini (struct m0_reqh_service *service)
 
static int mds_start (struct m0_reqh_service *service)
 
static void mds_stop (struct m0_reqh_service *service)
 
M0_INTERNAL int m0_mds_register (void)
 
M0_INTERNAL void m0_mds_unregister (void)
 

Variables

static const struct m0_reqh_service_type_ops mds_type_ops
 
static const struct m0_reqh_service_ops mds_ops
 
struct m0_reqh_service_type m0_mds_type
 
struct m0_reqh_md_service M0_XCA_DOMAIN
 

Detailed Description

See also
Request handler

MD Service defines service operation vector -

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_MDS

Definition at line 27 of file md_service.c.

Function Documentation

◆ m0_mds_register()

M0_INTERNAL int m0_mds_register ( void  )

Definition at line 79 of file md_service.c.

Here is the call graph for this function:

◆ m0_mds_unregister()

M0_INTERNAL void m0_mds_unregister ( void  )

Definition at line 104 of file md_service.c.

Here is the call graph for this function:

◆ mds_allocate()

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

Allocates and initiates MD Service instance. This operation allocates & initiates service instance with its operation vector.

Definition at line 122 of file md_service.c.

Here is the call graph for this function:

◆ mds_fini()

static void mds_fini ( struct m0_reqh_service service)
static

Finalise MD Service instance. This operation finalises service instance and de-allocate it.

Parameters
servicepointer to service instance.
Precondition
service != NULL

Definition at line 148 of file md_service.c.

Here is the call graph for this function:

◆ mds_start()

static int mds_start ( struct m0_reqh_service service)
static

Start MD Service.

Parameters
servicepointer to service instance.
Precondition
service != NULL
Todo:
XXX change this when reqh will be started before services, see MOTR-317

Definition at line 164 of file md_service.c.

◆ mds_stop()

static void mds_stop ( struct m0_reqh_service service)
static

Stops MD Service.

Parameters
servicepointer to service instance.
Precondition
service != NULL

Definition at line 197 of file md_service.c.

Here is the call graph for this function:

Variable Documentation

◆ m0_mds_type

struct m0_reqh_service_type m0_mds_type
Initial value:
= {
.rst_name = "M0_CST_MDS",
.rst_ops = &mds_type_ops,
.rst_level = M0_MD_SVC_LEVEL,
.rst_typecode = M0_CST_MDS,
}
static const struct m0_reqh_service_type_ops mds_type_ops
Definition: md_service.c:58

Definition at line 72 of file md_service.c.

◆ M0_XCA_DOMAIN

struct m0_reqh_md_service M0_XCA_DOMAIN

◆ mds_ops

const struct m0_reqh_service_ops mds_ops
static
Initial value:
= {
.rso_start = mds_start,
.rso_stop = mds_stop,
.rso_fini = mds_fini
}
static void mds_stop(struct m0_reqh_service *service)
Definition: md_service.c:197
int m0_reqh_service_async_start_simple(struct m0_reqh_service_start_async_ctx *asc)
Definition: reqh_service.c:601
static void mds_fini(struct m0_reqh_service *service)
Definition: md_service.c:148
static int mds_start(struct m0_reqh_service *service)
Definition: md_service.c:164

MD Service operations.

Definition at line 65 of file md_service.c.

◆ mds_type_ops

const struct m0_reqh_service_type_ops mds_type_ops
static
Initial value:
= {
.rsto_service_allocate = mds_allocate
}
static int mds_allocate(struct m0_reqh_service **service, const struct m0_reqh_service_type *stype)
Definition: md_service.c:122

MD Service type operations.

Definition at line 58 of file md_service.c.